Unfortunately, the plugin I have been using to add a Pinterest pin-it button to the WooCommerce single product pages of a clients web shop stopped functioning. I did a quick search for a replacement plugin, but I couldn’t find any good plugin that works out of the box.
So, I came up with a simple solution that I want to share with you.
First, we have to make sure that the pinit.js script is included in the product pages. This snippet includes the script in the footer on the product pages. Add the following code to the functions.php of your theme.
Add the pin-it button to the product pages
The hook we use in our example is the woocommerce_share hook. You can also use another hook. To find available hooks, I recommend the Simply Show Hooks plugin.
The above code pins the first image of your product. You can also have users save any image from your product page. Instead of a small Browser window, the user gets an overlay with all available images (see example below).
Use this code to achieve the result in the screenshot.
For more informations and options you may have a look at the Pinterest developers pages.