Skip to main content

fc_enable_compat_theme_style_{theme_slug}

Type: Filter

Filters whether to enqueue a theme compatibility stylesheet on checkout and account screens.

The dynamic portion of the hook name, $theme_slug, refers to the active theme directory name from get_template() or get_stylesheet(). Return boolean true to enqueue the stylesheet. Any other value skips it.

Signature​

apply_filters( 'fc_enable_compat_theme_style_{theme_slug}', $value );

Parameters​

NameTypeDescription
$valueboolValue to filter. Default true.

Since​

  • 1.2.10

Source: inc/enqueue.php

Examples​

Note that for the checkout page no {$page} modifier is used: fc_enable_compat_theme_style_{$theme_slug}

In fc_enable_compat_theme_style_{theme_slug}, twentytwentyfive replaces {theme_slug}.

add_filter( 'fc_enable_compat_theme_style_twentytwentyfive',
/**
* Disable Checkout theme style compatibility.
*
* @param bool $value Value to filter. Default true.
* @return bool Filtered value.
*/
function( $value ) {
return false;
},
10
);