woocommerce_flush_rewrite_rules хук-событиеWC 2.7.0

Flush the rewrite rules after install or update.

Использование

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...
}

Список изменений

С версии 2.7.0 Введена.

Где вызывается хук

WC_Install::install()
woocommerce_flush_rewrite_rules
flush_rewrite_rules_on_shop_page_save()
woocommerce_flush_rewrite_rules
woocommerce/includes/class-wc-install.php 408
do_action( 'woocommerce_flush_rewrite_rules' );
woocommerce/includes/wc-core-functions.php 1199
do_action( 'woocommerce_flush_rewrite_rules' );

Где используется хук в WooCommerce

woocommerce/includes/class-wc-post-types.php 31
add_action( 'woocommerce_flush_rewrite_rules', array( __CLASS__, 'flush_rewrite_rules' ) );