Reply To: Redirect after cart

HomeSupportImage StoreRedirect after cartReply To: Redirect after cart

#56804
andrew
Participant

I’m try in this mode, but not working. Where is the error?

if ( isset( $_COOKIE[ 'ims_message_' . COOKIEHASH ] ) ) {
			$messages = array(
				'1' => __( 'Carrello aggiornato con successo', 'ims' ),
				'2' => __( 'Aggiornamento con successo', 'ims' ),
			);
			$this->message = $messages[ $_COOKIE[ 'ims_message_' . COOKIEHASH ] ];
			
		  if ($messages[ $_COOKIE[ 'ims_message_' . COOKIEHASH ]] == 'true' && $messages == '1' ) {
			wp_redirect( 'http://www.example.com', 301 ); exit;  
			  
		  }