loxlie
Forum Replies Created
-
Forum: Plugins
In reply to: [SVG Support] Updating to Latest v2.5.13 – WordPress Critical ErrorHi there.
Yes I’ve just had a huge site down for several hours due to the inefficient function bodhi_svgs_cleanup_duplicate_meta. Cycling through my 90000 posts 100 at a time. ??Not sure why there’s a meta value for all anyway when they all have a value of ‘0’.
Anyway, had a chat with GPT and we came up with this vastly more efficient version that does it in one op:
function bodhi_svgs_cleanup_duplicate_meta()
{
global $wpdb;
// Delete all but the latestinline_featured_image
meta per post
$wpdb->query("
DELETE pm FROM {$wpdb->postmeta} pm
JOIN (
SELECT post_id, meta_id FROM (
SELECT post_id, meta_id,
ROW_NUMBER() OVER (PARTITION BY post_id ORDER BY meta_id DESC) AS row_num
FROM {$wpdb->postmeta}
WHERE meta_key = 'inline_featured_image'
) as duplicates
WHERE row_num > 1
) to_delete ON pm.meta_id = to_delete.meta_id
");
}Best wishes,
Loxlie
Forum: Plugins
In reply to: [Phone Orders for WooCommerce] Minimum quantities for productsConfirmed fixed, thanks.
Thanks for looking into this.
For anyone else with the issue, LastPass’s Chrome extension’s Advanced preferences has a “Respect AutoComplete=off” setting which fixes this. Don’t know if its new, and its off by default, but checking the option sorts the issue.Forum: Plugins
In reply to: [Phone Orders for WooCommerce] Cart contents remains for current userThat’s already set. The problem is the cart is left filled for the none-switched user.
Forum: Plugins
In reply to: [SVG Support] jQuery migrate errorAgreed – it would be very good to get this quick fix done – it clutters up the console. Just needs a change to:
$('#sanitize_svg_option input').on('change', function(){? ? ? ? sanitize_svg_option_check();
});I’m not sure what the script is doing but it should only really be enqueued when it’s required.
It’s these lines, in the Javascript file includes/js/alg-wc-eu-vat.js, line 160.
var vat_number_to_check = vat_input.val();
if ( undefined != vat_number_to_check ) {A blank value is “”, not “undefined”. As a quick fix, I added this line:
var vat_number_to_check = vat_input.val(); if(""===vat_number_to_check.trim()) vat_number_to_check = undefined; // Fix if ( undefined != vat_number_to_check ) {
It should now ignore any blank values (or if there’s just spaces entered).
I accidentally created a duplicate issue, which I’ve closed, but here’s more info from my topic. (It’s nothing to do with a particular config, so a report wouldn’t help.)
In PostmanSuggestProSocket.php there’s this:
$pluginData = apply_filters( 'postman_get_plugin_metadata', null ); wp_register_script( 'postman-suggest-pro-sockets', POST_SMTP_ASSETS . 'js/postman-suggest.js', array( 'jquery' ), $pluginData, true );
$pluginData is an array (with name and version fields). It should be passing just the version field to the register call, but it’s passing the whole thing. If other plugins try to read the version on the enqueue, they’ll be expecting a string.
(In my case, I’m using the simple Rebusted plugin, which appends the filemod date to the version string, and this causes an array to string conversion warning.)
They’re still there! ??
Forum: Plugins
In reply to: [Sequential Order Number for WooCommerce] Resend email error noticeThat’s great, thanks.
I’m still curious as to why it needs hooking to resend emails? (I tried unhooking it, but that stopped number generation for new orders.) Could you briefly explain what’s going on there please?
BTW I really like the new wt_sequential_is_old_order filter – very handy! We have lots of old imported orders from a previous site and that will help ensure they’re not renumbered.Forum: Plugins
In reply to: [Easy Appointments] choose multiple specific servicesI think you’d need to use JavaScript.
Using the event $(document).ajaxComplete(function(ev, xhr, settings), parse settings.url, check for the parameter ‘action’ = ‘ea_next_step’ and ‘next’ = ‘service’, then find the select box with name=”service” and filter the options there. (This is using the bootstrap form.)Forum: Plugins
In reply to: [Easy Appointments] URGENT – EasyAppointments plug-in – appointmentsMake sure “number of slots” is set to 1 for the connection. Then the worker should be made busy when they’re booked.
Forum: Plugins
In reply to: [Easy Appointments] Book worker for all services at a specific timeI think that should work by default as long as the “number of slots” is set to 1 for the connection.
Forum: Plugins
In reply to: [Easy Watermark] Watermarking in an automated processBrilliant. Got that working fine. (And great idea exposing the post fields in a magic getter – it meant I could use a back-end ACF post field to allow the client to select the watermark post to use for the importer, and then check in the filter so other watermarks aren’t affected.)
Just to clarify for others, the auto-watermark setting stays on, (or the filter is never hit) and the filter checks the context to potentially turn it off.
Thank you!Forum: Plugins
In reply to: [Central Color Palette] CSS variables in adminHere’s a way to get the current admin theme colors as CSS variables:
https://wordpress.stackexchange.com/a/369713/181870