WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce Sold Out Products
[resolved] How To Detect When A Product Is Sold Out And Do Something? (2 posts)

  1. visualxl
    Member
    Posted 7 months ago #

    How do I do this?

    I want to be able to allow customers to subscribe to my mailing list when a product is sold out? How do I do that?

    http://wordpress.org/plugins/woocommerce-sold-out-products/

  2. Gerhard
    Member
    Plugin Author

    Posted 5 months ago #

    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
    }

Reply

You must log in to post.

About this Plugin

About this Topic