0

I'm looking for a hook that is fired before the Ajax content is returned.

The reason is that I want to extend the cookies with the Secure attribute I need. Unfortunately is the plugin (woocommerce) not doing this by default so I need to add this manually.

3
  • Maybe wp_ajax_addItemAJAX and wp_ajax_nopriv_addItemAJAX. (From this question.) – Addesign Space Jan 23 at 14:13
  • I don't think you can filter setting a cookie like that. WordPress itself calls PHP's setcookie directly; WooCommerce has wc_setcookie but again there's no filter for the secure flag (except on the session cookie). You'll have to look at the specific AJAX code you're interested in and probably edit it. – Rup Jan 23 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.