Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to use wp_after_insert_post hook to track event #138

Merged

Conversation

Rahmon
Copy link
Contributor

@Rahmon Rahmon commented Oct 8, 2021

Description of the Change

Since we're sending the categories in sectionNames field, we need to use the action wp_after_insert_post instead of transition_post_status. Otherwise, we'd get the old values (prior to the update)

Alternate Designs

Benefits

Possible Drawbacks

Verification Process

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Applicable Issues

Changelog Entry

@jeffpaul jeffpaul added this to the 1.0.5 milestone Oct 8, 2021
@felipeelia
Copy link

@Rahmon I'm not sure about how compatible we make the plugin with older WP versions but worth noting that wp_after_insert_post was only introduced in WP 5.6.0.

@jeffpaul
Copy link
Contributor

@felipeelia the plugin is currently set with WP 5.6 as minimum version so seems like this would be ok then, yeah?

@felipeelia
Copy link

yup!

@Rahmon Rahmon merged commit cc9113c into develop Oct 11, 2021
@Rahmon Rahmon deleted the chore/update-section-names-to-use-wp-categories-sit-2503 branch October 11, 2021 18:03
Rahmon added a commit that referenced this pull request Oct 19, 2021
…n-names-to-use-wp-categories-sit-2503"

This reverts commit cc9113c, reversing
changes made to b54d5f7.
Rahmon added a commit that referenced this pull request Oct 21, 2021
…e-section-names-to-use-wp-categories-sit-2503""

This reverts commit a1526f8.
@Rahmon Rahmon mentioned this pull request Oct 21, 2021
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants