woocommerce_installed хук-событиеWC 3.2.0

Run after WooCommerce has been installed or updated.

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

add_action( 'woocommerce_installed', 'wp_kama_woocommerce_installed_action' );

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

	// action...
}

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

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

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

WC_Install::install()
woocommerce_installed
woocommerce/includes/class-wc-install.php 479
do_action( 'woocommerce_installed' );

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

woocommerce/includes/admin/class-wc-admin-notices.php 57
add_action( 'woocommerce_installed', array( __CLASS__, 'reset_admin_notices' ) );
woocommerce/includes/class-woocommerce.php 251
add_action( 'woocommerce_installed', array( $this, 'add_woocommerce_inbox_variant' ) );
woocommerce/includes/class-woocommerce.php 253
add_action( 'woocommerce_installed', array( $this, 'add_woocommerce_remote_variant' ) );
woocommerce/includes/wc-core-functions.php 2337
add_action( 'woocommerce_installed', 'wc_delete_expired_transients' );
woocommerce/src/Internal/ProductAttributesLookup/DataRegenerator.php 61
self::add_action( 'woocommerce_installed', array( $this, 'run_woocommerce_installed_callback' ) );