Dont show row settings if something is managing the number of products per page
This commit is contained in:
parent
2d8d5f3fdb
commit
14fa87ab1f
|
@ -404,16 +404,19 @@ class WC_Shop_Customizer {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$wp_customize->add_setting(
|
// Only add this setting if something else isn't managing the number of products per page.
|
||||||
'woocommerce_catalog_rows',
|
if ( ! has_filter( 'loop_shop_per_page' ) ) {
|
||||||
array(
|
$wp_customize->add_setting(
|
||||||
'default' => 4,
|
'woocommerce_catalog_rows',
|
||||||
'type' => 'option',
|
array(
|
||||||
'capability' => 'manage_woocommerce',
|
'default' => 4,
|
||||||
'sanitize_callback' => 'absint',
|
'type' => 'option',
|
||||||
'sanitize_js_callback' => 'absint',
|
'capability' => 'manage_woocommerce',
|
||||||
)
|
'sanitize_callback' => 'absint',
|
||||||
);
|
'sanitize_js_callback' => 'absint',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$wp_customize->add_control(
|
$wp_customize->add_control(
|
||||||
'woocommerce_catalog_rows',
|
'woocommerce_catalog_rows',
|
||||||
|
|
Loading…
Reference in New Issue