Announcement

Collapse
No announcement yet.

Processing Free Transactions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?


  • #2
    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.
    Regards,
    Click & Pledge Support Department

    On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

    Join us @ the educational webinars: https://clickandpledge.com/webinars/
    Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
    Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

    Comment


    • #3
      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?

      Comment


      • #4
        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.
        Regards,
        Click & Pledge Support Department

        On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

        Join us @ the educational webinars: https://clickandpledge.com/webinars/
        Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
        Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

        Comment

        Working...
        X