WC_Helper_Admin::register_cache_clear_toolpublic staticWC 1.0

Register the cache clearing tool on the WooCommerce > Status > Tools page.

Method of the class: WC_Helper_Admin{}

No Hooks.

Returns

Array. Filtered debug tool registrations.

Usage

$result = WC_Helper_Admin::register_cache_clear_tool( $debug_tools );
$debug_tools(array) (required)
Available debug tool registrations.

WC_Helper_Admin::register_cache_clear_tool() code WC 10.3.3

public static function register_cache_clear_tool( $debug_tools ) {
	$debug_tools[ self::CACHE_TOOL_ID ] = array(
		'name'     => __( 'Clear WooCommerce.com cache', 'woocommerce' ),
		'button'   => __( 'Clear', 'woocommerce' ),
		'desc'     => sprintf(
			__( 'This tool will empty the WooCommerce.com data cache, used in WooCommerce Extensions.', 'woocommerce' ),
		),
		'callback' => array( __CLASS__, 'run_clear_cache_tool' ),
	);

	return $debug_tools;
}