MainWP Community

Exclude Jetpack Related Posts from showing on Products in WooCommerce

Exclude Jetpack related posts from showing on products from WooCommerce 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' );
4 Likes