Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jeffikus/b73ea70380ad6c29aed8241c726bb5d5 to your computer and use it in GitHub Desktop.
Save jeffikus/b73ea70380ad6c29aed8241c726bb5d5 to your computer and use it in GitHub Desktop.
Disable Jetpack's Infinite Scroll for WooCommerce
function _rsp_disable_jetpack_infinite_scroll_conditionally() {
if ( true === is_woocommerce() ) {
remove_theme_support( 'infinite-scroll' );
}
}
add_action( 'template_redirect', '_rsp_disable_jetpack_infinite_scroll_conditionally', 9 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment