Fix a login issue on WP-Engine hosting#257
Conversation
WP-Engine requires additional parameters to exist on the URL for POST requests, and it applies those using a filter on the site_url hook when using the login_post scheme. So I've made sure to apply that filter when running in a WP-Engine environment.
5113dac to
856e79c
Compare
|
|
||
| // If we're running in a WP-Engine environment then we need to apply the | ||
| // site_url filter with the login_post scheme for the form action. | ||
| if ( function_exists( 'is_wpe' ) && is_wpe() ) { |
There was a problem hiding this comment.
@ccoley This is a host specific integration and the function name is pretty generic and could conflict with existing code bases.
In #256 @cameronjonesweb suggested to switch to site_url() for the form action URLs to match how the WP core does it, which should also resolve this issue.
There was a problem hiding this comment.
@kasparsd I was going to use site_url() but I looked back in the code and saw that you were originally using that, but then changed it to use wp_login_url() in this pull request to fix WooCommerce login forms and issue #61.
I thought that my way of doing it was less likely to cause negative side effects, but I'm happy to use site_url() instead if that is what you want.
There was a problem hiding this comment.
Also, if the is_wpe() function is too generic, then we could also check for existence of the IS_WPE environment variable.
There was a problem hiding this comment.
There was a problem hiding this comment.
Confirmed that WooCommerce on-page login form works as expected with the wp-login.php form action.
|
Fixed in #258. |
WP-Engine requires additional parameters to exist on the URL for POST requests, and it applies those using a filter on the site_url hook when using the login_post scheme. So I've made sure to apply that filter when running in a WP-Engine environment.
Fixes #201