woocommerce_new_product
Usage
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
- -
Where the hook is called
woocommerce_new_product
woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php 261
do_action( 'woocommerce_new_product', $id, $product );
Where the hook is used in WooCommerce
woocommerce/includes/class-wc-brands.php 53
add_action( 'woocommerce_new_product', array( $this, 'duplicate_add_product_brand_terms' ) );
woocommerce/includes/class-wc-brands.php 54
add_action( 'woocommerce_new_product', array( $this, 'invalidate_wc_layered_nav_counts_cache' ), 10, 0 );
woocommerce/includes/wc-product-functions.php 748
add_action( 'woocommerce_new_product', 'wc_maybe_schedule_product_sale_events', 10, 2 );
woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Products.php 27
add_action( 'woocommerce_new_product', array( $this, 'maybe_set_has_product_transient' ), 10, 2 );
woocommerce/src/Admin/ReportsSync.php 27
add_action( 'woocommerce_new_product', array( __CLASS__, 'clear_stock_count_cache' ) );
woocommerce/src/Internal/Caches/ProductVersionStringInvalidator.php 66
add_action( 'woocommerce_new_product', array( $this, 'handle_woocommerce_new_product' ), 10, 1 );