Home > Docs > PayPal Express Checkout Payment Gateway for WooCommerce > Adding a PayPal Express button on WooCommerce Custom Pages

Adding a PayPal Express button on WooCommerce Custom Pages

Last updated on August 30, 2024

The PayPal Express Checkout payment gateway for the WooCommerce plugin allows you to add PayPal express buttons to product, cart, and checkout pages by default. However, you may want to display these payment buttons on custom pages. This can be easily achieved by using the provided shortcode.

PayPal Express Button
PayPal Express Button

Shortcode to insert the PayPal Express button

To insert PayPal Express buttons for simple products into your custom pages, use the following shortcode format:

When using this shortcode on your custom page, replace “product id” with the actual product ID and “number of quantity” with the desired quantity of the product.

The shortcode for adding the PayPal express button for variable products is given below:

In this case, replace “product id” with the product ID, “number of quantity” with the quantity, and “variation id” with the variation ID specific to the product and variation you want to display on your custom page.

Sample demo

Follow these steps to insert the shortcode and assign it to the relevant product and parameters to display a PayPal checkout button on your custom page:

  1. Edit the custom page where you want to add the PayPal Express button.
  2. Insert the appropriate shortcode using the above formats, replacing the placeholders with actual values.
Shortcode for PayPal checkout button
Shortcode for PayPal checkout button