Skip to content

Commit aac312b

Browse files
committed
move condition
1 parent 457c675 commit aac312b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/kses.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
* In WooCommerce Shop page, <style> tags are stripped out and the CSS styles are displayed in the frontend.
1313
* This function removes the <style> tags and CSS styles before they are stripped out.
1414
*/
15-
if ( ! function_exists( 'stackable_pre_kses_woocomerce_shop' ) && function_exists( 'wc_get_page_id' ) ) {
15+
if ( ! function_exists( 'stackable_pre_kses_woocomerce_shop' ) ) {
1616

1717
function stackable_pre_kses_woocomerce_shop( $content, $allowed_html, $context ) {
1818
// Check if we are on the WooCommerce Shop page
19-
if ( is_shop() ) {
19+
if ( function_exists('is_shop' ) && is_shop() ) {
2020
$optimized_css = get_post_meta( wc_get_page_id( 'shop' ), 'stackable_optimized_css', true );
2121

2222
// remove CSS before kses strips out <style> tags

0 commit comments

Comments
 (0)