DevelopersEmbedsWordPress plugin
Embeds

WordPress plugin

Every Paylead embed as a WordPress shortcode. No code to copy, and Paylead only loads on pages that use it.

Install it

  1. Download the plugin: paylead.zip. It's also in Settings → Developers → Embeds.
  2. In WordPress go to Plugins → Add New Plugin → Upload Plugin, choose the zip and click Install Now, then Activate.
  3. Go to Settings → Paylead and enter your store address: the end of your store link, for example amas-studio in paylead.app/s/amas-studio. You can paste the whole link.

Then add a shortcode to any page, post or Shortcode block. The WordPress tab in any Embed window in Paylead writes the shortcode for you.

Shortcodes

Embed Shortcode
Buy button [paylead_buy code="k3x9pa"]Buy the ebook[/paylead_buy]
Product card [paylead_product code="k3x9pa" layout="row"]
Booking calendar [paylead_booking code="k3x9pa"]
Course card [paylead_course code="k3x9pa"]
Webinar sign-up [paylead_webinar code="w8b2nd"]
Subscribe button [paylead_subscribe code="k3x9pa" ref="user"]Join[/paylead_subscribe]
Pricing table [paylead_pricing plans="basic1,pro22" featured="pro22"]
Pay or donate button [paylead_pay link="church-giving"]Give[/paylead_pay]
Pay or donate box [paylead_pay_box link="church-giving" amounts="20,50,100"]
Product grid [paylead_store category="courses" limit="6"]
Newsletter box [paylead_newsletter heading="Get my weekly tips" ask_name]
Tip button [paylead_tip floating="yes"], or [paylead_tip]Buy me a coffee[/paylead_tip]
Form or scorecard [paylead_form code="AbC123"], with mode="popup" or mode="slide-in"

The product grid, newsletter and tip shortcodes use the store from Settings → Paylead. Add store="…" to use another.

Options

Every shortcode takes the same options as the embed attributes, written with underscores:

Option
accent A colour like #0b2c2e. Defaults to the colour in Settings → Paylead
scheme light, dark or auto
radius none, small, medium, large or full
button_text The button inside cards, calendars and boxes
text The words on a button shortcode, if you don't put them between the tags
class CSS classes for a button shortcode. Defaults to your theme's button style
prefill_email, prefill_name, prefill_phone Fill in the buyer's details
test Test mode for subscribe buttons and pricing tables

Members' sites

On a membership site, add ref="user" to a Subscribe button or pricing table. Paylead gets the signed-in WordPress user as wp- plus their user ID (for example wp-42), with their email and name filled in. Check access with GET /access?ref=wp-42, or listen for webhooks.

Good to know

  • Paylead's script only loads on pages with a Paylead shortcode. To use your own data-paylead-* buttons, turn on Load on every page in Settings → Paylead.
  • A shortcode with a missing code shows a red notice to editors only. Visitors see nothing.
  • Deleting the plugin removes its settings. Nothing else is stored in WordPress.