The PayPal Express Checkout payment gateway for the WooCommerce plugin lets you add PayPal express buttons to product, cart, and checkout pages by default. However, if you want to show these payment buttons on custom pages, you can easily do so using the available short-code.

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 you use this shortcode on your custom page, substitute “product id” with the real product ID and “number of quantity” with the preferred quantity of the product.
The shortcode for inserting the PayPal express button for variable products is provided below:

In this scenario, substitute “product id” with the actual product ID, “number of quantity” with the quantity, and “variation id” with the specific variation ID for the product and variation you wish to show on your custom page.
Sample demo
Follow these steps to add the shortcode and link it to the appropriate product and settings to show a PayPal checkout button on your custom page:
- Modify the custom page where you intend to include the PayPal Express button.
- Edit the custom page where you plan to add the PayPal Express button.
