- Before you start
- All shortcodes at a glance
- Checkout form
- Receipt
- Store
- Customer account
- Account link
- Order and subscription details
- Order downloads
- Order details as text
- Plan details as text
- Product details as text
- Purchase and subscription checks
- Page builder embeds
- Order summary items
- Affiliate dashboard and sign-up
- Domain checker
- Tips for using shortcodes
PublishPress Cart has shortcodes that put checkout forms, receipts, a store, customer accounts and order details on any page. Use them when you don’t want to use a block, or when you build with a page builder.
Most shortcodes are in PublishPress Cart Free. A few need PublishPress Cart Pro, and the list below says which.
Before you start #
You need:
- PublishPress Cart Free or Pro installed and active. The shortcodes marked Pro in All shortcodes at a glance need PublishPress Cart Pro.
- A place for the shortcode: a Shortcode block, the classic editor or a page builder text widget.
- A product ID for shortcodes that use one. Find it in Cart → Products. The products list also has a button that copies the product’s checkout shortcode.
All shortcodes at a glance #
| Shortcode | What it shows | Version |
|---|---|---|
[ppcart_form] | A checkout form for one product | Free |
[ppcart_receipt] | The order details on a thank-you page | Free |
[ppcart_store] | A grid of your products | Free |
[ppcart_account] | The customer account area | Free |
[ppcart_account_link] | A link to the account page | Free |
[ppcart_account_order_detail] | One order | Free |
[ppcart_account_subscription_detail] | One subscription | Free |
[ppcart_order_downloads] | The files for an order | Free |
[ppcart_order_detail] | One detail of an order, as text | Free |
[ppcart_plan] | One detail of a payment plan, as text | Free |
[ppcart_product] | A product name or limit, as text | Free |
[ppcart_customer_bought_product] | A purchase check, for developers | Free |
[ppcart_customer_has_subscription] | A subscription check, for developers | Free |
[ppcart_checkout_form] and the [ppcart_account_*] embeds | Checkout and account blocks as shortcodes | Free |
[ppcart_order_summary_items_view] | The order summary items in the Split-in checkout | Pro |
[ppcart_affiliate_dashboard] | An affiliate’s dashboard | Pro |
[ppcart_affiliate_signup] | The affiliate application form | Pro |
[ppcart_wpdomainchecker] | A domain search that leads to checkout | Pro |
Checkout form #
Shows the checkout form for a product.
[ppcart_form id="42" plan="monthly" coupon="VIP20" hide_labels="hide" template="2-step"]| Attribute | What it does |
|---|---|
id | The product ID. If you leave it out, Cart uses the product page the shortcode is on. |
plan | Selects a payment plan when the form loads. Use the plan’s ID or its URL slug. |
coupon | Applies a coupon code to the form. |
hide_labels | Set to hide to hide the field labels. |
template | The checkout layout: normal, 2-step, opt-in or split-in. If you leave it out, Cart uses the layout set on the product. split-in needs Pro. |
Use it on any page or post. After a customer buys and lands on the page with ppcart-order in the URL, the shortcode shows the product’s confirmation message and receipt instead of the form.
Receipt #
Shows the order details on a thank-you page: items, discounts, tax, shipping and total.
[ppcart_receipt]It has no attributes. It needs ppcart-order in the page URL, so a Perform redirect confirmation must include ppcart-order={order_id}. It only shows to an admin, the customer who placed the order, or a visitor with the order’s link token.
Store #
Shows a grid of your products with pagination.
[ppcart_store cols="4" posts_per_page="8" button_text="Buy now"]| Attribute | What it does | Default |
|---|---|---|
button_text | The text on each product button. | Purchase |
purchased_text | The button text for customers who already bought a product. | Already Purchased |
posts_per_page | How many products to show per page. | 12 |
cols | How many columns, usually 3 or 4. | 3 |
Customer account #
Shows the customer account area. A logged-in customer sees tabs for orders, subscriptions, installment plans and their profile, plus downloads when the files feature is in use. A logged-out visitor sees the login form.
[ppcart_account]| Attribute | What it does |
|---|---|
tab | Shows one tab only: order-history, subscriptions, plans or user-profile. |
hide_login | Set to true to hide the login form from logged-out visitors. |
Put this shortcode on the page you choose as the My Account Page in Cart → Settings. Cart uses that page for links in emails and in the account link.
Account link #
Shows a link to the customer account page. It doesn’t show on the account page itself, or when no account page is set.
[ppcart_account_link label="Manage your orders"]| Attribute | What it does | Default |
|---|---|---|
label | The link text. | My Account |
Order and subscription details #
Show one order or one subscription from the customer’s account. The customer must be logged in and own the order or subscription.
[ppcart_account_order_detail order="123"]
[ppcart_account_subscription_detail plan="456"]| Shortcode | Attribute | What it does |
|---|---|---|
[ppcart_account_order_detail] | order | The order ID. If the page URL has ppcart-order, the URL wins. |
[ppcart_account_subscription_detail] | plan | The subscription ID. If the page URL has ppcart-plan, the URL wins. |
Order downloads #
Shows the download links for the files in an order. Use it on a thank-you page.
[ppcart_order_downloads show-title="0"]| Attribute | What it does | Default |
|---|---|---|
id | The order ID. By default Cart reads it from ppcart-order in the URL. | From the URL |
full | Include files from upsells and related orders. Use 0 to turn it off. | On |
show-title | Show the “Downloads” heading. Use 0 to turn it off. | On |
Order details as text #
Shows one piece of information about an order, as plain text. Use it on a thank-you or upsell page.
[ppcart_order_detail field="customer_firstname"]field value | What it shows |
|---|---|
order_id | The order number |
customer_firstname | The customer’s first name |
customer_lastname | The customer’s last name |
customer_name | The customer’s full name |
customer_email | The customer’s email |
customer_phone | The customer’s phone number |
order_list | The items, as a list |
order_inline_list | The items, on one line |
order_amount | The order total |
product_amount | The product amount |
Always set field. The shortcode only shows to the customer who placed the order, or an admin.
Plan details as text #
Shows one piece of information about a payment plan, as plain text.
[ppcart_plan product_id="42" plan_id="abc123" field="price"]| Attribute | What it does | Default |
|---|---|---|
product_id | The product the plan belongs to. If you leave it out, Cart uses the current page. | Current page |
plan_id | The plan’s ID or URL slug. Required. | None |
field | The detail to show, such as name, price, initial_payment, interval, frequency, trial_days or installments. Recurring-only details work only on recurring plans. | name |
The price field is formatted with your currency.
Product details as text #
Shows a product’s name or limit, as plain text.
[ppcart_product id="42" field="name"]| Attribute | What it does | Default |
|---|---|---|
id | The product ID. If you leave it out, Cart uses the product being checked out. | Current checkout |
field | name or limit. | name |
Purchase and subscription checks #
These two shortcodes don’t show anything useful on a page. They return an ID, or nothing, so developers can use them in code with do_shortcode() to check whether a customer has bought something.
do_shortcode('[ppcart_customer_bought_product user_id="5" product_id="42"]');
do_shortcode('[ppcart_customer_has_subscription user_id="5" product_id="42"]');| Attribute | [ppcart_customer_bought_product] | [ppcart_customer_has_subscription] |
|---|---|---|
email | Yes | Yes |
user_id | Yes | Yes |
product_id | Yes | Yes |
plan_id | Yes | Yes |
ip_address | Yes | No |
Page builder embeds #
These shortcodes show the checkout and account blocks, so you can use them where blocks are not available.
| Shortcode | What it shows |
|---|---|
[ppcart_checkout_form] | The checkout form. It uses id, plan and coupon only. |
[ppcart_account_page_builder] | The login form, navigation and all account tabs together. |
[ppcart_account_navigation] | The account tab navigation. |
[ppcart_account_tab component="account-subscriptions"] | One account tab. |
[ppcart_account_orders] | The orders tab. |
[ppcart_account_subscriptions] | The subscriptions tab. |
[ppcart_account_payment_plans] | The installment plans tab. |
[ppcart_account_profile] | The profile tab. |
[ppcart_account_downloads] | The downloads tab. It needs the files feature. |
[ppcart_account_login] | The login form. |
For [ppcart_account_tab], the component attribute is one of account-orders (the default), account-subscriptions, account-payment-plans, account-profile or account-downloads.
The account tabs show only to logged-in customers. Cart also has matching Elementor widgets for each of these.
Order summary items #
This section requires PublishPress Cart Pro.
Shows the order summary items inside a product’s own content. Use it with the Split-in checkout layout, for example [ppcart_form template="split-in"], and put the shortcode in the product’s description where the summary should appear.
[ppcart_order_summary_items_view]It has no attributes. It works only on the Split-in layout, so on other layouts it shows as plain text.
Affiliate dashboard and sign-up #
This section requires PublishPress Cart Pro with the Affiliate extension turned on.
[ppcart_affiliate_dashboard]
[ppcart_affiliate_signup][ppcart_affiliate_dashboard]shows an affiliate’s earnings, products, commissions, payouts and recent visits. Put it on a page for logged-in affiliates. Visitors who are not affiliates see a message that they need to be an affiliate.[ppcart_affiliate_signup]shows the application form: name, email, PayPal email, website and bio. Put it on a public page.
Neither shortcode has attributes.
Domain checker #
This section requires PublishPress Cart Pro and the WPDomainChecker plugin.
Shows a domain search that sends the customer to your product’s checkout with the chosen domain filled in.
[ppcart_wpdomainchecker ppcart_item_id="42"]| Attribute | What it does |
|---|---|
ppcart_item_id | The product ID the customer is sent to. Required. |
Tips for using shortcodes #
- Put quotation marks around every attribute value.
- Check that the product ID is correct. A wrong ID shows nothing.
- Test pages that use
ppcart-orderby completing a test order, because the shortcode needs a real order in the URL. - If a shortcode shows as plain text on the page, check that it is spelled exactly as shown, and that the feature it needs, such as Pro or the Affiliate extension, is active.
