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

  1. visualxl
    Posted 2 years 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?


  2. Gerhard Potgieter
    Plugin Author

    Posted 2 years 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