Skip to content

Conversation

@matt-h
Copy link
Contributor

@matt-h matt-h commented May 26, 2022

All Submissions:

Changes proposed in this Pull Request:

Add woocommerce_set_cookie_options filter, allowing setcookie() options to be filtered.

This is a followup to the #28105 and #31019 pull requests by @DavidAnderson684

It incorporates the changes requested by @barryhughes

Looking to get this feature implemented so I made the additions here which allow the filter to work under all PHP versions

Closes #28106 .

How to test the changes in this Pull Request:

  1. Put items in cart.
  2. Verify in your browser that valid set-cookie headers exist in the HTTP response.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you created a changelog file for each project being changed, ie pnpm nx changelog <project>?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label May 26, 2022
Copy link
Member

@barryhughes barryhughes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you.

I made a few tweaks (linting issues, addition of docblocks) but otherwise, this is a nice change. Will wait on checks passing then merge.

@github-actions
Copy link
Contributor

Hi @barryhughes, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:

  • Add the release: add testing instructions label

@matt-h
Copy link
Contributor Author

matt-h commented May 27, 2022

@barryhughes thanks for pushing this through. Your docblocks all look good to me.

@barryhughes
Copy link
Member

No problem, thanks for picking it back up 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow filtering of cookie flags, which enables setting of samesite

3 participants