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.8.1

do_action('woocommerce_product_set_stock_status') is found 1 times:

  • /includes/data-stores/class-wc-product-data-store-cpt.php line 881
    877
    878
    879
    880
    881
    882
    883
    884
    885
    886
    887
             * @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 );
        }
    }
     
    $props_in_lookup_table = 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' );
    if ( $this->cogs_feature_is_enabled() ) {
        $props_in_lookup_table[] = 'cogs_value';

See this hook used in plugins: