Hi,
How to set cookies using setcookie() function with php ?
I tried wp_head/wp_footer actions with no success.
Regards
Jorge
Hey Jorge,
Thank you for the inquiry.
This is the official documentation for that specific function containing code examples.
// https://www.php.net/manual/en/function.setcookie.php
What are you trying to do with it?
Best regards,
Ismael
Hi Ismael,
After investing, I found the solution to fix the issue :
setcookie( $inKey , ” , time()-3600 , ‘/’ , ” , 0 );
unset( $_COOKIE[$inKey] );
It necessary to use both syntax as specified also in your link.
Please close this topic.
Many thank for your help
Best regards
Jorge
Hi,
Glad to hear that you have this sorted out, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.
Best regards,
Mike