Hi @ayakish
Are you attempting to render the PayPal button in a section not already provided by the plug-in?
If so, once you confirm I’ll show you what to do. It’s very simple and doesn’t require you to write but a single line of custom code.
@mrclayton i do see in the plugin where the option “mini-cart” is available, but we wrote our own custom drawer and custom plugin for it, and when adding “mini cart” in the sections field, it doesn’t get added. We’d like to add it in this section, which I do not believe is something that’s already provided.
but we wrote our own custom drawer and custom plugin for it, and when adding “mini cart” in the sections field, it doesn’t get added
Did you verify that the JS scripts aren’t loading? It’s possible they’re loading but your mini-cart is missing some of the html elements this plugin looks for when initializing the payment buttons in the cart.
Kind Regards,
@mrclayton yes, this isn’t what we want. we’re just trying to get the validated button into some other section. can you please provide the one line you’re talking about? we’re not using any default “mini-cart” classes or anything like that. we just need the validated button embedded into a custom section.
@mrclayton hello. “If so, once you confirm I’ll show you what to do. It’s very simple and doesn’t require you to write but a single line of custom code.”
can you please provide us with this example so we can wrap this up?
can you please provide us with this example so we can wrap this up?
Please be mindful that the weekend just passed and this is free support. If you want a guaranteed faster response, that is what our Premium Support is for which you can purchase on our website.
Something like the following should work:
wc_braintree_get_template(
'cart/cart-fields.php',
array(
'gateways' => [WC()->payment_gateways()->payment_gateways()['braintree_paypal']],
'priority' => 10,
'cart_total' => WC()->cart->total,
)
);
You will then need to apply the appropriate styles to hide things like the .wc-braintree-cart-text element since that’s just for the cart page.
@mrclayton understood and thank you very much. can you please provide the link to purchase the premium support. i cannot find it anywhere. we’re going to try to implement what you’ve suggested as well, and i will reply here. thanks again!
@mrclayton thank you. i just purchased the premium support (order 719). thanks for all of your help!
@ayakish Now when you reach out to our support email or use the support widget in the plugin settings, we will see that you’re a premium support subscriber.
Thanks,