Skip to content

Instantly share code, notes, and snippets.

@james-allan
Created December 6, 2016 02:44
Show Gist options
  • Save james-allan/cf98eaadb43a12f378c09cde148433ac to your computer and use it in GitHub Desktop.
Save james-allan/cf98eaadb43a12f378c09cde148433ac to your computer and use it in GitHub Desktop.
WooCommerce Subscriptions - Use Large Site Report Caching
<?php
/**
* Plugin Name: WooCommerce Subscriptions - Use Large Site Report Caching
* Plugin URI:
* Description: By default, WooCommerce Subscriptions will cache report data on large sites. Large sites are determined by the number of orders and subscriptions. This mini-plugin will force a site to be treated as a large site.
* Author: Prospress Inc.
* Author URI: http://prospress.com/
* Version: 1.0.0
*
* Copyright 2016 Prospress, Inc. (email : [email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @author James Allan
* @since 1.0.0
*/
add_filter( 'wcs_report_use_large_site_cache', '__return_true' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment