Title: chatGPT was able to fix this, lol
Last modified: September 2, 2024

---

# chatGPT was able to fix this, lol

 *  [m-zurowski](https://wordpress.org/support/users/darkwombat96/)
 * (@darkwombat96)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/doesnt-send-anything/)
 * ok, my initial review was “it simply doesn’t work”, but with help of chatGPT 
   and 4h of dedication i managed to fix this.
   Just add this code as a snippet:
 *     ```wp-block-code
       function trigger_yith_waitlist_emails_for_all_products( $product_id ) {    $product = wc_get_product( $product_id );    if ( $product && $product->is_in_stock() ) {        YITH_WCWTL_Mailer()->schedule_email_send( $product );        error_log('Scheduled YITH Waitlist Email for Product ID ' . $product_id);    }}add_action( 'woocommerce_product_set_stock_status', 'trigger_yith_waitlist_emails_for_all_products', 10, 1 );
       ```
   
    -  This topic was modified 1 year, 7 months ago by [m-zurowski](https://wordpress.org/support/users/darkwombat96/).
      Reason: i fixed it myself

Viewing 1 replies (of 1 total)

 *  Plugin Support [Alessio Torrisi](https://wordpress.org/support/users/alessio91/)
 * (@alessio91)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/doesnt-send-anything/#post-18017142)
 * Hello there,
 * I’m sorry to read your negative evaluation about our product.
 * I can’t event find a topic by you about this, so no chance for us to support 
   on your problem.
 * Plugin use scheduled actions to send email so some minute could be pass from 
   the moment you click on the sending button.

Viewing 1 replies (of 1 total)

The topic ‘chatGPT was able to fix this, lol’ is closed to new replies.

 * ![](https://ps.w.org/yith-woocommerce-waiting-list/assets/icon.svg?rev=3307141)
 * [YITH WooCommerce Waitlist](https://wordpress.org/plugins/yith-woocommerce-waiting-list/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yith-woocommerce-waiting-list/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yith-woocommerce-waiting-list/)
 * [Active Topics](https://wordpress.org/support/plugin/yith-woocommerce-waiting-list/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yith-woocommerce-waiting-list/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yith-woocommerce-waiting-list/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Alessio Torrisi](https://wordpress.org/support/users/alessio91/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/doesnt-send-anything/#post-18017142)