WooCommerce: JetPack Sharing Not Showing? [resolved]

Yes, Jetpack Sharing has an option to show the Sharing buttons on the WooCommerce Single Product page. But this does not mean your template is compatible with that! If you have ticked “products” and JetPack Sharing buttons are not showing, you can use this simple snippet.

1. Tick “products” under Settings / Sharing

WooCommerce: enable sharing buttons on product page
WooCommerce: enable sharing buttons on product page

2. If sharing buttons don’t appear on the product pages, add this PHP snippet


// add Jetpack sharing on the right of the product image
 
add_action('woocommerce_single_product_summary','addshare', 40);
function addshare(){
echo sharing_display();
}

Where to add custom code?

You should place PHP snippets at the bottom of your child theme functions.php file and CSS at the bottom of its style.css file. Make sure you know what you are doing when editing such files - if you need more guidance, please take a look at my guide "Should I Add Custom Code Via WP Editor, FTP or Code Snippets?" and my video tutorial "Where to Place WooCommerce Customization?"

Does this snippet (still) work?

Please let me know in the comments if everything went as expected. I would be happy to revise the snippet if you report otherwise (please provide screenshots). I have tested this code with Storefront theme, the WooCommerce version listed above and a WordPress-friendly hosting.

If you think this code saved you time & money, feel free to join 17,000+ WooCommerce Weekly subscribers for blog post updates and 250+ Business Bloomer supporters for 365 days of WooCommerce benefits. Thank you in advance!

Need Help with WooCommerce?

Check out these free video tutorials. You can learn how to customize WooCommerce without unnecessary plugins, how to properly configure the WooCommerce plugin settings and even how to master WooCommerce troubleshooting in case of a bug!

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza.

8 thoughts on “WooCommerce: JetPack Sharing Not Showing? [resolved]

  1. Hi Rodolfo:

    As you know, the JetPack Sharing buttons do not show on WooCommerce Shop / Category pages as they are of the page type is_post_type_archive.

    Although a plugin is available to change the behavior using shortcodes, I thought I’d give this a try with your snippet and simply replaced:

    add_action('woocommerce_single_product_summary','addshare', 40);

    with

    add_action('woocommerce_after_main_content','addshare', 10);

    However, if you hover over one of the sharing buttons you’ll see it has picked up the URL for the last item on the page … instead of the page itself. Any thoughts as to whether can be adjusted?

    1. Good point – but that function probably looks for a product and does not share the “page” it’s embedded on. You’ll need to find an alternative. I know JetPack Sharing can be shown on pages and posts as well, so you need to find that function and use that instead

  2. may I know where should I put the php snippet?

    1. Hey Yew, I explain everything in my WooCommerce Customization Video Tutorial here. Hope this helps!

  3. Hi! I added the snippet and it still does now show. Any tips?

    1. Hey Austin, can you show me your website – maybe that can help me understand the situation better? Thank you ๐Ÿ™‚

  4. Thanks alot, it worked like charm

Questions? Feedback? Support? Leave your Comment Now!
_____

If you are writing code, please wrap it between shortcodes: [php]code_here[/php]. Failure to complying with this (as well as going off topic, not writing in English, etc.) will result in comment deletion. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining BloomerArmada to get blog comment reply priority, ask me 1-to-1 WooCommerce questions and enjoy many more perks. Thank you :)

Your email address will not be published. Required fields are marked *