WordPress.org

Support

Support » Plugins and Hacks » WooCommerce Sold Out Products » [Resolved] How To Detect When A Product Is Sold Out And Do Something?

[Resolved] How To Detect When A Product Is Sold Out And Do Something?

Viewing 1 replies (of 1 total)
  • Hi visualxl

    This is not really related to the plugin but here goes, the following code will detect if a product is sold out

    global $product;
    if ( ! $product->is_in_stock() ) {
        // your code here to execute when out of stock
    }
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] How To Detect When A Product Is Sold Out And Do Something?’ is closed to new replies.
Skip to toolbar