get_col( $wpdb->prepare( "SELECT option_name FROM {$wpdb->options} WHERE option_name LIKE %s OR option_name LIKE %s OR option_name LIKE %s OR option_name LIKE %s", $wpdb->esc_like( 'activelayer_fluentforms_form_' ) . '%', $wpdb->esc_like( 'activelayer_sureforms_form_' ) . '%', $wpdb->esc_like( 'activelayer_ws_form_form_' ) . '%', $wpdb->esc_like( 'activelayer_funnelkit_form_' ) . '%' ) ); if ( $activelayer_per_form_rows ) { foreach ( $activelayer_per_form_rows as $activelayer_per_form_option ) { delete_option( $activelayer_per_form_option ); } } /** * Delete transients. */ delete_transient( 'activelayer_subscription_stats' ); delete_transient( 'activelayer_activation_redirect' ); /** * Drop custom database tables. */ $activelayer_table_name = $wpdb->prefix . 'activelayer_submissions'; $activelayer_table_to_drop = esc_sql( $activelayer_table_name ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.SchemaChange -- Required for uninstall cleanup, table name sanitized. $wpdb->query( "DROP TABLE IF EXISTS `{$activelayer_table_to_drop}`" ); /** * Delete Action Scheduler actions * Plugin uses these hooks: * - activelayer_process_submission * - activelayer_cleanup_pending * - activelayer_refresh_subscription_stats * - activelayer_queue_watchdog * - activelayer_retry_failed_submissions * - activelayer_cleanup_submissions * - activelayer_send_feedback */ if ( function_exists( 'as_unschedule_all_actions' ) ) { as_unschedule_all_actions( 'activelayer_process_submission' ); as_unschedule_all_actions( 'activelayer_cleanup_pending' ); as_unschedule_all_actions( 'activelayer_refresh_subscription_stats' ); as_unschedule_all_actions( 'activelayer_queue_watchdog' ); as_unschedule_all_actions( 'activelayer_retry_failed_submissions' ); as_unschedule_all_actions( 'activelayer_cleanup_submissions' ); as_unschedule_all_actions( 'activelayer_send_feedback' ); } // Clear standard WP-Cron hook if Action Scheduler unavailable. wp_clear_scheduled_hook( 'activelayer_queue_watchdog' ); /** * Clear ActiveLayer cache entries. */ if ( function_exists( 'wp_cache_delete' ) ) { wp_cache_delete( 'list_cache_version', ACTIVELAYER_CACHE_GROUP ); wp_cache_delete( 'queue_stats', ACTIVELAYER_CACHE_GROUP ); wp_cache_delete( 'table_exists', ACTIVELAYER_CACHE_GROUP ); } /** * Remove watchdog state options. */ delete_option( 'activelayer_last_queue_run' ); delete_option( 'activelayer_queue_watchdog_notice' ); if ( is_multisite() ) { delete_site_option( 'activelayer_last_queue_run' ); delete_site_option( 'activelayer_queue_watchdog_notice' ); }