woocommerce_new_product
Использование
add_action( 'woocommerce_new_product', 'wp_kama_woocommerce_new_product_action', 10, 2 ); /** * Function for `woocommerce_new_product` action-hook. * * @param $id * @param $product * * @return void */ function wp_kama_woocommerce_new_product_action( $id, $product ){ // action... }
- $id
- -
- $product
- -
Где вызывается хук
woocommerce_new_product
woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php 227
do_action( 'woocommerce_new_product', $id, $product );
Где используется хук в WooCommerce
woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Products.php 27
add_action( 'woocommerce_new_product', array( $this, 'delete_product_count_cache' ) );
woocommerce/src/Admin/ReportsSync.php 27
add_action( 'woocommerce_new_product', array( __CLASS__, 'clear_stock_count_cache' ) );