wandersongi
Forum Replies Created
-
I see that in my plugin code as well.
Is there any setting that I must change on my woocommerce payment settings? Everything seems correct to me.

Hi There,
I already tried to use a different code snippet to add the follow code:
add_Filter('wc_braintree_order_transaction_args', function($args, $order){ $args['amount'] = $args['amount'] + 5; unset($args['lineItems']); /* you can do this with code or using the option on the plugin settings pages*/ return $args; }, 10, 2);But it still not working, and the code is not being called at all, looks like that “wc_braintree_order_transaction_args” is not being called.
Are there any hooks in the plugin that I could use to adjust the value?
I saw someone using a similar solution with other plugin that stripe may have something that I could use as well.
https://ww.wp.xz.cn/support/topic/authorizing-a-card-for-more-than-the-orders-total/
Increase the value of the products wouldn’t be a good solution since I could lost clients because of the cost of my products be too high.
I saw this situation but I won’t charge the customer in the first 7 days, it will take longer than that, also I would like to manage all future charges in the Stripe dashboard and not on Woocommerce.
And the user won’t pay anything at the woocommerce checkout, it needs just to capture the credit card to Stripe, but I saw that the orders can’t be lower than $0.50, is also somehow remove that minimum amount?
Thanks
Forum: Plugins
In reply to: [WooCommerce] Check User profile fields before checkoutHello, I found some topics about that in different ways and I could build a code for my case. Thanks.
the code is:
/** CHECK IF USER HAS MEASUREMENTS **/ function checkUserCheckout_withAllProfileFields() { if ( is_user_logged_in() ) { $current_user = wp_get_current_user(); if(!$current_user->neck || !$current_user->height || !$current_user->weight || !$current_user->age){ if ( is_checkout() ) { wp_redirect( '/__measurements?fromCheck=yes' ); } } } } add_action( 'loop_start', 'checkUserCheckout_withAllProfileFields' );This code will check if the user is logged, get all user information and check the ones that I want if is null or not, if it is and the user is on the checkout page it will redirect to the URL that I want.
Forum: Plugins
In reply to: [WooCommerce] Check User profile fields before checkoutHi @margaretwporg,
Thanks for your answer, but the way that I need it is not possible even for the customer to go to the checkout page. It needs to check the user/profile information when he tries to process to checkout, like before load the page checks and if the user doesn’t have the profile fields filled it redirects the user to another page.
Forum: Fixing WordPress
In reply to: Check User profile fields before checkoutI will try ask there as well, thank you!