woocommerce_product_set_stock_status

woocommerce_product_set_stock_status

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

do_action('woocommerce_product_set_stock_status') is found 1 times:

  • /includes/data-stores/class-wc-product-data-store-cpt.php line 791
    				 * @param int        $product_id   The ID of the product.
    				 * @param string     $stock_status The new stock status of the product.
    				 * @param WC_Product $product      The product object.
    				 */
    				do_action( 'woocommerce_product_set_stock_status', $product->get_id(), $product->get_stock_status(), $product );
    			}
    		}
    
    		if ( array_intersect( $this->updated_props, array( 'sku', 'global_unique_id', 'regular_price', 'sale_price', 'date_on_sale_from', 'date_on_sale_to', 'total_sales', 'average_rating', 'stock_quantity', 'stock_status', 'manage_stock', 'downloadable', 'virtual', 'tax_status', 'tax_class' ) ) ) {
    			$this->update_lookup_table( $product->get_id(), 'wc_product_meta_lookup' );
    		}
    

See this hook used in plugins: