Skip to content

Commit

Permalink
Merge branch 'bc-checkout' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
macifell committed May 21, 2024
2 parents ed04981 + c588195 commit 6653c22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/recognizer_web/router.ex
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ defmodule RecognizerWeb.Router do

defp add_bc_to_session(%{query_params: %{"bc" => "true", "checkout" => "true"}} = conn, _opts) do
if Recognizer.BigCommerce.enabled?() do
put_session(conn, :bc, true)
put_session(conn, :bc_checkout, true)
else
conn
Expand All @@ -43,8 +44,8 @@ defmodule RecognizerWeb.Router do

defp add_bc_to_session(%{query_params: %{"bc" => "true"}} = conn, _opts) do
if Recognizer.BigCommerce.enabled?() do
put_session(conn, :bc, true)
delete_session(conn, :bc_checkout)
put_session(conn, :bc, true)
else
conn
end
Expand Down

0 comments on commit 6653c22

Please sign in to comment.