This page contains some advanced features or changes regarding the Selling Ads add-on.

Customizing setup emails

By default, the Selling Ads add-on sends out unstyled emails to clients and the ad manager during the ad setup process after the order. In order to customize these messages, you can use the advanced-ads-selling-email-option filter, which you can find in the plugin’s source code. It allows you to customize not only the content of the email, but also options like sender or the email header.

Display ad setup form below the page content

Set the ADVANCED_ADS_SELLING_SHOW_SETUP_FORM_AFTER_CONTENTconstant in your wp-config.php file to true to show the ad setup form after the content when a specific page is selected. The default behavior is to add the setup form before the rest of the content.

Extending the ad setup form with custom fields

Extending the ad setup form (the one that allows users to upload their ad content after the purchase) needs technical knowledge. If you are not technical, then consider getting additional information via email from clients, if you only have a few purchases or consider adding fields to the checkout page through a plugin like this one.

Adding your own fields to the ad setup page needs two steps:

  1. show the fields on the page
  2. store the values of the fields

Showing additional fields

You can add your own additional fields to the form using the advanced-ads-selling-ad-setup-form-types-after action hook. It is located in public/views/ad-setup-form.php. Look at the code around that hook for some examples on the fields already used.

Storing values from additional fields

Store your additional fields by using the advanced-ads-selling-save-ad-content-after action hook. The function that contains the action stores the ad information from the setup page, which might help you as an example. You can find it in the save_ad_content() function in public/public.php.

Adding more ad types to the ad setup page

The advanced-ads-selling-product-tab-ad-types filter can be used to allow ad clients to choose from other than the HTML or image ad type when uploading their ads on the ad setup page. You need to use the internal identifiers for the existing ad types. The identifier of the Rich Content ad type is content.