• Hello

    i have problem when changing stock status for product variation.
    I am using this code in plugin:

    
    $_product_variation->set_stock_status( $stock_status );
    wc_update_product_stock( $_product_variation, $stock );
    wc_delete_product_transients( $product_variation_id );
    

    Out of stock visibility is set on hide, and manage stock is manage for each product or product variation.

    When i set stock status for product variation – outofstock, and qty – 0, everything working fine, variable product is hidden in product catalog.

    But, when is product variation set – instock and qty is more than 0, product is stil hidden. I must go into product admin screen and manually hit Update button.

    What i am missing?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Variable product visibility in catalog’ is closed to new replies.