Title: Paypal functionality
Last modified: September 1, 2016

---

# Paypal functionality

 *  Resolved [rdavenport3](https://wordpress.org/support/users/rdavenport3/)
 * (@rdavenport3)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/paypal-functionality/)
 * Hello,
    My question is: can I remove the button for paypal checkout on the Cart
   page? I would prefer to send the customer through the paypal prompt only after
   they see all the options of payment which is shown on the checkout page (after
   the cart page).
 * I am using woocommerce and on the Cart page, the buttons at the bottom are:
    
   1.Paypal Checkout (through Braintree) 2.Update Cart 3.Proceed to Checkout
 * If Proceed to Checkout is clicked without first going through the Paypal Checkout
   prompt then the customer goes to the Checkout page and can select either credit
   card or paypal as the payment method. If paypal is checked then the login for
   paypal comes up when Place Order button is clicked.
 * [https://wordpress.org/plugins/woocommerce-gateway-paypal-powered-by-braintree/](https://wordpress.org/plugins/woocommerce-gateway-paypal-powered-by-braintree/)

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

 *  [Mike M. a11n](https://wordpress.org/support/users/mikedmoore/)
 * (@mikedmoore)
 * Automattic Happiness Engineer
 * [9 years, 10 months ago](https://wordpress.org/support/topic/paypal-functionality/#post-7627140)
 * Hey there,
 * The following code snippet will remove the PayPal button from the Cart page:
 *     ```
       add_filter( 'wc_gateway_paypal_braintree_data', '_wc_remove_braintree_checkout_with_paypal' );
   
       function _wc_remove_braintree_checkout_with_paypal( $data ) {
           unset( $data['checkoutWithPayPal'] );
           return $data;
       }
       ```
   
 * Hope that helps!
 *  Thread Starter [rdavenport3](https://wordpress.org/support/users/rdavenport3/)
 * (@rdavenport3)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/paypal-functionality/#post-7627142)
 * Hello Mike, Thanks so much for the reply. I have not done any .php editing, but
   your reply got me looking. Which .php file do you suggest I put this in?
 * Also, now that you have me looking- I found another piece of code that is also
   of interest for doing this:
 *     ```
       /**
       	 * Whether checkout with PayPal from cart page is supported.
       	 *
       	 * @since 1.2.2
       	 *
       	 * @return bool Returns true if supported
       	 */
       	private function _is_checkout_from_cart_supported() {
       		return is_cart() && $this->does_checkout_with_paypal_support_shop_currency() && ! $this->does_cart_contain_any_subscriptions();
       	}
       ```
   
 * Thank you for the help. Let me know where you suggest adding your filter or if
   I can just make this a constant false boolean. Would there be any ripple effects
   for that?
 *  [Mike M. a11n](https://wordpress.org/support/users/mikedmoore/)
 * (@mikedmoore)
 * Automattic Happiness Engineer
 * [9 years, 10 months ago](https://wordpress.org/support/topic/paypal-functionality/#post-7627143)
 * Sorry about that! I should’ve included more information. This code snippet would
   need to be added to your themes `functions.php` file or via a plugin such as 
   [Code Snippets](https://wordpress.org/plugins/code-snippets/).
 * > Thank you for the help. Let me know where you suggest adding your filter or
   > if I can just make this a constant false boolean. Would there be any ripple
   > effects for that?
 * Editing the plugin directly is a bad idea. Any changes would be overwritten in
   future updates.
 * Let me know if you have any trouble!
 *  Thread Starter [rdavenport3](https://wordpress.org/support/users/rdavenport3/)
 * (@rdavenport3)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/paypal-functionality/#post-7627228)
 * Thank you Mike,
 * I got the code in and it worked well on the cart page, however, there is a new
   issue on the checkout page:
 * Error: PayPal Powered by Braintree did not supply a payment nonce. Please try
   again later or use another means of payment.
 *  Thread Starter [rdavenport3](https://wordpress.org/support/users/rdavenport3/)
 * (@rdavenport3)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/paypal-functionality/#post-7627280)
 * My current fix for this issue which seems to retain full functionality on the
   checkout page is the following CSS code:
 * > #paypal-braintree-button-container {
   >  visibility: hidden !important; }
 *  [slash1andy](https://wordpress.org/support/users/slash1andy/)
 * (@slash1andy)
 * Automattic Happiness Engineer
 * [9 years, 6 months ago](https://wordpress.org/support/topic/paypal-functionality/#post-8435753)
 * Hey there [@rdavenport3](https://wordpress.org/support/users/rdavenport3/)
 * Are you still having issues?
 *  Thread Starter [rdavenport3](https://wordpress.org/support/users/rdavenport3/)
 * (@rdavenport3)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/paypal-functionality/#post-8450002)
 * The last code I posted fixed the issue for me while adjusting the user experience
   to what I wanted.
 * Thanks for the follow-up.

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

The topic ‘Paypal functionality’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-gateway-paypal-powered-by-braintree/assets/icon-
   256x256.png?rev=3234800)
 * [Braintree for WooCommerce Payment Gateway](https://wordpress.org/plugins/woocommerce-gateway-paypal-powered-by-braintree/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-gateway-paypal-powered-by-braintree/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-gateway-paypal-powered-by-braintree/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-gateway-paypal-powered-by-braintree/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-gateway-paypal-powered-by-braintree/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-gateway-paypal-powered-by-braintree/reviews/)

## Tags

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

 * 7 replies
 * 3 participants
 * Last reply from: [rdavenport3](https://wordpress.org/support/users/rdavenport3/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/paypal-functionality/#post-8450002)
 * Status: resolved