woocommerce_flush_rewrite_rules
Flush the rewrite rules after install or update.
Usage
add_action( 'woocommerce_flush_rewrite_rules', 'wp_kama_woocommerce_flush_rewrite_rules_action' ); /** * Function for `woocommerce_flush_rewrite_rules` action-hook. * * @return void */ function wp_kama_woocommerce_flush_rewrite_rules_action(){ // action... }
Changelog
Since 2.7.0 | Introduced. |
Where the hook is called
woocommerce_flush_rewrite_rules
woocommerce/includes/class-wc-install.php 453
do_action( 'woocommerce_flush_rewrite_rules' );
woocommerce/includes/wc-core-functions.php 1198
do_action( 'woocommerce_flush_rewrite_rules' );
Where the hook is used in WooCommerce
woocommerce/includes/class-wc-post-types.php 31
add_action( 'woocommerce_flush_rewrite_rules', array( __CLASS__, 'flush_rewrite_rules' ) );