: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
public function set_cookie( $name, $value, $expires, $path, $domain ) {
$this->handle_cache_plugins( $name );
setcookie( $name, $value, $expires, $path, $domain );
public function get_cookie( $name ) {
if ( isset( $_COOKIE[ $name ] ) ) {
return $_COOKIE[ $name ];
* simple wrapper for \headers_sent
public function headers_sent() {
private function handle_cache_plugins( $name ) {
// @todo uncomment or delete when #wpmlcore-5796 is resolved
//do_action( 'wpsc_add_cookie', $name );