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

Run when WooCommerce has been installed for the first time.

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

add_action( 'woocommerce_admin_newly_installed', 'wp_kama_woocommerce_admin_newly_installed_action', 10, 3 );

/**
 * Function for `woocommerce_admin_newly_installed` action-hook.
 * 
 * @param  $array           
 * @param  $wc_code_version 
 * @param  $string          
 *
 * @return void
 */
function wp_kama_woocommerce_admin_newly_installed_action( $array, $wc_code_version, $string ){

	// action...
}
$array
-
$wc_code_version
-
$string
-

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

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

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

WC_Install::check_version()
woocommerce_admin_newly_installed
woocommerce/includes/class-wc-install.php 262
do_action_deprecated( 'woocommerce_admin_newly_installed', array(), $wc_code_version, 'woocommerce_newly_installed' );

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

woocommerce/src/Internal/Admin/Notes/CouponPageMoved.php 38
add_action( 'woocommerce_admin_newly_installed', [ $this, 'disable_legacy_menu_for_new_install' ] );