WC_Shortcode_My_Account::set_reset_password_cookie()
Set or unset the cookie.
Method of the class: WC_Shortcode_My_Account{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = WC_Shortcode_My_Account::set_reset_password_cookie( $value );
- $value(string)
- Cookie value.
Default: ''
WC_Shortcode_My_Account::set_reset_password_cookie() WC Shortcode My Account::set reset password cookie code WC 9.4.2
public static function set_reset_password_cookie( $value = '' ) { $rp_cookie = 'wp-resetpass-' . COOKIEHASH; $rp_path = isset( $_SERVER['REQUEST_URI'] ) ? current( explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) : ''; // WPCS: input var ok, sanitization ok. if ( $value ) { setcookie( $rp_cookie, $value, 0, $rp_path, COOKIE_DOMAIN, is_ssl(), true ); } else { setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, $rp_path, COOKIE_DOMAIN, is_ssl(), true ); } }