Good day @snesson
Yes, you will need to change needs_payment function. In WooCommerce, the transactions with $0 will NOT be allowed and to overcome with that we did the manual change in that function.
In settings if you enable the pre-auth, it will allow user to enter credit card information with $0 transaction.
Hope that answers your question. Let us know if we can be of any further assistance.
Announcement
Collapse
No announcement yet.
Processing Free Transactions
Collapse
X
-
Just to confirm - if I check the Allow pre-authorization checkbox, the patron will have to enter credit card information, and the opportunity will be created in Salesforce with $0 and a stage I map to pre-authorized transactions. Do I have to make the manual code change to the needs_payment function in that case as well?
Leave a comment:
-
Good day @snesson
Yes, you need to change that in function as well:
To allow for processing free transactions, the following manual change has to be made to the "needs_payment" function in "woocommerce/includes/class-wc-cart.php".
Original code: return apply_filters( 'woocommerce_cart_needs_payment', $this->total > 0, $this );
Modified code: return apply_filters( 'woocommerce_cart_needs_payment', $this->total >= 0, $this );
This code change has to be made after each upgrade of WooCommerce.
Hope that answers your question. Let us know if we can be of any further assistance.
Leave a comment:
-
Processing Free Transactions
To allow for processing of a free $0 transaction without credit card information in WooCommerce, if I uncheck the Allow Pre-Authorization for $0 balance checkbox in the plug-in, and enable custom payment types in Salesforce C&P Settings, do I also need to make the manual code change to the needs_payment function in the WC plug-in?
Tags: None
Leave a comment: