From 7540838daa7f170d43e5fd8244f98841452e5496 Mon Sep 17 00:00:00 2001 From: Brendan Adkins Date: Tue, 9 Jul 2024 20:18:25 -0500 Subject: [PATCH 1/5] #60 Possible regression bug for multipage delete actions. --- src/Otis_Importer.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Otis_Importer.php b/src/Otis_Importer.php index ceaee51..9d21e01 100644 --- a/src/Otis_Importer.php +++ b/src/Otis_Importer.php @@ -698,6 +698,11 @@ private function _delete_removed_listings( $assoc_args = [] ) { if ( $has_next_page ) { $assoc_args['deletes_page'] = $deletes_page + 1; $assoc_args = array_merge( $assoc_args, $api_params ); + // Action Scheduler expects the top level key of $assoc_args to be 'params'. + // This means we need to rewrap the array before passing it to schedule_action(). + if ( !isset( $assoc_args['params'] ) ) { + $assoc_args = [ 'params' => $assoc_args ]; + } $this->schedule_action( 'wp_otis_delete_removed_listings', $assoc_args ); $this->logger->log( 'Scheduling fetch of next page of removed listings' ); return; From 6b054039fadd65991a69bc489c870263ff9bda5a Mon Sep 17 00:00:00 2001 From: Brendan Adkins Date: Tue, 9 Jul 2024 20:20:49 -0500 Subject: [PATCH 2/5] #60 Version bump for client testing. --- src/Otis_Dashboard.php | 4 ++-- wp-otis.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Otis_Dashboard.php b/src/Otis_Dashboard.php index 57a5788..713a849 100644 --- a/src/Otis_Dashboard.php +++ b/src/Otis_Dashboard.php @@ -10,11 +10,11 @@ class Otis_Dashboard public function otis_dashboard_scripts() { wp_enqueue_media(); - wp_register_script( 'otis-js', plugins_url( '../dist/otis.js', __FILE__ ), [], '2.5.1', true ); + wp_register_script( 'otis-js', plugins_url( '../dist/otis.js', __FILE__ ), [], '2.5.2', true ); wp_localize_script( 'otis-js', 'otisDash', array( 'ajax_url' => admin_url( 'admin-ajax.php' ), 'admin_url' => admin_url() ) ); wp_enqueue_script( 'otis-js' ); - wp_enqueue_style( 'otis-styles', plugins_url( '../dist/otis.css', __FILE__ ), [], '2.5.1' ); + wp_enqueue_style( 'otis-styles', plugins_url( '../dist/otis.css', __FILE__ ), [], '2.5.2' ); } public function otis_dashboard_page() { diff --git a/wp-otis.php b/wp-otis.php index 1451ec3..8b676ca 100644 --- a/wp-otis.php +++ b/wp-otis.php @@ -7,7 +7,7 @@ * Author URI: thinkshout.com * Text Domain: wp-otis * Domain Path: /languages - * Version: 1.2.5 + * Version: 1.2.5.2 * * @package Otis */ From 3733be017def1831d8cbdb330dc4bb09c8e2d5db Mon Sep 17 00:00:00 2001 From: Brendan Adkins Date: Wed, 10 Jul 2024 11:07:25 -0500 Subject: [PATCH 3/5] #60 Code style. --- src/Otis_Importer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Otis_Importer.php b/src/Otis_Importer.php index 9d21e01..f3b6a35 100644 --- a/src/Otis_Importer.php +++ b/src/Otis_Importer.php @@ -701,7 +701,7 @@ private function _delete_removed_listings( $assoc_args = [] ) { // Action Scheduler expects the top level key of $assoc_args to be 'params'. // This means we need to rewrap the array before passing it to schedule_action(). if ( !isset( $assoc_args['params'] ) ) { - $assoc_args = [ 'params' => $assoc_args ]; + $assoc_args = array( 'params' => $assoc_args ); } $this->schedule_action( 'wp_otis_delete_removed_listings', $assoc_args ); $this->logger->log( 'Scheduling fetch of next page of removed listings' ); From 27249b7352cb494aac7671da72f47d7f9184180a Mon Sep 17 00:00:00 2001 From: Brendan Adkins Date: Wed, 10 Jul 2024 11:07:25 -0500 Subject: [PATCH 4/5] #60 Code style. --- src/Otis_Importer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Otis_Importer.php b/src/Otis_Importer.php index 9d21e01..f3b6a35 100644 --- a/src/Otis_Importer.php +++ b/src/Otis_Importer.php @@ -701,7 +701,7 @@ private function _delete_removed_listings( $assoc_args = [] ) { // Action Scheduler expects the top level key of $assoc_args to be 'params'. // This means we need to rewrap the array before passing it to schedule_action(). if ( !isset( $assoc_args['params'] ) ) { - $assoc_args = [ 'params' => $assoc_args ]; + $assoc_args = array( 'params' => $assoc_args ); } $this->schedule_action( 'wp_otis_delete_removed_listings', $assoc_args ); $this->logger->log( 'Scheduling fetch of next page of removed listings' ); From a11ce6b75f62e493f1adea3313497c8ecf98f59d Mon Sep 17 00:00:00 2001 From: Brendan Adkins Date: Thu, 18 Jul 2024 18:49:20 -0500 Subject: [PATCH 5/5] Updating version everywhere. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ff7d7b..87434aa 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ # wp-otis WordPress plugin for the Oregon Tourism Information System -Version 1.2.4.1 +Version 1.2.5.2