You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the cookieDomain variable is used for sending to javascript the domain in which the cookie will be stored. Currently its value would be the COOKIE_DOMAIN constant if it exists, or an empty string otherwise.
I would like to suggest to give users the opportunity to customize the cookieDomain value before it will be sended to javascript (via wp_localize_script).
In some situations, (like in a multisite environment) this could leads to some troubles if the COOKIE_DOMAIN constant is already defined by the user, for example in wp-config.php.
To be more specific, if the COOKIE_DOMAIN value is different from the current domain in the client's browser the cookie will no more recognized by the $_COOKIE and the plugins does not work.
Consider that this could be a real scenario in a multisite environment with domains mapped to subdomains.
The following could be an easy implementation of the feature request that could be definitely resolve the issue:
Just saw t;his one and didn't realize how old it actually was. I've put in pr ( #52 ) and have been trying to keep it up to date too when I can in hopes to see this committed to help a lot of the users of the plugin. [edited to point to correct PR]
Hi,
the
cookieDomain
variable is used for sending to javascript the domain in which the cookie will be stored. Currently its value would be theCOOKIE_DOMAIN
constant if it exists, or an empty string otherwise.I would like to suggest to give users the opportunity to customize the
cookieDomain
value before it will be sended to javascript (viawp_localize_script
).In some situations, (like in a multisite environment) this could leads to some troubles if the
COOKIE_DOMAIN
constant is already defined by the user, for example inwp-config.php
.To be more specific, if the
COOKIE_DOMAIN
value is different from the current domain in the client's browser the cookie will no more recognized by the $_COOKIE and the plugins does not work.Consider that this could be a real scenario in a multisite environment with domains mapped to subdomains.
The following could be an easy implementation of the feature request that could be definitely resolve the issue:
'cookieDomain' => apply_filters( 'cn_cookie_domain', ( defined( 'COOKIE_DOMAIN' ) ? COOKIE_DOMAIN : '' ) )
The text was updated successfully, but these errors were encountered: