Support » Plugin: WooCommerce PayPal Powered by Braintree Payment Gateway » Can we just use the credit card part , and disable the paypal bit?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor woosteve

    (@woosteve)

    Automattic Happiness Engineer

    Hi there,

    By default, the Accept PayPal option is selected when in Sandbox mode. Once you are live, you should be able to log into your Braintree admin area and go to Settings > Processing > Accept PayPal and click Disable.

    I have been in contact with Braintree and a Braintree developer support, and I can confirm that the account is LIVE and that the Paypal is DISABLED in our Braintree account.
    However, it still shows up as a payment option on the checkout page.
    Please see screenshot of checkout page: http://imgur.com/ZLJOolq
    Wordpress 4.4.2
    woocommerce 2.5.3

    Plugin Contributor woosteve

    (@woosteve)

    Automattic Happiness Engineer

    Hi again,

    Currently, removing the PayPal option is not built into the functionality of the plugin. However, what you are looking for is possible by adding a filter into your functions.php file. An example of how to remove the PayPal button from the checkout page is shown below:

    add_filter( 'woocommerce_available_payment_gateways', '_wc_remove_braintree_pay_with_paypal' );
    function _wc_remove_braintree_pay_with_paypal( $gateways ) {
        unset( $gateways['paypalbraintree_paypal'] );
        return $gateways;
    }

    To remove the PayPal button from the cart page you can use the code snippet below:

    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;
    }

    Please note that it is recommended to use a child theme when adding code to your functions.php file. Also, I would recommend having FTP access handy when adding the snippets above. Just in case you need to revert changes quickly.

    Let me know how it goes.

    Hi
    I have tried the codes above on the live website, and it has been running successfully for a week now, with only the credit Card option on Braintree visible, so the codes above seem to be working fine.
    Thanks for the solution.

    Plugin Contributor woosteve

    (@woosteve)

    Automattic Happiness Engineer

    Perfect. I’m glad it worked out.

    Luke Cavanagh

    (@lukecavanagh)

    @woosteve

    Thanks for sharing.

    has there been any change to this, or using this snippet still the best option? I am looking into disabling cards and keeping only PayPal as the option

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Can we just use the credit card part , and disable the paypal bit?’ is closed to new replies.