woocommerce_newly_installed хук-событиеWC 6.5.0

Run when WooCommerce has been installed for the first time.

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

add_action( 'woocommerce_newly_installed', 'wp_kama_woocommerce_newly_installed_action' );

/**
 * Function for `woocommerce_newly_installed` action-hook.
 * 
 * @return void
 */
function wp_kama_woocommerce_newly_installed_action(){

	// action...
}

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

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

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

WC_Install::newly_installed()
woocommerce_newly_installed
woocommerce/includes/class-wc-install.php 298
do_action( 'woocommerce_newly_installed' );

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

woocommerce/includes/class-wc-install.php 272
add_action( 'woocommerce_newly_installed', array( __CLASS__, 'maybe_enable_hpos' ), 20 );
woocommerce/src/Internal/Admin/Notes/CouponPageMoved.php 38
add_action( 'woocommerce_newly_installed', [ $this, 'disable_legacy_menu_for_new_install' ] );