Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
David Seaward
Keel - LDH Middleware
Commits
0ab0f254
Commit
0ab0f254
authored
Apr 05, 2019
by
David Seaward
Browse files
use woocommerce-friendly authentication URL
Signed-off-by:
David Seaward
<
david.seaward@puri.sm
>
parent
ecf35d40
Pipeline
#5641
passed with stage
in 41 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
cart/views.py
View file @
0ab0f254
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment