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?
PHP Snippet: Disable Jetpack Publicize for WooCommerce Products
/** * @snippet Disable Publicize for Products Jetpack * @how-to businessbloomer.com/woocommerce-customization * @sourcecode https://businessbloomer.com/?p=21877 * @author Rodolfo Melogli, Business Bloomer * @credits Jeremy Herve * @testedwith WooCommerce 2.6.14 */ function bbloomer_disable_jetpack_publicize_woocommerce() { remove_post_type_support( 'product', 'publicize' ); } add_action( 'init', 'bbloomer_disable_jetpack_publicize_woocommerce' );
This worked great, thanks!
Excellent 🙂
Should I replace the bbloomer with my own social media accounts? Does it do all of them or only Facebook?
Hey Linda, thanks for your comment! No, you can leave the snippet as-is. It will disable any social sharing