action_scheduler_before_schema_update
Allow custom processing before updating a table schema.
Usage
add_action( 'action_scheduler_before_schema_update', 'wp_kama_action_scheduler_before_schema_update_action', 10, 2 ); /** * Function for `action_scheduler_before_schema_update` action-hook. * * @param string $table Name of table being updated. * @param string $db_version Existing version of the table being updated. * * @return void */ function wp_kama_action_scheduler_before_schema_update_action( $table, $db_version ){ // action... }
- $table(string)
- Name of table being updated.
- $db_version(string)
- Existing version of the table being updated.
Where the hook is called
action_scheduler_before_schema_update
woocommerce/packages/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schema.php 68
do_action( 'action_scheduler_before_schema_update', $table, $this->db_version );
Where the hook is used in WooCommerce
woocommerce/packages/action-scheduler/classes/schema/ActionScheduler_LoggerSchema.php 35
add_action( 'action_scheduler_before_schema_update', array( $this, 'update_schema_3_0' ), 10, 2 );
woocommerce/packages/action-scheduler/classes/schema/ActionScheduler_StoreSchema.php 40
add_action( 'action_scheduler_before_schema_update', array( $this, 'update_schema_5_0' ), 10, 2 );