View Product Page

Emails

In WooCommerce > Settings > Emails you will be able to find all the email notifications added by the plugin YITH Affiliates and manage the content and sender options.

To enable or disable each of this email notification, please, refer to the related option in the plugin settings that will be linked below.

Available notifications and links to the settings where they can be enabled/disabled.

Admin emails
Affiliate emails

If you want to edit the default email template, click on the button Copy file to theme.

Now, a copy of the template file has been added to the specified path, so that you can make all changes you wish, without having to edit the original code.

How to override templates

You can override from your theme all the templates that you can find in the plugin “templates” folder.

To override the template from your theme, copy the file you want to change and paste it in the theme woocommerce > yith-wcaf folder (create one if not already available).

If the file you want to override is in a sub-section of the plugin templates folder, make sure you recreate the same path structure in the theme woocommerce > yith-wcaf folder.

Let’s give an example.
Suppose that we want to override the admin-new-affiliate-email.php template.

The file is within the plugin in templates > emails.

To override the file, you need to recreate the same structure within your theme and paste the file in the woocommerce > yith-wcaf > emails path.

Affiliate dashboard shortcode

The [yith_wcaf_affiliate_dashboard] shortcode allows you to display the Affiliate dashboard on a custom page of your choice.

The dashboard is divided into different sections and for each of them there’s a specific shortcode available, so you can either display the entire dashboard with all tabs or the content of specific tabs as you wish.

Print specific sections of the affiliate dashboard

With a shortcode for each section, the admin will be able to print that specific affiliate dashboard section on any page of the site.

  • Commissions: [yith_wcaf_show_commissions]
  • Visits: [yith_wcaf_show_clicks]
  • Coupons: [yith_wcaf_show_coupons]
  • Link generator: [yith_wcaf_link_generator]
  • Payments: [yith_wcaf_show_payments]
  • Settings: [yith_wcaf_show_settings]

Each of these shortcodes can have custom settings for the pagination and the menu. You can use the following attributes to configure them:

  • pagination: (yes/no) enable/disable the pagination option for each section. It will show up only if the items are more than the value set in the following attribute per page.
  • per_page: a numeric value that shows the elements per page. Default value is 10.
  • current_page: page number shown in any section.
    Suppose that we have pagination for a list in the “Commissions” section, by specifying 2 as the parameter value, only page 2 will be shown in the section.
  • show_dashboard_links: (yes/no): this allows showing the menu to navigate among the various sections also.

Registration form shortcode

The [yith_wcaf_registration_form] shortcode shows the affilite form, so your users can submit their affiliate appliction from any page of your website.

You can customize the fields of the registration form YITH > Affiliates > General Options > Affiliate Registration as explained here.

If the affiliate has already applied for the affiliate programme, a message will be displayed to inform about the submitted application.

Affiliate registered

The available attributes are:

  • show_login_form: (yes/no) show or hide the login form together with the registration form
  • login_title: you can set here the title of the login form, if displayed
  • register_title: you can set here the title of the register form

Example:

[yith_wcaf_registration_form show_login_form="yes" login_title="Log in here" register_title="Apply for our Affiliate Programme"]

Visible content shortcode

You can use this shortcode to show custom content that has to be visible to the affiliates only. It works like an opening and closing tag set, so the text goes between the tags.

Example:

[yith_wcaf_show_if_affiliate] This content will only be visible for affiliates [/yith_wcaf_show_if_affiliate]

Or if you use blocks, you can add the opening shortcode in one block, then add a block with your content, and finally add another shortcode block with the closing shortcode.

If you are not an affiliate, you will not be able to see the content.

Attributes

The shortcode can also be used for more complex cases, thanks to the included attribute that allows you to show the content to specific affiliates only.

The attribute is show_to and following are the accepted values:

  • valid_affiliates: shown only to valid affiliates, that is enabled affiliates and hidden to banned ones.
  • enabled_affiliates: shown only to enabled affiliates.
  • all_affiliatesshown to all affiliates.
  • {user role}if you enter a valid user role name, such as shop_manger, the content will be shown just to users with both the shop manager role.
  • logged_in_users: shown only to logged users.
  • anyone: all users.

You can also combine more than one conditions separated by commas and the content will be displayed if at least one of those is true.

Additionally, it is possible to deny one condition by applying an ! before the condition. This could be useful, for example, if you want to show the content to everyone but affiliates.

Example with attribute:

[yith_wcaf_show_if_affiliate show_to="enabled_affiliates"]
CONTENT FOR AFFILIATES ONLY
[/yith_wcaf_show_if_affiliate]

[yith_wcaf_show_if_affiliate show_to="all_affiliates"]
CONTENT FOR NON-AFFILIATES ONLY
[/yith_wcaf_show_if_affiliate]

“Set Referrer” shortcode

The [yith_wcaf_set_referrer] shortcode inserts a form that gives the user the possibility to enter the affiliate code to whom he/she wants to be associated.

Set referrer shortcode

The only shortcode attribute is affiliate_token which allows you to enter a default affiliation token that will be used in case the customer doesn’t set any referrer.

Elementor

The plugin is fully integrated with Elementor, so you can add the following widget to your pages simply from the Elementor panel. Here you find one example of the widgets that are available:

YITH Affiliate Dashboard

Elementor widgets

The available widgets are, each with its available settings:

  • YITH Affiliate Dashboard
  • YITH Affiliates Registration Form
  • YITH Affiliates Link Generator

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.

The plugin includes 3 blocks.

1. Affiliate Dashboard block

Gutenberg - affiliate dashboard

The block allows you to display the affiliate dashboard and from the attributes you can:

  • Choose the section to show: you can choose between dynamic, which will let your users select the section from the menu and navigate among the multiple sections, or one of the specific sections among commissions, visits, coupons, payments, link generator and settings.
  • Show navitation menu: this allows you to show the navigation menu on top so to let your user move among the many available sections.

2. Registration form block

Gutenberg - registration form

This block will print the affiliate registration form. From the block attributes on the right you will be able to set the following:

  • Show login form: you can include also the login form or show just the affiliate registration form
  • Title to show above login form
  • Title to show above the register form

3. Link generator block

This block allows you to print the Link generator section.

Gutenberg - link generator

WooCommerce Subscriptions

The integration with the WooCommerce Subscriptions plugin allows the admin to enable commissions for affiliates also on renewal orders.

To enable this, make sure both plugins are activated, then, go to the General options page, you’ll see a new option called Enable commission handling for WC Subscriptions’ renews.

Integration with Woo Subscriptions

Choose the option that fits your needs best:

  • Do not handle renewals
  • Register all renews

PayPal MassPay

Please note: since PayPal MassPay is no longer supported it cannot be activated on new users’ accounts.
Yet, users who had previously activated PayPal MassPay service can keep using it to manage payments automatically and can refer to the following information for the configuration.

PayPal MassPay can be used to automate the payment of multiple commissions as one of the automatic gateways.

In order to work properly, you have to set the right credentials from YITH > Affiliates > Commissions & Payments > Payment gateways, by clicking on the pencil icon that appears as you hover it.

This will open a modal window, where you can set up the followiing options:

PayPal MassPay settings

Enter “username”, “password” and “signature” of your PayPal account. Read more on this page if you are not able to find the credentials required.

To complete commission payments correctly by PayPal, your must necessarily have a “Premier” or “Business” account that has to be set up for “MassPay” service. To allow this, you need to make a request to PayPal customer service.

If you want to check if your plugin is working well with a PayPal test account, you can create a Business account: enter the credentials of the new account and tick the option Enable PayPal sandbox.

Whenever an affiliate drives a sale to your shop, you will see the list of commissions in YITH > Affiliates > Commissions > Commissions List.

Commissions list

You will be able to see this payment gateway as a payment option for on the Commissions page, both in the bulk actions and in every single commission.

Masspay bulk actions
MassPay in bulk actions
Mass pay commission actions - commissions view
MassPay in commission actions – commissions view
Masspay commissions action - commission detail
MassPay in commission actions – commission detail

Based on the payment settings, the payment will be either processed automatically (please, see this page) or manually.

A payment record will be created in the Commissions Payments tab. The payment will be temporarily set as Pending and the commissions as Pending payment. Once PayPal completes and confirms the payment, it will be automatically set to Completed and the commissions as Paid.