add auto-redirect if it is set for woocommerce pages too #630
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Please describe both what is changing and why this is important. Include:
Changed the overrides for the woocommerce login forms
Updated the WP_Auth0 main plugin to pass options to the woocommerce overrides class
Updated the woocommerce overrides class to create a login button instead of login form if auto login is enabled.
Should mention this in the new docs
Testing
Please describe how this can be tested by reviewers. Tests must be added for new functionality and existing tests should complete without errors.
I tested this by creating a woocommerce themed wordpress site.
I enabled Login by Auth0
Make sure that the "allow users to login on checkout" is enabled for the woocommerce accounts settings.
Try both navigating to /my-account and /checkout (note you have to create a product and add it to your cart to get to checkout).
If you are not logged in, you should now get a Login button, if you click the button, it redirects you to wp-login with the appropriate redirect_to set.
Checklist