All Collections
Express Checkout
WordPress shortcode for Express Checkout
WordPress shortcode for Express Checkout

Add the PeachPay Express Checkout button anywhere on a WooCommerce store using WordPress shortcodes.

Vikrant Sant avatar
Written by Vikrant Sant
Updated over a week ago

PeachPay supports WordPress shortcodes for placing the Express Checkout button in a custom location in your theme.


Example

[peachpay product_id="16" text="Buy now" icon_class="pp-cart-icon" text_color="white" background_color="red" border_radius="25" width="150" display_available_payment_icons=true]

product_id is optional, and without it, the button will open the Express Checkout.

PeachPay shortcode attributes

All attributes are optional, and if not set, they will default to the value set in the PeachPay settings. If the value is not set in the PeachPay settings, it will default to what that setting defaults to.

text

  • Description: Change the text on the checkout button.

icon_class

  • Description: Change the icon displayed on the checkout button.

  • Example: To use Font Awesome or similar icons which you already have on your theme, add that icon’s CSS class.

effect_class

  • Description: Change the hover effect on the button.

  • Possible values: fade or none

text_color

  • Description: Change the text color.

  • Possible values: Any CSS color value, including hex.

background_color

  • Description: Change the color of the bottom.

  • Possible values: Any CSS color value, including hex.

border_radius

  • Description: Change the border radius (how rounded the edges are) on this button.

  • Type: number

width

  • Description: Change the button width.

  • Default: 220

  • Possible values: Any number

product_id

  • Description: The product that will be added to cart when the checkout button is clicked. If the product_id is invalid, the shortcode will show a error message when viewed by admin users.

  • Possible values: Any number representing a product ID in WooCommerce.

display_available_payment_icons

  • Description: Set whether the available payment icons should be displayed below the checkout button.

  • Possible values: true or false

available_payment_icons_maximum

  • Description: Change the maximum number of available payment icons to display below the button. This only takes effect if display_available_payment_icons is set to true.

  • Default: 4

  • Possible values: Any number

Did this answer your question?