Home Forums WoodMart support forum Waitlist Feature Not Sending Back-in-Stock Notifications

Waitlist Feature Not Sending Back-in-Stock Notifications

Viewing 23 posts - 1 through 23 (of 23 total)
  • Author
    Posts
  • #683290

    vynil
    Participant

    Hey guys,

    I successfully received the “Confirm Subscription” email for the back-in-stock notification, indicating that the subscription process is working correctly. However, when the product was restocked, I did not receive the expected back-in-stock notification email, even though everything is configured and functioning properly.

    *The subscription confirmation process works as expected, and users are able to subscribe to back-in-stock notifications.
    *The product I was testing with was added back to stock, but no email notifications were sent to the subscribed users.
    *I confirmed that the system is properly set up and running, and the product is now available for restock notifications.
    *The issue seems to be that the back-in-stock email was not triggered upon restocking, despite the successful subscription confirmation.

    Can you please help me with this? Am I missing something here?

    #683505

    Artem Temos
    Keymaster

    Hello,

    Could you please disable all plugins that are not related to our theme and provide us your admin access so we can check it?

    Thank you in advance

    #683709

    vynil
    Participant

    Hey again,

    I tried to disabled all plugins but it didn’t help. Please find the attached details.

    #683715

    Artem Temos
    Keymaster

    As we can see, you have disabled the CRON mechanism on your website https://gyazo.com/0bf661aba4cf3a3a33d95f5b1d01f3bf
    Since our email functionality relies on this, you need to enable it to make it work.

    #683726

    vynil
    Participant

    Hey there Artem,

    Thanks for reaching out!

    I do have the following cron job in my cPanel set and running:

    cd /home/tipcheni/public_html/ && /usr/local/bin/php /home/tipcheni/public_html/wp-cron.php > /dev/null 2>&1

    Why are the other two emails working fine, except the last one — the ‘back in stock’ email?

    Thank you!

    #683737

    vynil
    Participant

    Hey again,

    I have another issue related with the Waitlist feature. The mentioned back in stock email can’t be translated via Loco Translate for some reason. The issue is on both staging and production websites. Even if the strings are translated, they appear in English in the email. The only translated strings are the subject and email heading in the Woo email settings, but they are not translated via po/ mo files.

    Please find the links below for Loco Translate theme translation.

    Attachments:
    You must be logged in to view attached files.
    #683740

    vynil
    Participant

    I forgot to say that email strings that are not being translated appear twice in Loco Translate, you can see in the screenshot attached above.

    #683885

    vynil
    Participant

    Hey guys,

    I’ve noticed another issue on my website that I would appreciate your help with:

    Emails Not Sent for Products with Cyrillic Slug:

    When a product has a Cyrillic slug, emails (such as order confirmations or notifications) are not being sent. This issue only occurs when the product slug contains Cyrillic characters. Could you please investigate the cause of this and help resolve it so that emails are sent correctly regardless of the language used in the slug?

    You can use the same credentials, change the product slug and try to subscribe to the waitlist.

    Thank you for your assistance with this matter.

    #683963

    Artem Temos
    Keymaster

    Hello,

    The command for cron jobs doesn’t work as expected. Actually, cron doesn’t work on your website. Other emails don’t use this mechanism, which is why they work correctly.

    As for the translation problem, apply the following patch 683829.

    Kind Regards

    #683969

    vynil
    Participant

    Many thanks! This did the trick. Best wishes!

    #683972

    Artem Temos
    Keymaster

    So now emails are also being sent? Have you sorted out the cron issue?

    #683997

    vynil
    Participant

    Hey again,

    I can confirm that the command works fine, because I tested it – it calls the wp-cron file without issues.

    Do you want to test this on your test website? I believe many users use the external cron jobs to call the wp cron file.

    I’m sure that the issue is with the theme, because the command works as it should.

    #684059

    Artem Temos
    Keymaster

    Hello,

    In this case, please provide us with a video and step by step instructions on how can we reproduce this and make sure that the command works and cron is executed.

    Kind Regards

    #684121

    vynil
    Participant

    You can easily test this on your website by adding the command as a cron job, execute it every single minute, subscribe to the waitlist and you will not receive an email. The command is working just fine.

    #684305

    Artem Temos
    Keymaster

    We can’t test this command since it is made for your server only. But it doesn’t call any cron jobs at the moment.
    You can try to put some code with a cron job and test on your website. Moreover, you can remove this command and revert standard WordPress cron mechanism and see that waitlist notifications work as expected.
    By doing that, you will make sure that the bug is not in our theme’s mechanism but in the fact that cron jobs don’t work on your website.

    #684367

    vynil
    Participant

    I already did that. I actually did that when I sent you my last message – the command worked and the cron log file was created when the cron job was executed. That’s why I told you that the cron job works on my server. It doesn’t work with your theme and the waitlist last email – back in stock alert.

    Can you please confirm that the theme works only with the default wp-cron mechanism?

    #684730

    Artem Temos
    Keymaster

    Could you please clarify where we can see the cron log file on your website to see that it works?

    #684886

    vynil
    Participant

    If you use the File Manager plugin to access the main directory of the website, you will see a file called
    cron_test.log which was created by executing the command mentioned in the thread here. So the command works just fine.

    I removed the /dev/null and added a log file output:
    cd /home/tipcheni/public_html/ && /usr/local/bin/php /home/tipcheni/public_html/wp-cron.php >> /home/tipcheni/public_html/cron_test.log 2>&1

    The result is the file that you will see in the directory.

    If you adapt the command for your hosting provider to execute the wp-cron.php as a cron job, you will be able to reproduce the issue.

    Attachments:
    You must be logged in to view attached files.
    #685000

    Artem Temos
    Keymaster

    Hello,

    The test you conducted shows that the commands runs but it doesn’t mean that WP cron work. To test if the cron mechanism works in general, add the following test cron code to the functions.php file in the child theme. It adds a message to the WooCommerce log every 5 minutes. Here is a screenshot https://gyazo.com/6c5ae96af432818bc78d25974c034fb7

    	add_filter('cron_schedules', function ($schedules) {
    		$schedules['every_five_minutes'] = [
    			'interval' => 300,
    			'display' => 'Every 5 Minutes'
    		];
    		return $schedules;
    	});
    
    	if (!wp_next_scheduled('wd_custom_wc_cron_job')) {
    		wp_schedule_event(time(), 'every_five_minutes', 'wd_custom_wc_cron_job');
    	}
    
    	add_action('wd_custom_wc_cron_job', function () {
    		if (class_exists('WC_Logger')) {
    			$logger = wc_get_logger();
    			$context = ['source' => 'wd-custom-cron'];
    			$logger->info('Cron executed at: ' . current_time('mysql'), $context);
    		}
    	});

    Kind Regards

    #685024

    vynil
    Participant

    Thank you, you can close the thread.

    #685039

    Artem Temos
    Keymaster

    Could you please clarify if you solved the issue? And what was the problem?

    #685041

    vynil
    Participant

    The problem is that when I run a cron job through the cPanel, the waitlist is not working. I had to turn back to the default wordpress mechanism.

    #685058

    Artem Temos
    Keymaster

    Great, we are glad that you sorted it out. Feel free to contact us if you have any further questions.

Viewing 23 posts - 1 through 23 (of 23 total)

The topic ‘Waitlist Feature Not Sending Back-in-Stock Notifications’ is closed to new replies.