Simon Kane
Forum Replies Created
-
Fix makes sense to me!
I’ll try it soonest. I’m so confident it’ll work, I’m marking as resolved. 🙂
and thanks for noticing (“he was impressed with the professional approach and precise description of the issue.”).
Maybe now I won’t be moderated by the WP gang any more. 😉
Forum: Plugins
In reply to: [REST API Log] Plugin slowing down REST APIHi!
I’m not the plugin dev, but the plugin logs it’s data to wp_posts.
In my case, especially with the new Woo Dashboard, I was getting thousand of rows added to that DB table.
You might want to see how big yours is, clean it out, or whatever.
I opened a thread asking the dev to use their own table instead of wp_posts, but check the list of open issues for this plugin – it’s looking like it may have been abandoned.
Yes – Woo’s new “dashboard” with the “analytics” is going to be a bigger and bigger issue over time. I posted some info about how to leave the dashboard enabled, but still kill the biggest server eater – the wc-analytics background tasks.
https://wordpress.org/support/topic/plugin-breaks-woocommerce-payments/I am hoping the dev and I get back in touch and maybe integrate some/all of it – I’ve had to set it aside while doing the production rollout for my client that ran into it.
Whether using some/all of what’s in that thread works for this case – I do not know.
Not sure what you mean by “all” pages.
I use that option, and Woo-based (Shop, my-account, etc.) pages show the notice – other pages (like About and Contact – at least the way I created them) do not show the notice.
I found something else. My mod breaks the Woo Customers table.
At least I think it’s my fault. Probably due to killing the wc-analytics REST API.If you “Disable WooCommerce Admin” via the checkbox, the “Customers” option disappears entirely. So, if I/we want to keep using “WooCommerce Payments” cleanly, I/we should find a way to kill the “Customers” menu option of Woo without using the “Disable WooCommerce Admin” feature. This will avoid users seeing the error you get.
Any idea where that lives? And/or any other analysis of how to kill the resource hog background tasks besides my method?
Forum: Reviews
In reply to: [Media Sync] Poorly developedI don’t know why your site is not generating thumbnails, but it does so quite nicely on mine. The plugin uses the standard WordPress media import functions, so something else must be going on.
As for the code, I’ve been a programmer for 5 decades, and I’ve been in the plugin’s code working on an enhancement, and I found it to be well-written, and the UI to be pretty intuitive myself.
Hi!
Maybe I can help. I was confused between “Product Image” and “Product Gallery” for a while. I use the StoreFront theme (in case that’s relevant – dunno).
The primary product image is separate from the gallery, and is stored in the WordPress standard location (post_meta._thumbnail_id). The rest of the images are unique to WooCommmerce, and are stored in post_meta._product_image_gallery.
When StoreFront theme (and most/all others?) displays the product, it grabs both metas, and handles it all automagically.
SO – my gut says you’re trying to fix something where the product doesn’t have a primary image (_thumbnail_id), and the first entry in _product_image_gallery really needs to be in the _thumbnail_id. If so, it looks like you’re trying to treat the symptom (seeing the placeholder instead of the first image) instead of the cause.
If I’m right, to treat the cause, you would MOVE the first item in the gallery list over to the thumbnail. If it’s a recurring thing due to some bad code elsewhere that doesn’t build the thumbnail & gallery correctly, that needs to be addressed, too.
Forum: Plugins
In reply to: [Media Sync] Enhancements?Check your email – I just sent a zip containing the enhanced MediaSync.class.php, and the relevant parts of my child-theme’s functions.php (as an example of why I need this filter).
Forum: Plugins
In reply to: [Disable Bloat for WordPress & WooCommerce] Crashes my siteAre these all part of the new Admin Dashboard like Marketing?
“WooCommerce Payments” is. Is that what you refer to by “Stripe Gateway”?
If not, might that be the plugin that got integrated as Woo Payments?I know nothing about the other two, but have you checked “Disable WooCommerce Admin”? That will kill a LOT of things – which is great if you don’t use them.
I got involved here when I discovered that option kills WooCommerce Payments.
So, I wrote some code (which the dev is evaluating) to allow for granular control over the different features, while still eliminating the monster (Analytics REST API).Look here for further information:
https://wordpress.org/support/topic/plugin-breaks-woocommerce-payments/#post-13567152To state it another way, the Woo Admin Dashboard infrastructure is needed to allow various other features like “Woocommerce Payments”.
So – using the master “Disable” checkbox can not be used by everybody.
Having granular controls (Marketing, Analytics, Payments, etc.) keeps some of the bloat away – but the big monster seems to be the REST API calls – which I solved above.
Hi!
I think I already addressed this above.
https://wordpress.org/support/topic/plugin-breaks-woocommerce-payments/#post-13518390
1. I found “wc_admin_get_feature_config”
2. I found how to kill the Analytics items (the ‘unset’s that I dropped into the “wrong” place (function disable_features) for testing – as I mentioned. The last 3 lines (first is $marketing ….) are yours.If you clone your “kill marketing” feature (renames as needed), add the feature control, and use my unset code.
Same concept with other features in that first list – I would think.
THEN – the big fix (kills the background server-killing tasks) is my ‘kill_wc_analytics_endpoints’ filter —
just don’t forget to remove that stray bang (!) in front of the fnmatch.I think I would implement that as a separate sub-feature of the “kill analytics” new feature that is a clone of “kill marketing”.
Forum: Plugins
In reply to: [Media Sync] Enhancements?Having looked into the wp_posts and wp_post_meta table entries like post_excerpt, _wp_attachment_metadata, and _wp_attachment_image_alt, it becomes obvious that to use data from “some other CMS”, both a translation of the item name, and it’s location (which table), is needed. It gets very huge very quickly.
I do note that the standard WordPress Import Tool has add-ons for some other CMSs for importing posts and such — but I see no mention of media files. Possibly there are dedicated plugins that can assist @hobbiasztalos.
Meanwhile – I have the new filter written, and initial tests are A-OK. I am now off to write my site-specific code that uses it. While I am sure that the filter won’t need to be changed any, I have been wrong before, so I’m going to hold off sending it until I actually test the filter’s operation with the piece that uses the filter. 😉
Forum: Plugins
In reply to: [Media Sync] Enhancements?Your idea can very rapidly get very complex.
There are many widely divergent storage methods used by other CMSs.
Cross-system code maintenance isn’t just “double”, but exponential.
Been there, done that, more than once. LOLFrom the plugin’s point of view, filter/action points make the most sense.
I haven’t researched the existing ones beyond finding they didn’t fit my needs, but the one I am working on (written but not yet tested – see above), may be enough. It will allow for modifying the metadata, and the base attachment (wp_posts row) is already created, so could be directly modified by the filter code.
I will be using it to connect the newly imported media file to existing items (pages and WooCommerce products) based on the filenames (which I have “controlled” for ease of doing this). Possibly that thought can help your needs.
WooCommerce ALSO does not have “delivered” or “Partially Shipped” order statuses – but you add THOSE.
[ad hominem attack removed]
- This reply was modified 5 years, 9 months ago by Steven Stern (sterndata).
It appears that you do not know what “hard-coded” means.
THIS is ‘hard-coded’ (and likely not all occurrences of it in the plugin):
class-wc-advanced-shipment-tracking.php lines 582, 637, 999, 1096:
$order->update_status(‘completed’);You are assuming that “no matter what” the order should be marked as ‘completed’ if all items have been shipped. That is extremely presumptuous on your part as I outlined in my previous reply. ‘completed’ is defined in Woo as “no further actions need to be done for this order”. I’m not sure, but it seems to me that this actually conflicts with your own “Delivered” status that I think is returned by TrackShip if in use.
Something similar to the following needs to be done:
Add this after line 297 (and supporting code in admin and maybe elsewhere):
$wc_ast_status_fully_shipped = get_option(‘wc_ast_status_fully_shipped’);and change the lines noted above to be:
$order->update_status($wc_ast_status_fully_shipped);A typical user-created custom status for the above value would be ‘fully-shipped’,
thereby allowing the site’s applicable business rules to be executed.Of course, this may not be 100% correct, but a programmer will understand
the issue and what needs to be done.