Mike on "[Plugin: WooCommerce PayPal Powered by Braintree Payment Gateway] Paypal functionality"

ساخت وبلاگ

rdavenport3
Member
Posted 11 hours ago #

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/

Mike
Member
Plugin Contributor

Posted 9 minutes ago #

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'] ); retu $data;
}

Hope that helps!

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 307 تاريخ : چهارشنبه 13 مرداد 1395 ساعت: 10:17