Add-ons /

WooCommerce

Developer documentation for the Ajax Load More WooCommerce add-on.


Filter Hooks

The following filter hooks are available when using this add-on:

alm_woocommerce_container

The alm_woocommerce_container filter updates the target classname of the WooCommerce listing container.

This filter is useful when a theme has modified the default WooCommerce product classes.

alm_woocommerce_products

The alm_woocommerce_products filter updates the target classname of the individual products.

This filter is useful when a theme has modified the default WooCommerce container class.

alm_woocommerce_results

The alm_woocommerce_results filter updates the target classname on the WooCommerce result count component.

This filter is useful when a theme has modified the default WooCommerce class of this element.

The alm_woocommerce_permalink_structure filter will allow for changing the default URL permalink structure.

This filter is useful when using WooCommerce shortcodes or a plugin (e.g. Divi, Elementor) on shop pages. These use a paging permalink structure outside of the default WooCommerce shop /page/{page}/ structure.

alm_woocommerce_hide_orderby

The alm_woocommerce_hide_orderby filter will hide the sort/orderby select menu on WooCommerce templates.

alm_woocommerce_orderby_class

The alm_woocommerce_orderby_class filter will update the classname for the orderby select menu.

This filter is useful when a theme has modified the default WooCommerce orderby menu class and Ajax Load More cannot locate the target element.

alm_woocommerce_hide_pagination

The alm_woocommerce_hide_pagination filter will show the default paging navigation on WooCommerce templates.

By default Ajax Load More will add inline CSS to hide the out-of-the-box WooCommerce pagination as it is replaced with infinite scroll.

alm_woocommerce_pagination_class

The alm_woocommerce_pagination_class filter will update the classname for the default WooCommerce paging navigation.

This filter is useful when a theme has modified the default WooCommerce pagination class and Ajax Load More cannot locate the target element.


WooCommerce Filter Integrations

The WooCommerce add-on has been tested and integrated with the following WooCommerce filtering plugins. Please review the integration steps of each to complete the integration.

Users filtering WooCommerce products with FacetWP will need to add the following JavaScript snippet to their website to enable integration between the two plugins.

The code snippet above uses the refresh callback in FacetWP and the reset function in Ajax Load More to manually trigger a reload of Ajax Load More after FacetWP refreshes the product results.

Users with WOOF – Products Filter for WooCommerce activated will need to complete the following steps to enable integration between the two plugins if using the Ajax filtering functionality of the plugin.

Step #1 – Disable Inline CSS

Visit the Ajax Load More settings page and disable the Load CSS Inline setting. If this setting remains enabled, WOOF will strip the inline styling and the Ajax loader will appear unstyled.

Load CSS inline setting

Step #2 – JavaScript Callback

Visit the Advanced -> Code settings section of the WOOF Products Filter and enter the following JavaScript inside the JavaScript code after AJAX is done field – this JavaScript will instruct Ajax Load More to reset after the Ajax filtering has completed.

WooF Ajax Callback Settings

Users with Advanced AJAX Product Filters by BeRocket activated will need to complete the following to enable integration between the two plugins.

Enable JavaScript Callback

Visit the Product Filters -> JavaScript/CSS settings section and enter the following JavaScript inside the After Update: field – this JavaScript will instruct Ajax Load More to reset after the Ajax filtering has completed.

Be Rocket Ajax Callback


FAQs

Below are common questions regarding the WooCommerce add-on. If you have a question and don’t see an answer here, please visit the support page and submit your request.

Yes, all WooCommerce filtering widgets work out of the box. You can view an example on our demo site.

The WooCommerce add-on is compatible with Cache, but is not yet integrated with the Filters or Paging add-ons.

No, the WooCommerce add-on can only be implemented on WooCommerce specific templates.

  • Shop
  • Product Archives
  • Product Search

If you are using WOOF – WooCommerce Product Filters plugin you need to either Turn OFF the Ajax functionality within the filters or follow the guide located above.

Note: Ajax filtering can be turned off in the WOOF widget or the settings page under Options.

To integrate Advanced AJAX Product Filters by BeRocket with Ajax Load More you need to follow the short implementation guide in the WooCommerce Filter Integrations section.


« Back to Add-ons