Merge branch 'pr/23035'
This commit is contained in:
commit
bd34e89314
|
@ -295,7 +295,8 @@ class WC_Post_Types {
|
||||||
}
|
}
|
||||||
|
|
||||||
// If theme support changes, we may need to flush permalinks since some are changed based on this flag.
|
// If theme support changes, we may need to flush permalinks since some are changed based on this flag.
|
||||||
if ( update_option( 'current_theme_supports_woocommerce', current_theme_supports( 'woocommerce' ) ? 'yes' : 'no' ) ) {
|
$theme_support = current_theme_supports( 'woocommerce' ) ? 'yes' : 'no';
|
||||||
|
if ( get_option( 'current_theme_supports_woocommerce' ) !== $theme_support && update_option( 'current_theme_supports_woocommerce', $theme_support ) ) {
|
||||||
update_option( 'woocommerce_queue_flush_rewrite_rules', 'yes' );
|
update_option( 'woocommerce_queue_flush_rewrite_rules', 'yes' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue