Delete WooCommerce Analytics data - wordpress

I try to anonymize WooCommerce for debug access by third party plugin developers with a bash command line script on my linux server. I successfully could remove users and orders but now I discover that all the sales statistics are still available in WooCommerce' Analytics including names and figures. Where do I find this in database so I can include it my database query to address it?
By request I include here a screenshot of WC analytics' first page with sales and order reports, financial data not to be revealed a plugin author.

Try to run WooCommerce > Status > Tools > Clear Analytics Cache tool. Analytics dashboard is using a lot of caching, otherwise it would be too slow. Before clearing the cache, make sure you empty the orders from the trash too.
And while you are on the WooCommerce > Status > Tools page, delete all transients too.

Related

Deleting order Woocommerce orders via API

I want to programmatically delete old orders in Woocommerce, to try to assist database performance, so I am considering running this via the API documented below. The documentation doesn't detail exactly what is deleted - is it just the order, and its metadata? Does it delete the notes of an order for example?
https://woocommerce.github.io/woocommerce-rest-api-docs/#delete-an-order

how can run automatic Regenerate Product lookup tables on WooCommerce -> Status -> Tools by cron jobs?

I have imported the products using some API's. But Every time I import the products, it's ask to regenerate the woocommerce lookup tables. So how can I run Regenerate Product lookup tables on WooCommerce -> Status -> Tools by cron jobs programmatically?
This issue is over a year old so I'm guessing you've either figured it out or moved on. I'm posting this here more as a shortcut for anyone looking into this in the future.
You have a few ways you can accomplish regenerating product lookup tables for WooCommerce.
1. Use the WooCommerce REST API
The WooCommerce REST API documentation is pretty helpful here. Do a GET request to get a list of all the available tools from system status, then run a PUT request as noted in the docs here - https://woocommerce.github.io/woocommerce-rest-api-docs/#retrieve-a-tool-from-system-status
You'll want to generate API keys in WooCommerce before making those requests. They've got it pretty well documented here as well - https://docs.woocommerce.com/document/woocommerce-rest-api/
2. Use the WP-CLI
If you're a die-hard WordPress developer you could benefit from using the WP-CLI tool - https://make.wordpress.org/cli/handbook/
You'd run the command wp wc tool run regenerate_product_lookup_tables --user=1
3. Bake it into the WordPress admin panel
As noted in the WooCommerce developer documentation you can use the update_lookup_table method from the WC_Data_Store_WP class - https://developer.woocommerce.com/2019/04/01/performance-improvements-in-3-6/
This feels overkill since you can just go to WooCommerce > Status > Tools > Product lookup tables and click the "Regenerate" button on the right. I guess it could be useful if you're using an automation tool like Selenium to log into your WordPress and do things. I could see the benefit of using update_lookup_table in a custom admin page or plugin to reduce the amount of clicks and page loads that your script would need to navigate.

All Access Pass: Can't Download Included Products

I'm having issues setting up the All Access Pass with Easy Digital Downloads. Whenever a user tries to download a products that is included in their All Access Pass it gives the following notice:
You must have an active subscription to XXXXX in order to download
this file.
However, the relevant Download variant included in their All Access Pass is shown as having no price and the download button. Products and variants outside of their All Access Pass show a price and the checkout button.
So, it appears that EDD is detecting these product variants as being a part of their All Access Pass. So why can't they download their included Download product?
If a Download products is purchased outside of the All Access Pass, it can be downloaded without issue. But, not when the item is a part of an All Access Pass. It suggests that the Download product subscription isn't being overridden by the All Access Pass in terms of the downloading part.
Here's how the products & passes are setup:
I have Recurring Payments extension installed and have all Download products on a year subscription. I also have All Access extension installed and created a pass which grants access to variant 1 of all Download products. The All Access Passes are also on a yearly subscription.
P.s. I'm trying to set this up for a client who no longer has an active license for the All Access extension so we are unable to currently go via the dev support for this.
Try this options:
Downloads > Tools > General. And select: All Access - Process All Access Passes.
Go to Downloads > Customers. In this section you can select 1 customer an go to: Customer Details > Tools. And Try with this option: Regenerate Customer All Access Passes.

Does Google Analytics by MonsterInsights wordpress plugin insert tracking code automatically or does it just fetch the analytics data?

Here's what I did,
Installed Google Analytics by MonsterInsighs plugin on WordPress
site.
Authenticated and Connected the plugin to use corresponding Google
Analytics Property
I have not manually inserted any tracking code on my site. I am under the impression that the tracking code insertion is (and should be) the task of MonsterInsights plugin. With that strong supposition, I cleared the cache on Site CDN and Site Server to check if the tracking code is inserted. The three verification methods I used are;
Verification through Google Tag Assistant Chrome Plugin
Verification through Google Analytics Debugger Chrome Plugin
Manual Verification by Viewing Page Source
Ther are no errors in the plugin page. None of the methods have indicated the presence of tracking code. You can have a look yourself at https://techmars.org
PS: All of these activities are very recent i.e. It has just been an hour. Does it usually take some waiting? I haven't encountered such a prerequisite anywhere.
MonsterInsights automatically adds the tracking script. It appears to have done so on your site. The only time it would require waiting is if you were to use some sort of page caching that needs to clear for new frontend output tags to show.

No Index shown in Algolia dashboard despite WordPress setting shows index created , Why?

I downloaded the latest version of WordPress plugin and Installed it. Then I pasted three keys required under setting. After that indexing was tried.
However, I find that the Aloglia dashboard shows No Index .
Am I doing something wrong or plugin is not connecting.
I have latest versions of WordPress
If you are using the latest version of the plugin, 0.2.5 right now, here are the required steps to index your content:
Add your App ID, Search API key and Admin API key on the settings page,
Ensure that when you save the page, you get a success message,
Go turn on the logging on the 'Logs' page (this is optional but helps debugging)
Check some indices on the 'Indexing page' and hit the save button
From there the indexation tasks should start being queued and handled.
You have to wait a few seconds to see the queue status refreshes.
You can also check your logs to see what happened.
If you have errors in your logs, please post them as comment.
There are 2 common issues that would make your WordPress instance not able to contact Algolia servers:
Your server has no access to the network,
Your are using docker in a configuration that does not allow the server to access itself when calling the url of your website.
More detailed steps to get the search plugin for WordPress up and running can be found in the official documentation of Algolia Search plugin for WordPress.

Resources