General notes

With YITH WooCommerce Share for Discounts, you can allow the sharing of the contents of your shop on social networks via Facebook, Twitter and Google+, or via email. In order to do that, you just have to activate the related options you can find in the settings panel of the plugin.

sharefacebook

In order to let the plugin work fine, it is essential to enable coupons in the WooCommerce settings panel.

couponsshare

The product sharing generates a coupon which value depends on how configurated in the “Coupon settings” tab of the plugin settings dashboard.

sharecouponsettings

cartsharing

You can share the same product more than once only after 24 hours have passed.

Configure Facebook application

Recently, Facebook has updated the Terms of the platform and is now considering the issuing of a coupon code in exchange of a sharing as a breach of their Terms (read here for more details). Consequently, you might receive an email from Facebook regarding your Facebook app block. Moreover, as Facebook constantly applies changes to their API, the plugin might not work after one of these changes. As long as we can, we will keep supporting the plugin, but please, consider what we have just stated above as a possibility. If you want to use Facebook sharing anyway, please, add this line in the functions.php file of your theme:

add_filter('ywsfd_enable_facebook_anyway', '__return_true');

Regarding Facebook, you need to add the “App ID” code that you can obtain creating a new application on Facebook developers. Login with your account and click on the Add new app entry.

general5

Fill in the form with the required information.

general6

If the creation of the application was successful you will be redirected to a page like the one shown in the following image.

share7

Now click on “Settings” (that you find in the side menu of the page) and fill in the “Namespace” field with a name to identify the application.

share8

Then click on “Add Platform”, select “Website” and insert your site URL.

share9

share10

Go to the “App Review” section and ensure the application is public.

share11

The last step is to copy the APP ID and paste it within the plugin settings dashboard.

Configure twitter application

In order to share via Twitter, it is essential to configure a new application for the required parameters in the plugin settings dashboard.

general13

Go to https://apps.twitter.com/ and click on the “Create new app” button.

general14

Complete the required fields and insert in “Callback url” one of the two options suggested in YITH Plugins -> Share for Discounts -> Settings -> Twitter

general15

general16

After creating the application, go to the “Keys and Access Tokens” section to recover the required parameters, that is “Twitter Consumer Key” and “Twitter Consumer Secret”.
Copy and paste them in the related options of the plugin.

general17

general18

As last step click on the “Create my access token” button that you find at the bottom of “Keys and Access Tokens” Twitter section.

general19

If the process ended well, now your users could start sharing your contents via Twitter in order to get the discount you provided.

general20

 

Configure LinkedIn application

To enable the content sharing through LinkedIn, it is essential to create a LinkedIn application and recover the parameters required by the plugin.

general22

Log in to https://www.linkedin.com/developer/apps and click on the “Create application” button.

general23

Fill in the required fields of the form.

general24

Now copy “Client ID” and “Client Secret” associated with the application and paste them in the plugin settings dashboard.

general245

Now you can apply the sharing via LinkedIn.

general25

Email sharing

To enable the sharing via email, you just have to enable the option in the plugin settings and whenever users click on the email sharing button, they will get a form where they can enter the sender and receiver email addresses and a custom message. 

The receiver will get a message with a link to the page you’ve shared.

Email
Email-sharing

Coupon settings

The plugin automatically generates a coupon when a product is shared. The user could use the coupon by adding it to the cart.
The amount and modality about the use of the generated coupon depend on the configuration settings, in Share for Discounts -> Coupon Settings, after the coupon sharing.

coupon1

The coupon can be applied to the shared product or to the cart.
Generically, the coupons are cumulative only if applied on the product and the user doesn’t share the same product on the same day.
Once shared, the product could no longer be selected again within the same day.The user will find the coupon automatically applied in “cart” and “checkout” pages.

coupon2

Each generated coupon from a sharing is identified by a name that includes the username- label followed by year, month, day, hour, minute and second of the content shared.

coupon3

If you want to automatically remove all the expired coupons generated by the plugin, enable “Expired Coupon Clearing”.
The removal can be also done manually through the “Remove expired coupons” button.

coupon4

Sharing pages

The sharing buttons can be shown on the product page and in “Cart” and “Checkout” pages.
Go to “Share for Discounts -> Sharing Settings” to enable or not the addition and to choose in what spot of the page you want to insert the buttons.

sharing_settings

Here, in the Sharing settings section, you can also enable the option Add to cart after sharing which allows applying the coupon automatically once shared the related product.

share_coupon

share_coupon_2

 

The sharing URL will be the same as the one of the current page unless you inserted a specific URL in “URL to share”.

sharing2

Any page of the site can be shared if you have inserted the [ywsfd_shortcode] shortcode in the page.

On-sale products

By default the discounted products can’t be shared. However, if you want to offer a discount coupon also for these products, you can do it by enabling “Enable on on-sale products”.

sharing3

Facebook OpenGraph

For a correct sharing of the contents on Facebook, you necessarily need to set the Open Graph tags.
Otherwise, a wrong content could be possibly shared.

To avoid this issue, set the defaut contents in the “Facebook OpenGraph Meta Defaults” section and they will be automatically shared in case of any issue about the Open Graphs associated to the page.

sharing4

Gutenberg

The plugin is ready to use with the new Gutenberg editor. When you add a new post or page, you will be able to find our YITH shortcodes and widgets. With a simple click they will be added to your page.

Share for discount gutenberg