Changeset 3444323
- Timestamp:
- 01/21/2026 05:36:46 PM (2 months ago)
- Location:
- multibanco-ifthen-software-gateway-for-woocommerce
- Files:
-
- 18 edited
- 1 copied
-
tags/11.3.2 (copied) (copied from multibanco-ifthen-software-gateway-for-woocommerce/trunk)
-
tags/11.3.2/class-wc-cofidispay-ifthen-webdados.php (modified) (3 diffs)
-
tags/11.3.2/class-wc-creditcard-ifthen-webdados.php (modified) (3 diffs)
-
tags/11.3.2/class-wc-gateway-ifthen-webdados.php (modified) (2 diffs)
-
tags/11.3.2/class-wc-ifthen-webdados.php (modified) (7 diffs)
-
tags/11.3.2/class-wc-mbway-ifthen-webdados.php (modified) (3 diffs)
-
tags/11.3.2/class-wc-multibanco-ifthen-webdados.php (modified) (2 diffs)
-
tags/11.3.2/class-wc-payshop-ifthen-webdados.php (modified) (3 diffs)
-
tags/11.3.2/multibanco_ifthen_for_woocommerce.php (modified) (1 diff)
-
tags/11.3.2/readme.txt (modified) (2 diffs)
-
trunk/class-wc-cofidispay-ifthen-webdados.php (modified) (3 diffs)
-
trunk/class-wc-creditcard-ifthen-webdados.php (modified) (3 diffs)
-
trunk/class-wc-gateway-ifthen-webdados.php (modified) (2 diffs)
-
trunk/class-wc-ifthen-webdados.php (modified) (7 diffs)
-
trunk/class-wc-mbway-ifthen-webdados.php (modified) (3 diffs)
-
trunk/class-wc-multibanco-ifthen-webdados.php (modified) (2 diffs)
-
trunk/class-wc-payshop-ifthen-webdados.php (modified) (3 diffs)
-
trunk/multibanco_ifthen_for_woocommerce.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
multibanco-ifthen-software-gateway-for-woocommerce/tags/11.3.2/class-wc-cofidispay-ifthen-webdados.php
r3439612 r3444323 175 175 */ 176 176 private function upgrade() { 177 if ( version_compare( $this->get_option( 'version' ), $this->version, '<' ) ) { 177 $db_version = $this->get_option( 'version' ); 178 if ( version_compare( $db_version, $this->version, '<' ) ) { 178 179 $current_options = get_option( 'woocommerce_' . $this->id . '_settings', '' ); 179 180 if ( ! is_array( $current_options ) ) { … … 181 182 } 182 183 // Upgrade 183 $this->debug_log( 'Upgrade to ' . $this->version . ' started' );184 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' started' ); 184 185 // Specific versions upgrades should be here 185 186 // Update routines when upgrading to 11.0.1 or above - Fix some autoloaded options 186 if ( version_compare( $ this->get_option( 'version' ), '11.0.1', '<' ) ) {187 if ( version_compare( $db_version, '11.0.1', '<' ) ) { 187 188 $value = get_option( $this->id . '_callback_email_sent' ); 188 189 delete_option( $this->id . '_callback_email_sent' ); … … 192 193 $current_options['version'] = $this->version; 193 194 update_option( 'woocommerce_' . $this->id . '_settings', $current_options ); 194 $this->debug_log( 'Upgrade to ' . $this->version . ' finished' );195 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' finished' ); 195 196 } 196 197 } -
multibanco-ifthen-software-gateway-for-woocommerce/tags/11.3.2/class-wc-creditcard-ifthen-webdados.php
r3439612 r3444323 170 170 */ 171 171 private function upgrade() { 172 if ( version_compare( $this->get_option( 'version' ), $this->version, '<' ) ) { 172 $db_version = $this->get_option( 'version' ); 173 if ( version_compare( $db_version, $this->version, '<' ) ) { 173 174 $current_options = get_option( 'woocommerce_' . $this->id . '_settings', '' ); 174 175 if ( ! is_array( $current_options ) ) { … … 176 177 } 177 178 // Upgrade 178 $this->debug_log( 'Upgrade to ' . $this->version . ' started' );179 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' started' ); 179 180 // Specific versions upgrades should be here 180 181 // Update routines when upgrading to 11.0.1 or above - Fix some autoloaded options 181 if ( version_compare( $ this->get_option( 'version' ), '11.0.1', '<' ) ) {182 if ( version_compare( $db_version, '11.0.1', '<' ) ) { 182 183 $value = get_option( $this->id . '_callback_email_sent' ); 183 184 delete_option( $this->id . '_callback_email_sent' ); … … 187 188 $current_options['version'] = $this->version; 188 189 update_option( 'woocommerce_' . $this->id . '_settings', $current_options ); 189 $this->debug_log( 'Upgrade to ' . $this->version . ' finished' );190 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' finished' ); 190 191 } 191 192 } -
multibanco-ifthen-software-gateway-for-woocommerce/tags/11.3.2/class-wc-gateway-ifthen-webdados.php
r3381310 r3444323 181 181 */ 182 182 private function upgrade() { 183 if ( version_compare( $this->get_option( 'version' ), $this->version, '<' ) ) { 183 $db_version = $this->get_option( 'version' ); 184 if ( version_compare( $db_version, $this->version, '<' ) ) { 184 185 $current_options = get_option( 'woocommerce_' . $this->id . '_settings', '' ); 185 186 if ( ! is_array( $current_options ) ) { … … 187 188 } 188 189 // Upgrade 189 $this->debug_log( 'Upgrade to ' . $this->version . ' started' );190 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' started' ); 190 191 // Specific versions upgrades should be here 191 192 // Upgrade on the database - Risky? 192 193 $current_options['version'] = $this->version; 193 194 update_option( 'woocommerce_' . $this->id . '_settings', $current_options ); 194 $this->debug_log( 'Upgrade to ' . $this->version . ' finished' );195 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' finished' ); 195 196 } 196 197 } -
multibanco-ifthen-software-gateway-for-woocommerce/tags/11.3.2/class-wc-ifthen-webdados.php
r3439612 r3444323 17 17 18 18 /* IDs */ 19 public $id = 'ifthen_for_woocommerce'; // Plugin ID 19 20 public $multibanco_id = 'multibanco_ifthen_for_woocommerce'; 20 21 public $mbway_id = 'mbway_ifthen_for_woocommerce'; … … 134 135 */ 135 136 public function __construct( $version ) { 137 // Check version 136 138 $this->version = $version; 137 139 $this->pro_add_on_active = function_exists( 'WC_IfthenPay_Pro' ); … … 237 239 home_url( '/wc-api/WC_GatewayReturn_IfThen_Webdados/' ) 238 240 ); 241 // Upgrade 242 $this->upgrade(); 239 243 // Hooks 240 244 $this->init_hooks(); … … 252 256 } 253 257 return self::$_instance; 258 } 259 260 /** 261 * Upgrades (if needed) 262 */ 263 private function upgrade() { 264 $db_version = get_option( $this->id . '_version', '' ); 265 if ( version_compare( $db_version, $this->version, '<' ) ) { 266 $this->debug_log( $this->id, 'Upgrade from ' . $db_version . ' to ' . $this->version . ' started' ); 267 // Update routines when upgrading to 11.3 or above - Remove old cron 268 if ( version_compare( $db_version, '11.3', '<' ) ) { 269 wp_clear_scheduled_hook( 'wc_ifthen_hourly_cron' ); 270 } 271 // Update routines when upgrading to 11.3.2 or above - Clear Action Scheduler errors 272 if ( version_compare( $db_version, '11.3.2', '<' ) ) { 273 // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching 274 global $wpdb; 275 // Get action IDs for wc_ifthen_hourly_cron with failed status 276 $failed_action_ids = $wpdb->get_col( 277 $wpdb->prepare( 278 "SELECT action_id FROM {$wpdb->prefix}actionscheduler_actions 279 WHERE hook = %s AND status = 'failed'", 280 'wc_ifthen_hourly_cron' 281 ) 282 ); 283 if ( ! empty( $failed_action_ids ) ) { 284 // Delete the failed actions 285 $wpdb->query( 286 $wpdb->prepare( 287 "DELETE FROM {$wpdb->prefix}actionscheduler_actions 288 WHERE hook = %s AND status = 'failed'", 289 'wc_ifthen_hourly_cron' 290 ) 291 ); 292 // Delete associated logs 293 $ids_placeholder = implode( ',', array_fill( 0, count( $failed_action_ids ), '%d' ) ); 294 $wpdb->query( 295 $wpdb->prepare( 296 "DELETE FROM {$wpdb->prefix}actionscheduler_logs 297 WHERE action_id IN ($ids_placeholder)", // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare, WordPress.DB.PreparedSQL.InterpolatedNotPrepared 298 $failed_action_ids 299 ) 300 ); 301 $this->debug_log( $this->id, 'Cleared ' . count( $failed_action_ids ) . ' failed Action Scheduler entries for wc_ifthen_hourly_cron' ); 302 } else { 303 $this->debug_log( $this->id, 'No failed Action Scheduler entries found for wc_ifthen_hourly_cron' ); 304 } 305 // phpcs:enable 306 } 307 update_option( $this->id . '_version', $this->version ); 308 $this->debug_log( $this->id, 'Upgrade from ' . $db_version . ' to ' . $this->version . ' finished' ); 309 } 254 310 } 255 311 … … 307 363 } 308 364 ); 365 add_action( 'wc_ifthen_hourly_cron', array( $this, 'action_scheduler_do_nothing' ) ); 309 366 // Cancel orders with expired references - Multibanco (after_setup_theme so it runs after theme's functions.php file) 310 367 add_action( … … 482 539 * Debug / Log 483 540 * 484 * @param string $gateway_id The payment gateway ID .541 * @param string $gateway_id The payment gateway ID or the main plugin ID. 485 542 * @param string $message The message to debug. 486 543 * @param string $level The debug level. … … 4027 4084 } 4028 4085 } 4086 4087 /** 4088 * Action scheduler task that does nothing 4089 * 4090 * Used to keep the Action Scheduler running and not looping 4091 */ 4092 public function action_scheduler_do_nothing() { 4093 // Do nothing - Make sure the task does not fail for lack of a hook 4094 } 4029 4095 } -
multibanco-ifthen-software-gateway-for-woocommerce/tags/11.3.2/class-wc-mbway-ifthen-webdados.php
r3439612 r3444323 176 176 */ 177 177 private function upgrade() { 178 if ( version_compare( $this->get_option( 'version' ), $this->version, '<' ) ) { 178 $db_version = $this->get_option( 'version' ); 179 if ( version_compare( $db_version, $this->version, '<' ) ) { 179 180 $current_options = get_option( 'woocommerce_' . $this->id . '_settings', '' ); 180 181 if ( ! is_array( $current_options ) ) { … … 182 183 } 183 184 // Upgrade 184 $this->debug_log( 'Upgrade to ' . $this->version . ' started' );185 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' started' ); 185 186 // Specific versions upgrades should be here 186 187 // Update routines when upgrading to 11.0.1 or above - Fix some autoloaded options 187 if ( version_compare( $ this->get_option( 'version' ), '11.0.1', '<' ) ) {188 if ( version_compare( $db_version, '11.0.1', '<' ) ) { 188 189 $value = get_option( $this->id . '_callback_email_sent' ); 189 190 delete_option( $this->id . '_callback_email_sent' ); … … 193 194 $current_options['version'] = $this->version; 194 195 update_option( 'woocommerce_' . $this->id . '_settings', $current_options ); 195 $this->debug_log( 'Upgrade to ' . $this->version . ' finished' );196 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' finished' ); 196 197 } 197 198 } -
multibanco-ifthen-software-gateway-for-woocommerce/tags/11.3.2/class-wc-multibanco-ifthen-webdados.php
r3439612 r3444323 172 172 */ 173 173 private function upgrade() { 174 if ( version_compare( $this->get_option( 'version' ), $this->version, '<' ) ) { 174 $db_version = $this->get_option( 'version' ); 175 if ( version_compare( $db_version, $this->version, '<' ) ) { 175 176 $current_options = get_option( 'woocommerce_' . $this->id . '_settings', '' ); 176 177 if ( ! is_array( $current_options ) ) { … … 178 179 } 179 180 // Upgrade 180 $this->debug_log( 'Upgrade to ' . $this->version . ' started' );181 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' started' ); 181 182 // Specific versions upgrades should be here 182 183 // Update routines when upgrading to 11.0.1 or above - Fix some autoloaded options 183 if ( version_compare( $ this->get_option( 'version' ), '11.0.1', '<' ) ) {184 if ( version_compare( $db_version, '11.0.1', '<' ) ) { 184 185 $value = get_option( $this->id . '_callback_email_sent' ); 185 186 delete_option( $this->id . '_callback_email_sent' ); 186 187 update_option( $this->id . '_callback_email_sent', $value, false ); 187 188 } 188 // Update routines when upgrading to 11.3 or above - Remove old cron - This is global to the but we do it here189 if ( version_compare( $this->get_option( 'version' ), '11.3', '<' ) ) {190 wp_clear_scheduled_hook( 'wc_ifthen_hourly_cron' );191 }192 189 // Upgrade on the database - Risky? 193 190 $current_options['version'] = $this->version; 194 191 update_option( 'woocommerce_' . $this->id . '_settings', $current_options ); 195 $this->debug_log( 'Upgrade to ' . $this->version . ' finished' );192 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' finished' ); 196 193 } 197 194 } -
multibanco-ifthen-software-gateway-for-woocommerce/tags/11.3.2/class-wc-payshop-ifthen-webdados.php
r3439612 r3444323 165 165 */ 166 166 private function upgrade() { 167 if ( version_compare( $this->get_option( 'version' ), $this->version, '<' ) ) { 167 $db_version = $this->get_option( 'version' ); 168 if ( version_compare( $db_version, $this->version, '<' ) ) { 168 169 $current_options = get_option( 'woocommerce_' . $this->id . '_settings', '' ); 169 170 if ( ! is_array( $current_options ) ) { … … 171 172 } 172 173 // Upgrade 173 $this->debug_log( 'Upgrade to ' . $this->version . ' started' );174 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' started' ); 174 175 // Specific versions upgrades should be here 175 176 // Update routines when upgrading to 11.0.1 or above - Fix some autoloaded options 176 if ( version_compare( $ this->get_option( 'version' ), '11.0.1', '<' ) ) {177 if ( version_compare( $db_version, '11.0.1', '<' ) ) { 177 178 $value = get_option( $this->id . '_callback_email_sent' ); 178 179 delete_option( $this->id . '_callback_email_sent' ); … … 182 183 $current_options['version'] = $this->version; 183 184 update_option( 'woocommerce_' . $this->id . '_settings', $current_options ); 184 $this->debug_log( 'Upgrade to ' . $this->version . ' finished' );185 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' finished' ); 185 186 } 186 187 } -
multibanco-ifthen-software-gateway-for-woocommerce/tags/11.3.2/multibanco_ifthen_for_woocommerce.php
r3440233 r3444323 4 4 * Plugin URI: https://www.webdados.pt/wordpress/plugins/multibanco-ifthen-software-gateway-woocommerce-wordpress/ 5 5 * Description: Secure WooCommerce payments with Multibanco, MB WAY, Credit card, Apple Pay, Google Pay, Payshop, Cofidis, and PIX via ifthenpay’s payment gateway. 6 * Version: 11.3. 16 * Version: 11.3.2 7 7 * Author: Naked Cat Plugins (by Webdados) 8 8 * Author URI: https://nakedcatplugins.com -
multibanco-ifthen-software-gateway-for-woocommerce/tags/11.3.2/readme.txt
r3440233 r3444323 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.2 7 Stable tag: 11.3. 17 Stable tag: 11.3.2 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 256 256 == Changelog == 257 257 258 = 11.3.2 - 2026-01-21 = 259 * [FIX] Add an empty function to the `wc_ifthen_hourly_cron` scheduled action to avoid loop issues on Action Scheduler, introduced on 11.3.0, and clear its failed logs (Thanks BestSites.pt for reporting) 260 * [DEV] Move global upgrade routines from the Multibanco to the main plugin class 261 258 262 = 11.3.1 - 2026-01-15 = 259 * [DEV] Remove unnecessary development folders from repository263 * [DEV] Remove unnecessary development folders from the repository 260 264 261 265 = 11.3.0 - 2026-01-14 = -
multibanco-ifthen-software-gateway-for-woocommerce/trunk/class-wc-cofidispay-ifthen-webdados.php
r3439612 r3444323 175 175 */ 176 176 private function upgrade() { 177 if ( version_compare( $this->get_option( 'version' ), $this->version, '<' ) ) { 177 $db_version = $this->get_option( 'version' ); 178 if ( version_compare( $db_version, $this->version, '<' ) ) { 178 179 $current_options = get_option( 'woocommerce_' . $this->id . '_settings', '' ); 179 180 if ( ! is_array( $current_options ) ) { … … 181 182 } 182 183 // Upgrade 183 $this->debug_log( 'Upgrade to ' . $this->version . ' started' );184 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' started' ); 184 185 // Specific versions upgrades should be here 185 186 // Update routines when upgrading to 11.0.1 or above - Fix some autoloaded options 186 if ( version_compare( $ this->get_option( 'version' ), '11.0.1', '<' ) ) {187 if ( version_compare( $db_version, '11.0.1', '<' ) ) { 187 188 $value = get_option( $this->id . '_callback_email_sent' ); 188 189 delete_option( $this->id . '_callback_email_sent' ); … … 192 193 $current_options['version'] = $this->version; 193 194 update_option( 'woocommerce_' . $this->id . '_settings', $current_options ); 194 $this->debug_log( 'Upgrade to ' . $this->version . ' finished' );195 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' finished' ); 195 196 } 196 197 } -
multibanco-ifthen-software-gateway-for-woocommerce/trunk/class-wc-creditcard-ifthen-webdados.php
r3439612 r3444323 170 170 */ 171 171 private function upgrade() { 172 if ( version_compare( $this->get_option( 'version' ), $this->version, '<' ) ) { 172 $db_version = $this->get_option( 'version' ); 173 if ( version_compare( $db_version, $this->version, '<' ) ) { 173 174 $current_options = get_option( 'woocommerce_' . $this->id . '_settings', '' ); 174 175 if ( ! is_array( $current_options ) ) { … … 176 177 } 177 178 // Upgrade 178 $this->debug_log( 'Upgrade to ' . $this->version . ' started' );179 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' started' ); 179 180 // Specific versions upgrades should be here 180 181 // Update routines when upgrading to 11.0.1 or above - Fix some autoloaded options 181 if ( version_compare( $ this->get_option( 'version' ), '11.0.1', '<' ) ) {182 if ( version_compare( $db_version, '11.0.1', '<' ) ) { 182 183 $value = get_option( $this->id . '_callback_email_sent' ); 183 184 delete_option( $this->id . '_callback_email_sent' ); … … 187 188 $current_options['version'] = $this->version; 188 189 update_option( 'woocommerce_' . $this->id . '_settings', $current_options ); 189 $this->debug_log( 'Upgrade to ' . $this->version . ' finished' );190 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' finished' ); 190 191 } 191 192 } -
multibanco-ifthen-software-gateway-for-woocommerce/trunk/class-wc-gateway-ifthen-webdados.php
r3381310 r3444323 181 181 */ 182 182 private function upgrade() { 183 if ( version_compare( $this->get_option( 'version' ), $this->version, '<' ) ) { 183 $db_version = $this->get_option( 'version' ); 184 if ( version_compare( $db_version, $this->version, '<' ) ) { 184 185 $current_options = get_option( 'woocommerce_' . $this->id . '_settings', '' ); 185 186 if ( ! is_array( $current_options ) ) { … … 187 188 } 188 189 // Upgrade 189 $this->debug_log( 'Upgrade to ' . $this->version . ' started' );190 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' started' ); 190 191 // Specific versions upgrades should be here 191 192 // Upgrade on the database - Risky? 192 193 $current_options['version'] = $this->version; 193 194 update_option( 'woocommerce_' . $this->id . '_settings', $current_options ); 194 $this->debug_log( 'Upgrade to ' . $this->version . ' finished' );195 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' finished' ); 195 196 } 196 197 } -
multibanco-ifthen-software-gateway-for-woocommerce/trunk/class-wc-ifthen-webdados.php
r3439612 r3444323 17 17 18 18 /* IDs */ 19 public $id = 'ifthen_for_woocommerce'; // Plugin ID 19 20 public $multibanco_id = 'multibanco_ifthen_for_woocommerce'; 20 21 public $mbway_id = 'mbway_ifthen_for_woocommerce'; … … 134 135 */ 135 136 public function __construct( $version ) { 137 // Check version 136 138 $this->version = $version; 137 139 $this->pro_add_on_active = function_exists( 'WC_IfthenPay_Pro' ); … … 237 239 home_url( '/wc-api/WC_GatewayReturn_IfThen_Webdados/' ) 238 240 ); 241 // Upgrade 242 $this->upgrade(); 239 243 // Hooks 240 244 $this->init_hooks(); … … 252 256 } 253 257 return self::$_instance; 258 } 259 260 /** 261 * Upgrades (if needed) 262 */ 263 private function upgrade() { 264 $db_version = get_option( $this->id . '_version', '' ); 265 if ( version_compare( $db_version, $this->version, '<' ) ) { 266 $this->debug_log( $this->id, 'Upgrade from ' . $db_version . ' to ' . $this->version . ' started' ); 267 // Update routines when upgrading to 11.3 or above - Remove old cron 268 if ( version_compare( $db_version, '11.3', '<' ) ) { 269 wp_clear_scheduled_hook( 'wc_ifthen_hourly_cron' ); 270 } 271 // Update routines when upgrading to 11.3.2 or above - Clear Action Scheduler errors 272 if ( version_compare( $db_version, '11.3.2', '<' ) ) { 273 // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching 274 global $wpdb; 275 // Get action IDs for wc_ifthen_hourly_cron with failed status 276 $failed_action_ids = $wpdb->get_col( 277 $wpdb->prepare( 278 "SELECT action_id FROM {$wpdb->prefix}actionscheduler_actions 279 WHERE hook = %s AND status = 'failed'", 280 'wc_ifthen_hourly_cron' 281 ) 282 ); 283 if ( ! empty( $failed_action_ids ) ) { 284 // Delete the failed actions 285 $wpdb->query( 286 $wpdb->prepare( 287 "DELETE FROM {$wpdb->prefix}actionscheduler_actions 288 WHERE hook = %s AND status = 'failed'", 289 'wc_ifthen_hourly_cron' 290 ) 291 ); 292 // Delete associated logs 293 $ids_placeholder = implode( ',', array_fill( 0, count( $failed_action_ids ), '%d' ) ); 294 $wpdb->query( 295 $wpdb->prepare( 296 "DELETE FROM {$wpdb->prefix}actionscheduler_logs 297 WHERE action_id IN ($ids_placeholder)", // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare, WordPress.DB.PreparedSQL.InterpolatedNotPrepared 298 $failed_action_ids 299 ) 300 ); 301 $this->debug_log( $this->id, 'Cleared ' . count( $failed_action_ids ) . ' failed Action Scheduler entries for wc_ifthen_hourly_cron' ); 302 } else { 303 $this->debug_log( $this->id, 'No failed Action Scheduler entries found for wc_ifthen_hourly_cron' ); 304 } 305 // phpcs:enable 306 } 307 update_option( $this->id . '_version', $this->version ); 308 $this->debug_log( $this->id, 'Upgrade from ' . $db_version . ' to ' . $this->version . ' finished' ); 309 } 254 310 } 255 311 … … 307 363 } 308 364 ); 365 add_action( 'wc_ifthen_hourly_cron', array( $this, 'action_scheduler_do_nothing' ) ); 309 366 // Cancel orders with expired references - Multibanco (after_setup_theme so it runs after theme's functions.php file) 310 367 add_action( … … 482 539 * Debug / Log 483 540 * 484 * @param string $gateway_id The payment gateway ID .541 * @param string $gateway_id The payment gateway ID or the main plugin ID. 485 542 * @param string $message The message to debug. 486 543 * @param string $level The debug level. … … 4027 4084 } 4028 4085 } 4086 4087 /** 4088 * Action scheduler task that does nothing 4089 * 4090 * Used to keep the Action Scheduler running and not looping 4091 */ 4092 public function action_scheduler_do_nothing() { 4093 // Do nothing - Make sure the task does not fail for lack of a hook 4094 } 4029 4095 } -
multibanco-ifthen-software-gateway-for-woocommerce/trunk/class-wc-mbway-ifthen-webdados.php
r3439612 r3444323 176 176 */ 177 177 private function upgrade() { 178 if ( version_compare( $this->get_option( 'version' ), $this->version, '<' ) ) { 178 $db_version = $this->get_option( 'version' ); 179 if ( version_compare( $db_version, $this->version, '<' ) ) { 179 180 $current_options = get_option( 'woocommerce_' . $this->id . '_settings', '' ); 180 181 if ( ! is_array( $current_options ) ) { … … 182 183 } 183 184 // Upgrade 184 $this->debug_log( 'Upgrade to ' . $this->version . ' started' );185 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' started' ); 185 186 // Specific versions upgrades should be here 186 187 // Update routines when upgrading to 11.0.1 or above - Fix some autoloaded options 187 if ( version_compare( $ this->get_option( 'version' ), '11.0.1', '<' ) ) {188 if ( version_compare( $db_version, '11.0.1', '<' ) ) { 188 189 $value = get_option( $this->id . '_callback_email_sent' ); 189 190 delete_option( $this->id . '_callback_email_sent' ); … … 193 194 $current_options['version'] = $this->version; 194 195 update_option( 'woocommerce_' . $this->id . '_settings', $current_options ); 195 $this->debug_log( 'Upgrade to ' . $this->version . ' finished' );196 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' finished' ); 196 197 } 197 198 } -
multibanco-ifthen-software-gateway-for-woocommerce/trunk/class-wc-multibanco-ifthen-webdados.php
r3439612 r3444323 172 172 */ 173 173 private function upgrade() { 174 if ( version_compare( $this->get_option( 'version' ), $this->version, '<' ) ) { 174 $db_version = $this->get_option( 'version' ); 175 if ( version_compare( $db_version, $this->version, '<' ) ) { 175 176 $current_options = get_option( 'woocommerce_' . $this->id . '_settings', '' ); 176 177 if ( ! is_array( $current_options ) ) { … … 178 179 } 179 180 // Upgrade 180 $this->debug_log( 'Upgrade to ' . $this->version . ' started' );181 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' started' ); 181 182 // Specific versions upgrades should be here 182 183 // Update routines when upgrading to 11.0.1 or above - Fix some autoloaded options 183 if ( version_compare( $ this->get_option( 'version' ), '11.0.1', '<' ) ) {184 if ( version_compare( $db_version, '11.0.1', '<' ) ) { 184 185 $value = get_option( $this->id . '_callback_email_sent' ); 185 186 delete_option( $this->id . '_callback_email_sent' ); 186 187 update_option( $this->id . '_callback_email_sent', $value, false ); 187 188 } 188 // Update routines when upgrading to 11.3 or above - Remove old cron - This is global to the but we do it here189 if ( version_compare( $this->get_option( 'version' ), '11.3', '<' ) ) {190 wp_clear_scheduled_hook( 'wc_ifthen_hourly_cron' );191 }192 189 // Upgrade on the database - Risky? 193 190 $current_options['version'] = $this->version; 194 191 update_option( 'woocommerce_' . $this->id . '_settings', $current_options ); 195 $this->debug_log( 'Upgrade to ' . $this->version . ' finished' );192 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' finished' ); 196 193 } 197 194 } -
multibanco-ifthen-software-gateway-for-woocommerce/trunk/class-wc-payshop-ifthen-webdados.php
r3439612 r3444323 165 165 */ 166 166 private function upgrade() { 167 if ( version_compare( $this->get_option( 'version' ), $this->version, '<' ) ) { 167 $db_version = $this->get_option( 'version' ); 168 if ( version_compare( $db_version, $this->version, '<' ) ) { 168 169 $current_options = get_option( 'woocommerce_' . $this->id . '_settings', '' ); 169 170 if ( ! is_array( $current_options ) ) { … … 171 172 } 172 173 // Upgrade 173 $this->debug_log( 'Upgrade to ' . $this->version . ' started' );174 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' started' ); 174 175 // Specific versions upgrades should be here 175 176 // Update routines when upgrading to 11.0.1 or above - Fix some autoloaded options 176 if ( version_compare( $ this->get_option( 'version' ), '11.0.1', '<' ) ) {177 if ( version_compare( $db_version, '11.0.1', '<' ) ) { 177 178 $value = get_option( $this->id . '_callback_email_sent' ); 178 179 delete_option( $this->id . '_callback_email_sent' ); … … 182 183 $current_options['version'] = $this->version; 183 184 update_option( 'woocommerce_' . $this->id . '_settings', $current_options ); 184 $this->debug_log( 'Upgrade to ' . $this->version . ' finished' );185 $this->debug_log( 'Upgrade from ' . $db_version . ' to ' . $this->version . ' finished' ); 185 186 } 186 187 } -
multibanco-ifthen-software-gateway-for-woocommerce/trunk/multibanco_ifthen_for_woocommerce.php
r3440233 r3444323 4 4 * Plugin URI: https://www.webdados.pt/wordpress/plugins/multibanco-ifthen-software-gateway-woocommerce-wordpress/ 5 5 * Description: Secure WooCommerce payments with Multibanco, MB WAY, Credit card, Apple Pay, Google Pay, Payshop, Cofidis, and PIX via ifthenpay’s payment gateway. 6 * Version: 11.3. 16 * Version: 11.3.2 7 7 * Author: Naked Cat Plugins (by Webdados) 8 8 * Author URI: https://nakedcatplugins.com -
multibanco-ifthen-software-gateway-for-woocommerce/trunk/readme.txt
r3440233 r3444323 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.2 7 Stable tag: 11.3. 17 Stable tag: 11.3.2 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 256 256 == Changelog == 257 257 258 = 11.3.2 - 2026-01-21 = 259 * [FIX] Add an empty function to the `wc_ifthen_hourly_cron` scheduled action to avoid loop issues on Action Scheduler, introduced on 11.3.0, and clear its failed logs (Thanks BestSites.pt for reporting) 260 * [DEV] Move global upgrade routines from the Multibanco to the main plugin class 261 258 262 = 11.3.1 - 2026-01-15 = 259 * [DEV] Remove unnecessary development folders from repository263 * [DEV] Remove unnecessary development folders from the repository 260 264 261 265 = 11.3.0 - 2026-01-14 =
Note: See TracChangeset
for help on using the changeset viewer.