Hi @nauriskolats,
I can understand that you might not have checked SMS Alert.
But we feel there is a small issue in the plugin, which other users might be facing.
Your Free version Plugin sends an email to admin for abandoned carts
We are using that same hook to trigger sms whenever abandoned cart email is sent to admin, which is working fine for many of our users.
But it did not worked for a few customers like @sanjayemmbros
We firstly asked them to raise it to you as the admin email was not getting triggered(which we feel is a part of your plugin), but unfortunately as the user did not got a satisfactory revert from here, we took it forward and peeped into your code.
In woo-save-abandoned-carts\admin\class-cartbounty-admin.php
line 533
you are using something like below
$rows_to_email = $wpdb->get_var(
"SELECT COUNT(id) FROM ". $table_name ."
WHERE mail_sent = 0 AND cart_contents != '' AND time < (NOW() - INTERVAL ". CARTBOUNTY_STILL_SHOPPING ." MINUTE)"
);
but as you know many users are on shared hosting and do not have access to server, so they can not change servers time zone(for my sql), but the website has a different timezone(wordpress).
In short we think mysql “NOW()” should be replaced by php date function, something like below
$timezone = wp_timezone_string();
$datetime = get_gmt_from_date('UTC'.$timezone);
$time_interval = date('Y-m-d H:i:s',strtotime('-'.CARTBOUNTY_STILL_SHOPPING.' Minutes',strtotime($datetime)));
// Retrieve from database rows that have not been e-mailed and are older than 60 minutes
$rows_to_email = $wpdb->get_var(
"SELECT COUNT(id) FROM ". $table_name ."
WHERE mail_sent = 0 AND cart_contents != '' AND time < '". $time_interval."'"
);
Do let us know if any issues.
-
This reply was modified 4 years, 6 months ago by Cozy Vision.