woocommerce / woocommerce-subscriptions-disable-report-cache-updates

Disable the automatic updates to report cache run by WooCommerce Subscriptions.
GNU General Public License v3.0
5 stars 1 forks source link

[WCS 2.5] Maybe update the unscheduling function to use Action Scheduler #1

Open james-allan opened 5 years ago

james-allan commented 5 years ago

As part of https://github.com/Prospress/woocommerce-subscriptions/pull/2980 which will be released in 2.5.0, we were looking at changing the scheduling of report cache updates via Cron and wp_schedule_single_event() to use the action scheduler instead. This means this plugin will need to update the function it calls to unschedule the cache update event or more reliably use the wcs_report_cache_updates_enabled filter.

This might be a really big issue as I suspect there are a lot of customers using this plugin and so we might have to scrap that idea.

I'm just making a note with this PR to make sure we don't forget to do that.

thenbrent commented 5 years ago

This might be a really big issue as I suspect there are a lot of customers using this plugin and so we might have to scrap that idea.

Good catch. To mitigate that, we might want to look at releasing that plugin via WordPress.org so that we can provide an easy upgrade / new version notification to folks.

I'm pretty sure if we're able to use the same file name as the plugin's slug on WordPress.org, each WordPress installation where the plugin is installed from GitHub will automatically detect an update.

The gotchas with that are:

  1. the plugin folder likely includes -master suffix, as GitHub appends that
  2. trademark issues might prevent us using a slug prefixed with woocommerce-
thenbrent commented 5 years ago

Fixed with #4.