• 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:

    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 6 months, 3 weeks ago by m-zurowski. Reason: i fixed it myself
Viewing 1 replies (of 1 total)
  • Plugin Support Alessio Torrisi

    (@alessio91)

    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.