WordPress.org

Forums

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

  1. visualxl
    Member
    Posted 1 year 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. Kloon
    Member
    Plugin Author

    Posted 1 year 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
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce Sold Out Products
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic