Title: PayPal Checkout button
Last modified: May 10, 2020

---

# PayPal Checkout button

 *  [joaopegb](https://wordpress.org/support/users/joaopegb/)
 * (@joaopegb)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/paypal-checkout-button/)
 * I’m using the WooCommerce PayPal Checkout Gateway plugin and I wanted to change
   the default button placement to be above the Add to Cart (product page) or Proceed
   to checkout (cart page).
 * To have the following order:
 * Pay Now (WooCommerce Stripe Gateway plugin)
    PayPal Buy Now (WooCommerce PayPal
   Checkout Gateway plugin) — OR — Add to Cart/Proceed to checkout
 * Is this possible?
 * This is the link to my website: [https://drive.google.com/file/d/1RaSKQ7ydohFhx_-3kF2HqNCUeTgJBQhm/view?usp=sharing](https://drive.google.com/file/d/1RaSKQ7ydohFhx_-3kF2HqNCUeTgJBQhm/view?usp=sharing)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Peter Lawrenson](https://wordpress.org/support/users/lorro/)
 * (@lorro)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/paypal-checkout-button/#post-12812055)
 * For the PayPal button, try this snippet in functions.php for your child theme:
 *     ```
       <?php
       add_action( 'woocommerce_after_add_to_cart_quantity',  'my_function', 1 );
       function my_function() {
         $handler = new WC_Gateway_PPEC_Cart_Handler;
         $handler->display_paypal_button_product();
       }
       ```
   
 * And to fix the display issue, try this custom css:
 *     ```
       .wcppec-checkout-buttons {
         clear: both;
         margin-top: 50px !important;
       }
       ```
   
 * Custom css can be entered at:
    Dashboard > Appearance > Customise > Additional
   CSS
 * Can’t help with the Stripe button.
 *  Thread Starter [joaopegb](https://wordpress.org/support/users/joaopegb/)
 * (@joaopegb)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/paypal-checkout-button/#post-12816372)
 * The snippet worked fine for changing the placement in the product page but the
   CSS it’s not fixing the display issue.
 * Currently it looks like this: [https://drive.google.com/file/d/1v7KsJKG_832P0VE6zpF18pU2fjZdeA0O/view?usp=sharing](https://drive.google.com/file/d/1v7KsJKG_832P0VE6zpF18pU2fjZdeA0O/view?usp=sharing)
 * Also do you have a snippet for changing the placement in the cart page?
 * Thanks
 *  [Peter Lawrenson](https://wordpress.org/support/users/lorro/)
 * (@lorro)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/paypal-checkout-button/#post-12816762)
 * It doesn’t look like your image from here. Presumably Fastest Cache has been 
   reset since you posted.
 * For the cart page, try:
 *     ```
       remove_action( 'woocommerce_proceed_to_checkout', 'woocommerce_button_proceed_to_checkout', 20 );
       add_action( 'woocommerce_proceed_to_checkout', 'woocommerce_button_proceed_to_checkout', 30 );
       ```
   
 * and to remove the “or” which is now in the wrong place,
 *     ```
       .wcppec-checkout-buttons__separator {
         display: none !important;
       }
       ```
   
 *  Thread Starter [joaopegb](https://wordpress.org/support/users/joaopegb/)
 * (@joaopegb)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/paypal-checkout-button/#post-12816835)
 * That almost did the job…
 * But still it isn’t exactly the same as the product page, take a look: [https://drive.google.com/file/d/1NwTtJfYJhZyBzeQ9BdjkRKsRf7iE2NK4/view?usp=sharing](https://drive.google.com/file/d/1NwTtJfYJhZyBzeQ9BdjkRKsRf7iE2NK4/view?usp=sharing)
 * Is it possible to achieve the same placement?
 *  [Peter Lawrenson](https://wordpress.org/support/users/lorro/)
 * (@lorro)
 * [6 years ago](https://wordpress.org/support/topic/paypal-checkout-button/#post-12847116)
 * I think moving the default positions of both PayPal and Stripe would be turning
   this into a developer job. It would need a bit more code than is normally seen
   in a forum answer. You may have to have both after the add-to-cart as default
   or get someone in to code the change.
 *  Thread Starter [joaopegb](https://wordpress.org/support/users/joaopegb/)
 * (@joaopegb)
 * [6 years ago](https://wordpress.org/support/topic/paypal-checkout-button/#post-12847464)
 * Wouldn’t it be possible to reuse similar code to the one used in the product 
   page?
 * Because currently from a user experience point of view, the placement doesn’t
   make sense. The PayPal button is similar to Stripe Pay Now button and both of
   them an alternative to ‘Proceed to checkout’.
 * So I don’t see it as a developer job but rather something that needs to be fixed
   in the plugin, don’t you agree? This way everyone could benefit from this change/
   improvement.
 *  [Peter Lawrenson](https://wordpress.org/support/users/lorro/)
 * (@lorro)
 * [6 years ago](https://wordpress.org/support/topic/paypal-checkout-button/#post-12848604)
 * There can’t be enough settings.
 * But WooCommerce is the primary software here, so its up to the payment gateway
   plugins to position themselves as they see best. WooCommerce gives plugin developers
   loads of hooks so they can intercept execution at a point of their choosing. 
   You’ll need to make the repositioning suggestion on the relevant gateway forums.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘PayPal Checkout button’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [paypal](https://wordpress.org/support/topic-tag/paypal/)

 * 7 replies
 * 2 participants
 * Last reply from: [Peter Lawrenson](https://wordpress.org/support/users/lorro/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/paypal-checkout-button/#post-12848604)
 * Status: not resolved