Home > Docs > PayPal Express Checkout Payment Gateway for WooCommerce > Adding PayPal Express button on any WooCommerce Custom Page

Adding PayPal Express button on any WooCommerce Custom Page

Last updated on October 9, 2023

The PayPal Express Checkout payment gateway for WooCommerce plugin offers the convenience of adding PayPal express buttons to product, cart, and checkout pages by default. However, there may be instances where you 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 PayPal Express buttons for simple products into your custom pages, use the following shortcode format:

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

The shortcode for adding PayPal express button for variable products can be given in the following manner:

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 formats mentioned above, replacing the placeholders with actual values.
Shortcode for PayPal checkout button
Shortcode for PayPal checkout button