Remove related posts from showing on products from WooCommerce when using Jetpack related posts module

Remove related posts from showing on products from WooCommerce when using Jetpack related posts module on child sites.

Snippet Type

Execute on Child Sites

Snippet

function jetpackme_exclude_jetpack_related_from_products( $options ) {
    if ( is_product() ) {
        $options['enabled'] = false;
    }
 
    return $options;
}
add_filter( 'jetpack_relatedposts_filter_options', 'jetpackme_exclude_jetpack_related_from_products' );
1 Like