Giter VIP home page Giter VIP logo

edd-add-to-cart-urls's Introduction

EDD Add-to-Cart URLs

License: GPLv2 License URI: http://www.gnu.org/licenses/gpl-2.0.html

Adds the appropriate add-to-cart URL for your downloads so they can be easily copied and pasted whenever you need them.

Description

This plugin adds add-to-cart URLs for your Downloads using Easy Digital Downloads. The URLs can be copied directly from a Download's admin screen.

You'll find this plugin useful if you ever find yourself needing to send a potential customer a purchase link for a specific Download (or price option).

Installation

  1. Download the zip file and upload edd-add-to-cart-urls to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress

Usage

After activating the plugin, you can navigate to the edit screen for any of your Downloads.

For Downloads with only one price, the add-to-cart URL is found at the bottom of the Download Prices meta box.

Single Price Downloads - Add-to-Cart URL

For variably priced Downloads, the add-to-cart URL is found under the "advanced" price settings (Download Prices meta box). You can display it by clicking "Show advanced settings" toggle for the corresponding price option.

Variable Price Downloads - Show Advanced Settings

Variable Price Downloads - Add-to-Cart URL

By default, the redirect URI is the Checkout page (set under the EDD settings). This means that customers will be redirected to the checkout page when using the link provided by this plugin. To change the redirect URI, you can use the following filter:

/**
 * Filter the redirect URI for the add-to-cart URL
 *
 * @param (string) $uri - The URI
 * @param (int) $download_id - Download ID
 *
 * @return (string) $uri
 */
function rv_filter_edd_a2curl_redirect_uri( $uri, $download_id ) {
	// Generate some other URI
	return $uri;
}
add_filter( 'edd_a2curl_redirect_uri', 'rv_filter_edd_a2curl_redirect_uri', 10, 2 );

Bugs

If you find an issue, let me know!

Changelog

1.0.0

  • Initial commit

edd-add-to-cart-urls's People

Contributors

renventura avatar

Watchers

James Cloos avatar Kishore Chandra Sahoo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.