Skip to main content
Easy Digital Downloads Documentation
Documentation, Reference Materials, and Tutorials for Easy Digital Downloads

Creating Cross-sells and Upsells

Creating Cross-sells and Upsells

With the
EDD Cross-sells and Upsell extension, creating either a cross-sell or upsell is easy and intuitive. Follow the steps below to setup your Cross-sells/Upsells.

  1. Visit the download in the WordPress admin that you would like to add cross-sells/upsells for
  2. Scroll down to the new Cross-Sell & Upsell metabox area
  3. Set specific headings if necessary, otherwise the headings from the main settings area will be used.
  4. Click into the provided fields, and select your desired products that will be the Cross-sell or Upsell item(s)
  5. Save

Cross-sells will be shown on the checkout page, and upsells will be shown on the individual product page.

Cross-sell & Upsell Settings

Once installed and activated, a new EDD Cross-sell Upsell Settings section will appear when navigating to Downloads → Settings → Extensions → Cross-sell & Upsell.

Default Upsell Heading

This is the default heading shown on single product pages. Headings are also customizable on a per-product basis from each individual product page.

Default Cross-sell Heading

This is the default heading shown at checkout for Cross-sell products. Headings are also customizable on a per-product basis from each individual product page. If multiple cross-sells are shown from different products, then the default heading is used.

Maximum Upsells To Show

This is the maximum number of upsells that will be shown on a single product page

Maximum Cross-sells To Show

This is the maximum of upsells that will be shown on a single product page

Removing the Excerpt

To remove the excerpt using the
Cross-sells and Upsells addon, copy and paste one of the following functions (mind the opening PHP tag, as it’s not needed if code is being added to existing PHP file) into your child theme’s functions.php or a custom plugin.

This example shows how you can remove the excerpt.

	/**
	 * EDD Cross-sell & Upsell - Removing the excerpt
	 * https://easydigitaldownloads.com/extensions/cross-sell-and-upsell/?ref=166
	*/
	function sumobi_edd_csau_show_excerpt() {
		return false;
	}
	add_filter( 'edd_csau_show_excerpt', 'sumobi_edd_csau_show_excerpt' );

This example shows how you can remove the excerpt, but only on single download pages.

	/**
	 * EDD Cross-sell & Upsell - Removing the excerpt, but only on single download pages
	 * https://easydigitaldownloads.com/extensions/cross-sell-and-upsell/?ref=166
	*/
	function sumobi_edd_csau_show_excerpt() {
		if ( is_singular( 'download' ) ) {
			return false;
		}

		return true;
	}
	add_filter( 'edd_csau_show_excerpt', 'sumobi_edd_csau_show_excerpt' );

Unhook Upsells From a Single Product Page

With Cross-sells and Upsells, if you want to remove the upsells from displaying after the content, you can use the filter below.

You may wish to do this if you wanted to re-hook the upsells onto another action hook.

	remove_filter( 'the_content', 'edd_csau_single_download_upsells', 100 );

Move Cross-sells About Product Listing on Checkout

By default with the Cross-sells and Upsells addon, the Cross-sells are shown just below the product listing on the checkout page. If you would like them to appear above the product listing you can paste the following code into your theme’s functions.php:

	function sumobi_edd_csau_move_cross_sells_at_checkout() {
	    // remove cross-sells from after the product listing at checkout
	    remove_action( 'edd_after_checkout_cart', 'edd_csau_display_on_checkout_page' );

	    // add the cross-sells before the product listing at checkout
	    add_action( 'edd_before_checkout_cart', 'edd_csau_display_on_checkout_page' );
	}
	add_action( 'template_redirect', 'sumobi_edd_csau_move_cross_sells_at_checkout' );

Custom Headings

Custom headings on your Cross-sells and Upsells are a great way to not only increase sales but build customer relationships.

Upsell Heading

In the Settings for Cross-sells and Upsells, you can set a default Upsell heading. You can further enhance the power of this extension by making custom headings for specific Downloads. Each Download has a metabox for managing the heading.

In the referenced metabox above, you have the ability to set a custom heading that is shown above the upsell products on the individual product page. This is perfect for creating a more personal message that relates to the products being offered.

Cross-sell Heading

The custom Cross-sell heading is shown on the checkout page. If your customer has a song (by their favorite music artist for example) in their shopping cart, you could offer more songs from that artist as a cross-sell.

If the customer happens to have something completely unrelated in their cart which also triggers a cross-sell product, the fallback heading is shown (this is set by navigating to Downloads → Settings → Extensions → Cross-sell & Upsells)

Remove the Stylesheet

The Cross-sells and Upsells addon comes with styles that affect the output of the suggested downloads.

You can remove the stylesheet that the extension loads by adding the below code to your theme’s functions.php file or through a custom plugin.

	function sumobi_edd_csau_deregister_styles() {
		wp_deregister_style( 'edd-csau-css' );
	}
	add_action( 'wp_enqueue_scripts', 'sumobi_edd_csau_deregister_styles', 20 );

Filtering Products in the Admin

With the Cross-sells and Upsells addon, products can be filtered in the WordPress admin on the main Downloads page via the dropdown menus above the downloads. A new dropdown menu will be added where you can quickly show:

  • Downloads with cross-sells
  • Downloads with upsells
  • Downloads with both cross-sells and upsells

Combined with the standard WordPress filter options, it’s a powerful way to quickly find all your downloads with cross-sells and upsells.