• Version 3 requires customers to LOGIN for “order pay links” sent in invoice emails.
    How can we disable “force login” ???

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    I don’t quite understand the issue here – could you take a screenshot of where you seeing this happening?

    Hi @amrod1,

    You are right. It’s not possible to proceed to payment without logging in anymore and it’s not possible to simply override this system as it is now required to check the Order against the User.

    But there is a hack you may apply, I can give you some direction.

    Step 1 : use 'before_woocommerce_pay' action to call a custom function.
    Step 2 : Inside function, Use 'wp_signon()' to programmatically log in a customer You already created manually. Keep the original customer id from the order within a transient. Then assign the order to that customer using $order->set_customer_id($customer_id).

    Then the payments get processed by your given customer, now you need to undo the changes :

    Step 3 :  use 'after_woocommerce_pay' action to call another custom function.
     Step 4 : Inside function, Reset the original customer ID to Order and Logout.
    

    Thanks

    Can we get an easy fix ? Thank you.

    Thread Starter Amrod

    (@amrod1)

    When you send an invoice, in the email there is a link “pay” OR
    when you go to the order there is a link “Customer payment page →“.

    Example url;
    /checkout/order-pay/1237/?pay_for_order=true&key=wc_order_596827e54d351

    In Woocommerce V2.16 when you go to these urls you were seeing payment page that you can enter your payment information and complete the payment.

    Unfortunatelly in Woocommerce V3 when you go to these links, you are forced to login to your account,

    it says;
    PAY FOR ORDER
    “Please log in to your account below to continue to the payment form.”

    My question is how we can disable this “force login” in checkout/order-pay page?
    This problem is being asked for a long time and there is no solution yet. I searched most of the forums.

    Thread Starter Amrod

    (@amrod1)

    I’ve found the code that is causing this.

    /woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php

    Line #97 to 108 has to be comment out.

    Is there a safer and nicer way to do this?
    Like adding a function to child?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Version 3 Requires customers to LOGIN for order pay links’ is closed to new replies.