Home » WooCommerce: Disable Jetpack Publicize for Products

WooCommerce: Disable Jetpack Publicize for Products

by Tutor Aspire

When you enable the Jetpack plugin and its “Publicize” module, WordPress posts get automatically shared to the social media you pick.

This, of course, includes also WooCommerce posts -> “products”. Well, what if you want to deactivate this function?

WooCommerce Products: Disable Jetpack Publicize

PHP Snippet: Disable Jetpack Publicize for WooCommerce Products

/**
 * @snippet       Disable Publicize for Products Jetpack
 * @how-to        Get tutoraspire.com FREE
 * @sourcecode    https://tutoraspire.com/?p=21877
 * @author        Tutor Aspire
 * @credits       Jeremy Herve
 * @testedwith    WooCommerce 2.6.14
 */

function tutoraspire_disable_jetpack_publicize_woocommerce() {
remove_post_type_support( 'product', 'publicize' );
}

add_action( 'init', 'tutoraspire_disable_jetpack_publicize_woocommerce' );

You may also like