This document explains how to use the shortcodes available in the EDD All Access extension for Easy Digital Downloads.
Provide All Access Pass details to customers
This shortcode will output a list of the customer’s All Access Passes along with all of the relevant details. We recommend putting it on their Customer account page.
Sample output from the
Once the customer clicks on “View Full Details”, they will see more details about that All Access Pass:
Note: If the All Access Pass has a download limit, the customer will see additional information about when their download limit period expires and starts over.
Show users how many downloads they have left
This shortcode will output how many downloads a pass customer has remaining and the date they expire.
There are three optional parameters:
- download_id=”123,654″ allows you to specify specific All Access Downloads that you want to appear in the shortcode output. If the customer does not own the specified download, no output will appear.
- message=”message text here”
- %1$s is the name of the pass.
- %2$d is the number of downloads left placeholder
- %3$d is the total number of downloads placeholder
- expiration=” expiration text here”
- %1$s is the expiration date placeholder
Shortcode example with parameters:
[edd_aa_download_limit download_id="123" message="%1$s has %2$d of %3$d downloads remaining." expiration="Remaining downloads expire %1$s."]
Sample output from the
All Access Pass Purchase & Login buttons
This shortcode is powerful for giving your customers a great user experience. It gives you a quick and easy way to get customers to log in and/or to purchase a specific All Access Pass. It’s perfect for a page where you might be advertising an All Access Pass but also want existing All Access Pass customers to be able to log in.
This shortcode will show one of 3 different things:
1. Logged out: If the customer is logged out, they will see both “Login” and “Buy Now” buttons.
2. Logged in without access: If they are logged in but haven’t purchased the All Access Pass, they will only see the “Buy Now” button for the All Access Pass.
3. Logged in with access: If they are logged in AND have purchased the All Access Pass, they will see a “success” message. By default that message is:
“You have an All Access Pass for Product X”. You can also set it up to automatically redirect them to a different page (like a “VIP Welcome” page). Alternatively, you can also have it show restricted HTML content to users who have this All Access Pass. Note: In the below example “All Access 2 Products” is the download/product name.
This shortcode can accept the following parameters:
- id – the ID number of the All Access download required
- price – whether to show the product price or not. 1 to show it, 0 to hide it.
- text – the text displayed on the Buy Now button
- style – the style of the purchase link, either “button” or “text”
- color– the color of the button (when using the “button” style”:
- dark gray
- class – one or more custom CSS classes you want applied to the All Access Buy button
- popup_login – Whether the login form should open in a popup modal. If you want it to, use “true” here. Otherwise leave blank.
- buy_instructions – Text Instructions above the Buy Now button. If blank this will not be shown.
- login_instructions – Text Instructions above the Login button. If blank this will not be shown.
- login_btn_style – the style of the login link, either “button” or “text”. Default is “text”.
- direct – whether the purchase button should send the customer straight to PayPal or to the checkout screen.
- preview_image – A URL to an image which will show if the user does not have access.
- success_redirect_url – The URL the user should be directed to if they are logged in and have the All Access Pass.
- success_text – The message shown to a user before they are redirected when successfully logged in and purchased. By default this is “You have an All Access Pass for Product X”.
To display a log in button and a purchase button and redirect the user if they are logged in with an All Access Pass, use the shortcode like this:
[edd_aa_all_access id="94" price_id="0" text="Add to Cart" style="button" popup_login="true" success_redirect_url="https://mywebsite.com/vip-welcome" success_text="Great! You have All Access"]
Restricting Content using
Instead of using success_text, you can also show success content. This is perfect for single pages where you want to restrict exclusive content to All Access Pass holders. To show exclusive, restricted content to All Access Pass Holders, use the shortcode like this:
[edd_aa_all_access id="YOUR_ALL_ACCESS_PRODUCT_ID_HERE"] Your restricted content goes here. It can be HTML. [/edd_aa_all_access]
Restricting Content using
[edd_aa_all_access] with a preview image and instructional text
To show a preview image as well as output custom instructional messages to the user, use the shortcode like this:
[edd_aa_all_access id="YOUR_ALL_ACCESS_PRODUCT_ID_HERE" preview_image="http://url-to-image.jpg" buy_instructions="Buy Now to unlock access" login_instructions="Already purchased? Login here to unlock access"] Your restricted content goes here. It can be HTML. [/edd_aa_all_access]
You can also place other shortcodes into the restricted area. For example, you may wish to show a user’s purchase history in the same place they log in or buy. To do that, use something like this:
[edd_aa_all_access id="YOUR_ALL_ACCESS_PRODUCT_ID_HERE" buy_instructions="Buy Now to unlock access" login_instructions="Already purchased? Login here to unlock access"] [purchase_history] [/edd_aa_all_access]
This shortcode is very simple and can be used to output content only if the customer has a specific all access pass. It’s a simplified version of
[edd_aa_all_access]. Example Usage:
[edd_aa_restrict_content id="YOUR_ALL_ACCESS_PRODUCT_ID_HERE"] Restricted content goes here. It can be anything you'd like - even HTML. [/edd_aa_restrict_content]
Output content for those without access to a specific pass
This shortcode is very simple and can be used to output content only if the customer DOES NOT have a specific all access pass. For example, you may wish to show “sales” information only if the customer hasn’t purchased yet. Example Usage:
[edd_aa_no_access_pass id="YOUR_ALL_ACCESS_PRODUCT_ID_HERE"] Sales content goes here. It can be anything you'd like - even HTML. [/edd_aa_no_access_pass]
Show products included in a customer pass
[downloads] shortcode (which is part of Easy Digital Downloads itself), can be modified to only show products that the customer has access to through All Access. To do so, simply add this to the shortcode: all_access_customer_downloads_only=”yes”.
[purchase_link] text for customers who own a pass
[purchase_link all_access_download_now_text="Download Now"]
[purchase_link] shortcode (which is part of Easy Digital Downloads itself), allows you to modify the text shown to your All Access customers so that you can modify the “Download Now” text. To do so, simply add this to the shortcode: all_access_download_now_text=”Download Now”. Then, replace the “Download Now” with your own custom message.
[purchase_link all_access_download_now_text="YOUR CUSTOM TEXT HERE"]