[Dev] Express Shop Page for WooCommerce

Filters

wc_express_shop_page_scripts_enabled_on_page

Filter that allows you to override whether the plugin should enqueue it’s scripts and styles files on woocommerce page, or allow them to load on certain pages.
Returns a boolean.

add_filter( 'wc_express_shop_page_scripts_enabled_on_page', 'is_woocommerce' );

Please consider that it is safe to use the WooCommerce conditional function is_woocommerce as a callback function name in this case because, by the time the filter is invoked, Express Shop Page for WooCommerce has already verified whether WooCommerce is active or not. Thus, there is no need to check the existence of that function.

wc_express_shop_page_loop_quantity_field_hook

Filter that allows you to override the position where to display the quantity field at the shop page product item loop.
Default: woocommerce_after_shop_loop_item

add_filter( 'wc_express_shop_page_loop_quantity_field_hook', 'woocommerce_after_shop_loop_item' );

You can override the filter to display the quantity field at the shop page product item loop to other locations e.g. after the product title, product image, etc.

wc_express_shop_page_loop_quantity_field_hook_priority

Filter that allows you to override the priority of the quantity field at the shop page product item loop.
Default: woocommerce_after_shop_loop_item

add_filter( 'wc_express_shop_page_loop_quantity_field_hook_priority', 'woocommerce_after_shop_loop_item' );

You can override the filter to display the quantity field at the shop page product item loop to other locations e.g. after the product title, product image, etc.

wc_express_category_page_loop_quantity_field_hook

Filter that allows you to override the position where to display the quantity field at the category page product item loop.
Default: woocommerce_after_shop_loop_item

add_filter( 'wc_express_category_page_loop_quantity_field_hook', 'woocommerce_after_shop_loop_item' );

You can override the filter to display the quantity field at the category page product item loop to other locations e.g. after the product title, product image, etc.

wc_express_category_page_loop_quantity_field_hook_priority

Filter that allows you to override the priority of the quantity field at the category page product item loop.
Default: woocommerce_after_shop_loop_item

add_filter( 'wc_express_category_page_loop_quantity_field_hook_priority', 'woocommerce_after_shop_loop_item' );

You can override the filter to display the quantity field at the category page product item loop to other locations e.g. after the product title, product image, etc.

wc_express_page_quantity_input_min

Filter that allows you to override the minimum quantity to order a product.
Default: 1

add_filter( 'wc_express_page_quantity_input_min', function( $value, $product ) {
    // change the minimum quantity to 1 or something else
    // $product is available to change this value for specific products 
    return $value;
}, 10, 2 );

You can override the filter to change the minimum order quantity for all products or for specific products.

wc_express_page_quantity_input_max

Filter that allows you to override the maximum quantity to order a product.
Default: Set to the product’s stock quantity if it is set

add_filter( 'wc_express_page_quantity_input_max', function( $value, $product ) {
    // change the maximum quantity to your desired value
    // $product is available to change this value for specific products 
    return $value;
}, 10, 2 );

You can override the filter to change the maximum order quantity for all products or for specific products.

wc_express_page_quantity_input_step

Filter that allows you to override the step number in quantity field to order a product.

add_filter( 'wc_express_page_quantity_input_step', function( $value, $product ) {
    // $product is available to change this value for specific products 
    return $value;
}, 10, 2 );

You can override the filter to change the step number in quantity field all products or for specific products.

wc_quantity_field_enabled_on_shop

Filter that allows you to override the settings of the plugin that controls whether to display or hide the quantity field in the shop page.

add_filter( 'wc_quantity_field_enabled_on_shop', __return_true );

You can override the filter to hide the quantity field in the shop page using __return_false

wc_quantity_field_enabled_on_category

Filter that allows you to override the settings of the plugin that controls whether to display or hide the quantity field in the category page.

add_filter( 'wc_quantity_field_enabled_on_category', __return_true );

You can override the filter to hide the quantity field in the category page using __return_false

wc_express_shop_page_loop_variation_dropdowns_hook

Filter that allows you to override the position where to display the variation dropdowns at the shop page product item loop.
Default: woocommerce_after_shop_loop_item

add_filter( 'wc_express_shop_page_loop_variation_dropdowns_hook', 'woocommerce_after_shop_loop_item' );

You can override the filter to display the variation dropdowns at the shop page product item loop to other locations e.g. after the product title, product image, etc.

wc_express_shop_page_loop_variation_dropdowns_hook_priority

Filter that allows you to override the priority of the variation dropdowns at the shop page product item loop.
Default: woocommerce_after_shop_loop_item

add_filter( 'wc_express_shop_page_loop_variation_dropdowns_hook_priority', 'woocommerce_after_shop_loop_item' );

You can override the filter to display the variation dropdowns at the shop page product item loop to other locations e.g. after the product title, product image, etc.

wc_express_category_page_loop_variation_dropdowns_hook

Filter that allows you to override the position where to display the variation dropdowns at the category page product item loop.
Default: woocommerce_after_shop_loop_item

add_filter( 'wc_express_category_page_loop_variation_dropdowns_hook', 'woocommerce_after_shop_loop_item' );

You can override the filter to display the variation dropdowns at the category page product item loop to other locations e.g. after the product title, product image, etc.

wc_express_category_page_loop_variation_dropdowns_hook_priority

Filter that allows you to override the priority of the variation dropdowns at the category page product item loop.
Default: woocommerce_after_shop_loop_item

add_filter( 'wc_express_category_page_loop_variation_dropdowns_hook_priority', 'woocommerce_after_shop_loop_item' );

You can override the filter to display the variation dropdowns at the category page product item loop to other locations e.g. after the product title, product image, etc.

wc_variation_dropdowns_enabled_on_shop

Filter that allows you to override the settings of the plugin that controls whether to display or hide the variation dropdowns in the shop page.

add_filter( 'wc_variation_dropdowns_enabled_on_shop', __return_true );

You can override the filter to hide the variation dropdowns in the shop page using __return_false

wc_variation_dropdowns_enabled_on_category

Filter that allows you to override the settings of the plugin that controls whether to display or hide the variation dropdowns in the category page.

add_filter( 'wc_variation_dropdowns_enabled_on_category', __return_true );

You can override the filter to hide the variation dropdowns in the category page using __return_false

Was this article helpful?

Related Articles