action_scheduler_before_schema_update
Allow custom processing before updating a table schema.
Использование
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(строка)
- Name of table being updated.
- $db_version(строка)
- Existing version of the table being updated.
Где вызывается хук
action_scheduler_before_schema_update
woocommerce/packages/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schema.php 62
do_action( 'action_scheduler_before_schema_update', $table, $this->db_version );
Где используется хук в WooCommerce
woocommerce/packages/action-scheduler/classes/schema/ActionScheduler_LoggerSchema.php 31
add_action( 'action_scheduler_before_schema_update', array( $this, 'update_schema_3_0' ), 10, 2 );
woocommerce/packages/action-scheduler/classes/schema/ActionScheduler_StoreSchema.php 36
add_action( 'action_scheduler_before_schema_update', array( $this, 'update_schema_5_0' ), 10, 2 );