| @@ -3,9 +3,9 @@ | ||
| 3 | 3 | /** |
| 4 | 4 | * Plugin Name: WP Data Access |
| 5 | 5 | * Plugin URI: https://wpdataaccess.com/ |
| 6 | 6 | * Description: A powerful data-driven App Builder with an intuitive Table Builder, a highly customizable Form Builder and interactive Chart support in 35 languages |
| 7 | - * Version: 5.5.81 | |
| 7 | + * Version: 5.5.84 | |
| 8 | 8 | * Author: Passionate Programmers B.V. |
| 9 | 9 | * Author URI: https://wpdataaccess.com/ |
| 10 | 10 | * Text Domain: wp-data-access |
| 11 | 11 | * License: GPL-2.0+ |
| @@ -278,8 +278,21 @@ | ||
| 278 | 278 | } |
| 279 | 279 | // phpcs:enable WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQLPlaceholders, WordPress.DB.DirectDatabaseQuery.SchemaChange |
| 280 | 280 | } |
| 281 | 281 | |
| 282 | + function wpda_unschedule_event( $hook ) { | |
| 283 | + $crons = _get_cron_array(); | |
| 284 | + foreach ( $crons as $timestamp => $cron ) { | |
| 285 | + if ( isset( $cron[$hook] ) ) { | |
| 286 | + foreach ( $cron[$hook] as $event ) { | |
| 287 | + if ( isset( $event['args'] ) ) { | |
| 288 | + wp_unschedule_event( $timestamp, $hook, $event['args'] ); | |
| 289 | + } | |
| 290 | + } | |
| 291 | + } | |
| 292 | + } | |
| 293 | + } | |
| 294 | + | |
| 282 | 295 | /** |
| 283 | 296 | * Uninstall WP Data Access tables, options and meta keys |
| 284 | 297 | * |
| 285 | 298 | * @return void |
| @@ -301,8 +314,12 @@ | ||
| 301 | 314 | // Uninstall on single site installation. |
| 302 | 315 | wpda_uninstall_blog(); |
| 303 | 316 | } |
| 304 | 317 | WPDA::wpda_delete_content_folder(); |
| 318 | + // Unscheduled all WP Data Access events | |
| 319 | + wpda_unschedule_event( 'wpda_data_backup' ); | |
| 320 | + wpda_unschedule_event( \WPDataAccess\Query_Builder\WPDA_Query_Builder_Scheduler::SCHEDULER_HOOK_NAME ); | |
| 321 | + wpda_unschedule_event( \WPDataAccess\Utilities\WPDA_Export_Scheduler::SCHEDULER_HOOK_NAME ); | |
| 305 | 322 | } |
| 306 | 323 | |
| 307 | 324 | wpda_freemius()->add_action( 'after_uninstall', 'wpda_uninstall' ); |
| 308 | 325 | /** |