kubik101
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] delete all orders and customers from systemI have spent a bit of time working the following out.
My objective was to duplicate an existing WooCommerce site and retain products only.
This meant I wanted to delete: Orders, Customers, Analytics data, Product Reviews etc.
Please note the query below deletes all comments, so BE WARNED.
Obviously backup database and test in a development environment.
Please note: When working on my local setup using MAMP phpMyAdmin, I was getting a timeout error on Step 3: so what i did was create a new database on live hosting and imported the live into that, so I had a duplicate I could work on. Ran all the queries there, then exported and imported into my local from there.
-- Step 1 - Delete orders -- Disable foreign key checks temporarily SET FOREIGN_KEY_CHECKS = 0; -- Delete order items DELETE FROM wp_woocommerce_order_items WHERE order_id IN (SELECT ID FROM wp_posts WHERE post_type = 'shop_order'); -- Delete order item meta DELETE FROM wp_woocommerce_order_itemmeta WHERE order_item_id IN (SELECT order_item_id FROM wp_woocommerce_order_items WHERE order_id IN (SELECT ID FROM wp_posts WHERE post_type = 'shop_order')); -- Delete order notes DELETE FROM wp_comments WHERE comment_post_ID IN (SELECT ID FROM wp_posts WHERE post_type = 'shop_order'); -- Delete order note meta DELETE FROM wp_commentmeta WHERE comment_id IN (SELECT comment_ID FROM wp_comments WHERE comment_post_ID IN (SELECT ID FROM wp_posts WHERE post_type = 'shop_order')); -- Delete order data (post meta) DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type = 'shop_order'); -- Delete orders DELETE FROM wp_posts WHERE post_type = 'shop_order'; -- Enable foreign key checks SET FOREIGN_KEY_CHECKS = 1; -- Step 2: Delete analytics data -- Disable foreign key checks temporarily SET FOREIGN_KEY_CHECKS = 0; -- Delete data from order stats table DELETE FROM wp_wc_order_stats; -- Delete data from order product lookup table DELETE FROM wp_wc_order_product_lookup; -- Delete data from product meta lookup table DELETE FROM wp_wc_product_meta_lookup; -- Enable foreign key checks SET FOREIGN_KEY_CHECKS = 1; -- Step 3: Remove users with role customer -- Create a temporary table to store user IDs of customers CREATE TEMPORARY TABLE temp_customers AS SELECT DISTINCT user_id FROM wp_usermeta WHERE meta_key LIKE '%capabilities%' AND meta_value LIKE '%customer%'; -- Disable foreign key checks temporarily SET FOREIGN_KEY_CHECKS = 0; -- Delete user meta data DELETE FROM wp_usermeta WHERE user_id IN (SELECT user_id FROM temp_customers); -- Delete users DELETE FROM wp_users WHERE ID IN (SELECT user_id FROM temp_customers); -- Enable foreign key checks SET FOREIGN_KEY_CHECKS = 1; -- Drop the temporary table DROP TEMPORARY TABLE IF EXISTS temp_customers; -- Step 4: Delete all comments -- Disable foreign key checks temporarily SET FOREIGN_KEY_CHECKS = 0; -- Delete all comments DELETE FROM wp_comments; -- Enable foreign key checks SET FOREIGN_KEY_CHECKS = 1; -- Step 5: Delete all customer data from WooCommerce > Customers - AKA: wp_wc_customer_lookup -- Disable foreign key checks temporarily SET FOREIGN_KEY_CHECKS = 0; -- Delete all entries from wp_wc_customer_lookup DELETE FROM wp_wc_customer_lookup; -- Enable foreign key checks SET FOREIGN_KEY_CHECKS = 1; -- Step 6: Clear both transient caches + customer sessions + analytics cache : WooCommerce > Status > Tools
Forum: Plugins
In reply to: [Ajax add to cart for WooCommerce] “Any” product variations don’t add to cartYes, this is highlighted and explained in the video i originally created and sent via messenger, included here for your convenience.
Video Explaining the issue (ensure sound is on):
https://quadlayers.kubik101.com.au/20231205-quadlayers-ajax-add-to-cart.mp4Forum: Plugins
In reply to: [Ajax add to cart for WooCommerce] “Any” product variations don’t add to cartIssue is not resolved. Don’t know why developer marked it resolved.
I have been in contact with them but have been very slow to respond.
Latest response was 20th Dec 2023:
We have forwarded your case to our development team for review. While we prioritize tickets related to premium licenses, please be assured that your issue is important to us and we are committed to addressing it as efficiently as possible. We will keep you updated on the progress.
We appreciate your patience and understanding.
Forum: Plugins
In reply to: [Ajax add to cart for WooCommerce] “Any” product variations don’t add to cartHi Guys.
Have contacted you via Messenger and provided the information you asked for.
What’s the status of looking into or fixing this issue?
Thanks.Forum: Plugins
In reply to: [Ajax add to cart for WooCommerce] “Any” product variations don’t add to cart^bump
Forum: Fixing WordPress
In reply to: #144 – Table ‘wp_options’ is marked as crashed and laUnderstood. Thank you.
Please watch video and ensure sound is on.
https://kubikdesign.com.au/posts/20230607-ckecklists-plugin-errors.mp4
- This reply was modified 1 year, 5 months ago by kubik101.
Hello Riza, neither.
Thanks for your reply.
See screenshot showing installed plugins.
Hi Jose.
Can you please check whether you have added any filters to add the sitemap manually using any filters in your theme’s functions.php file or not? If not, it would be mostly added by some other plugins or theme. The fastest way to rule out any conflict is to deactivate all non-Yoast plugins and switch to a standard theme like Twenty Twenty-Two.
^ we had done this previously, (I failed to mentioned we switched to default theme whilst all plugins (but yoast) were disabled).
Please test this on your development or staging site if you have one. If not, we recommend using the Health Check & Troubleshooting plugin. This plugin has a troubleshooting mode, which does not affect normal visitors to your site.
^ installed and showed nothing irregular.
I cleared cache on browser and have no WP plugin for caching.
Site is also setup locally so there is no server cache.** please note: I have the site setup locally, on a dev server and the live site all exhibiting the same issue.
I did all of the following but the issue still exists:
– resaved permalinks
– completed SEO data optimisation within tools
– enabled and disabled sitemaps
– disabled all plugins but yoast and the post type maker** please also note that when I enable the XML sitemap for “Icon Boxes” it appears twice in the list.
I have done what you suggested.
Issue still exists.Forum: Reviews
In reply to: [Terms & Conditions Per Product] Worked well for meWelcome mate..!
Forum: Plugins
In reply to: [Contact Form 7] Contact Form 7 vs Google ReCaptcha V3 – Form won’t validate@tonydehnke – not yet no.
Forum: Plugins
In reply to: [Contact Form 7] Contact Form 7 vs Google ReCaptcha V3 – Form won’t validateI saw there was a Contact Form 7 plugin update to 5.5.5 which I did.
I turned on Google Recaptcha integration and did a test email.
First test went through.
All other tests are now failing and not sending and leaves the error:
“There was an error trying to send your message. Please try again later.”