Commit 0ab0f254 authored by David Seaward's avatar David Seaward
Browse files

use woocommerce-friendly authentication URL


Signed-off-by: David Seaward's avatarDavid Seaward <david.seaward@puri.sm>
parent ecf35d40
Pipeline #5641 passed with stage
in 41 seconds
......@@ -52,20 +52,21 @@ class CartRegistrationView(RegistrationView):
def get_success_url(self, user):
if self.reward in ["0", "999"]:
# skip billing requirements
# skip billing page for magic cart numbers
# (but still force authentication for login purposes)
url = '{}/{}?{}'.format(
url = '{}/{}/{}&reauth=1'.format(
settings.WOO_URL,
'wp-login.php?redirect=',
'wp-login.php?redirect_to=',
settings.WOO_CART_THANKS_PATH,
)
else:
# go to WooCommerce cart URL
url = '{}/{}/{}?{}'.format(
url = '{}/{}/{}?{}&reauth=1'.format(
settings.WOO_URL,
'wp-login.php?redirect=',
'wp-login.php?redirect_to=',
settings.WOO_CART_BILLING_PATH,
self.reward
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment