Move early return
This commit is contained in:
parent
53873857ef
commit
2b2a0016d3
|
@ -212,9 +212,6 @@ class WC_Customizer {
|
|||
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
|
||||
*/
|
||||
public function add_product_grid_section( $wp_customize ) {
|
||||
if ( has_filter( 'loop_shop_columns' ) ) {
|
||||
return;
|
||||
}
|
||||
$theme_support = get_theme_support( 'woocommerce' );
|
||||
$theme_support = is_array( $theme_support ) ? $theme_support[0]: false;
|
||||
|
||||
|
@ -309,6 +306,11 @@ class WC_Customizer {
|
|||
)
|
||||
);
|
||||
|
||||
// The following settings should be hidden if the theme is declaring the values.
|
||||
if ( has_filter( 'loop_shop_columns' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$wp_customize->add_setting(
|
||||
'woocommerce_catalog_columns',
|
||||
array(
|
||||
|
|
Loading…
Reference in New Issue