WC_Helper_Admin::register_cache_clear_tool
Register the cache clearing tool on the WooCommerce > Status > Tools page.
Метод класса: WC_Helper_Admin{}
Хуков нет.
Возвращает
array. Filtered debug tool registrations.
Использование
$result = WC_Helper_Admin::register_cache_clear_tool( $debug_tools );
- $debug_tools(массив) (обязательный)
- Available debug tool registrations.
Код WC_Helper_Admin::register_cache_clear_tool() WC Helper Admin::register cache clear tool WC 11.1.0
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;
}