Sam
Forum Replies Created
-
Forum: Plugins
In reply to: [Autoptimize] Does plugin serve adaptive images?Ok thanks for your help! Appreciate the input 🙂
Forum: Plugins
In reply to: [Autoptimize] Does plugin serve adaptive images?Ok so with SPAI it handles next-gen delivery via SP CDN and it does the lazy loading as well as far as I’m aware?
If I use SPAI then I just need to turn off both image optimization settings in AO right?
Then I have SPIO optimising the images on server, and SPAI serving adaptive images loading in next gen from CDN also lazy loading – and just use AO for the files minifying work?
Have I understood all that right?
Forum: Plugins
In reply to: [Autoptimize] Product pages JS/CSS arent being minifiedOk thanks for the explanation. I will look into it further my end 🙂
Forum: Plugins
In reply to: [Autoptimize] Product pages JS/CSS arent being minifiedThanks for that – the update you suggested has now minified the files which is good thanks – but semrush still has a warning saying that these 5 product pages are all using too many js/css files (113 files per page) is that still something AO would fix?
And when you say “it would be better to allow WordPress to serve those minified files to begin with” – thats fine for me to update yes, how would I do that please?
Thanks again!
Forum: Plugins
In reply to: [Autoptimize] Does plugin serve adaptive images?Ok thanks. So to properly serve adaptive images I would need to use Short Pixel Adaptive Images plugin instead of SPIO?
And still serve next gen images from AO via SP CDN?
thanks
Forum: Plugins
In reply to: [Autoptimize] Product pages JS/CSS arent being minifiedNothing – see below the plugin settings:

Hi @lovingbro & @doublezed2
thank you for explaining this to me, helpful to narrow down the workflow even further. And yes its very clear that it’s a compatibility issue between the 2 plugins – which is bizarre when this function is only available with this plugin combo.
As to your questions – this issue has happened the entire time, there wasn’t a time when the duplication did not happen. It is a new site yes, and it happens on both the live site and the staging site. So its not any additional plugin conflict causing it and also doesnt get fixed on a fresh new wordpress.
And with a normal non-auction product, the New Order email and payment is all processed correctly with no duplication, so yes its an issue with how the auction plugin handles post-auction payment events and email triggers as you say.
Thank you!
Yes that was my thoughts as well, this shouldnt be happening normally, but I cant figure out where the issue is coming from and the attempt of php was a workaround.
This issue is only appearing with auction products. With a regular non-auction product, all emails get sent correctly and there is no problem there.
With only woocommerce and auctions active, (everything else deactivated) and not stripe either – the New Order emails do not get sent. See logs here: https://snipboard.io/IWTRZH.jpg
Then I activated the stripe plugin and then the issue happens. See logs here: https://snipboard.io/ubepHK.jpg So it is a clear issue between the auction and the stripe plugins.
Let me know what your thoughts are on what’s next?
thanks again for the help
Hi,
So the plugin FluentSMTP plugin is installed to show email logs, and yes the emails are being generated and duplicated. I have been given some php code to prevent the duplication of emails which did the job but it also stripped the recipient email field of those emails. See below the 2 screenshots showing these.
Email logs showing duplicates: https://snipboard.io/QAyuGp.jpg
Email logs showing no duplicates but recipient email field stripped: https://snipboard.io/4OXa9p.jpg
php code that prevented duplication is at end of this message.
Let me know what you think and if you want me to give you access to the staging site?
Thanks
Sam
<?php
/**
* Prevent duplicate WooCommerce order emails ('new_order', 'customer_processing_order')
* by checking if the same email for the same order was sent within the last 60 seconds.
*
* @param string $recipient The recipient list.
* @param WC_Order|false $order The order object.
* @return string|false The recipient list, or false to prevent sending.
*/
function wg_prevent_duplicate_order_emails_based_on_transient( $recipient, $order ) {
// Ensure we have a valid order object
if ( ! $order instanceof WC_Order ) {
return $recipient;
}
// Get the email ID from the filter hook being processed
// Example filter: 'woocommerce_email_recipient_new_order' -> 'new_order'
$filter_name = current_filter();
// Extract the email ID (e.g., 'new_order' or 'customer_processing_order')
// This pattern looks for the last part after '_recipient_'
if ( preg_match( '/_recipient_([a-zA-Z0-9_]+)$/', $filter_name, $matches ) ) {
$email_id = $matches[1];
} else {
// Could not determine email ID, let the email send
return $recipient;
}
// Check only for the specific email IDs known to duplicate
$target_email_ids = array( 'new_order', 'customer_processing_order' );
if ( ! in_array( $email_id, $target_email_ids ) ) {
// Not one of the emails we're checking, let it send
return $recipient;
}
$order_id = $order->get_id();
// Create a unique transient key for this specific email and order
$transient_key = 'email_sent_' . $email_id . '_' . $order_id;
// Check if the transient exists (meaning the email was sent recently)
if ( get_transient( $transient_key ) ) {
// Transient exists, likely a duplicate send within the timeout period. Block it.
return false; // Returning false prevents the email from sending
} else {
// Transient does not exist. Set it now with a short expiry (e.g., 60 seconds).
set_transient( $transient_key, 'yes', 60 );
// Allow the email to send by returning the original recipient list
return $recipient;
}
}
// Add the filter for the admin new order email
add_filter( 'woocommerce_email_recipient_new_order', 'wg_prevent_duplicate_order_emails_based_on_transient', 10, 2 );
// Add the filter for the customer processing order email
add_filter( 'woocommerce_email_recipient_customer_processing_order', 'wg_prevent_duplicate_order_emails_based_on_transient', 10, 2 );
?>Hi Zubair,
Thanks for responding here. And yes I have already run these tests with an empty WP & WC setup with no other plugins, and the issue is exactly as explained again.
Here is system report: https://pastebin.com/urb3mYw3
Thanks for the help!
Forum: Plugins
In reply to: [Site Kit by Google - Analytics, Search Console, AdSense, Speed] AnalyticsI am having the exact same issue. cannot get Analytics to load and that loading bar keeps on going forever. I have tried on other browsers and incognito and issue is always there.
I havent even got to seleting a property stage yet.
thanks please help!
Hi @kmacharia
sure here is that image again: https://snipboard.io/rud2Wq.jpg
notification settings for the form that isnt working: https://snipboard.io/fjwTq2.jpg
and the form that does work: https://snipboard.io/uVtJof.jpg
thanks again
Hi @kmacharia
thanks for replying to this and for the suggestion, but I already have an SMTP plugin configure to do exactly that. And yes the notifications settings are the same on both.
I have also now been told that this message is being shown when a user tries to submit the form on multiple attempts:

Ok but what about all the individual page level seo copy and stuff i have set in the yoast section of each page?
will that all be safe and not need to redo all of that?Just following up here – I have disabled the repcaptcha for now so the form can still work for the time being. But I do need this issue to be fixed please.
thanks again