woocommerce_product_set_visibility
Usage
add_action( 'woocommerce_product_set_visibility', 'wp_kama_woocommerce_product_set_visibility_action', 10, 2 ); /** * Function for `woocommerce_product_set_visibility` action-hook. * * @param $product_id * @param $product_catalog_visibility * * @return void */ function wp_kama_woocommerce_product_set_visibility_action( $product_id, $product_catalog_visibility ){ // action... }
- $product_id
- -
- $product_catalog_visibility
- -
Where the hook is called
woocommerce_product_set_visibility
woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php 877
do_action( 'woocommerce_product_set_visibility', $product->get_id(), $product->get_catalog_visibility() );
Where the hook is used in WooCommerce
woocommerce/includes/class-wc-post-data.php 40
add_action( 'woocommerce_product_set_visibility', array( __CLASS__, 'delete_product_query_transients' ) );