distributor
distributor copied to clipboard
feat(#524): Add hooks for subscription(s) post push
Description of the Change
This feature adds to hooks for to subscriptions.php dt_subscription_after_post_push
and dt_subscriptions_after_post_push
to be able to take action after a post has been pushed to a subscription and after the entire set of subscriptions have been pushed regardless of success or failure.
These hooks are not nearly as robust as dt_push_post
as I tried to keep the change as slim as possible.
Closes #524 (as potentially stale issue or could be considered a separate issue)
How to test the Change
utilize
add_action( 'dt_subscriptions_after_post_push' ...
add_action( 'dt_subscription_after_post_push' ...
Changelog Entry
Added - New hooks to allow developers to extend post push subscriptions
Credits
Props @aaronware,
Checklist:
- [x] I agree to follow this project's Code of Conduct.
- [x] I have updated the documentation accordingly. I added docblocks, that should generate accordingly
- [ ] I have added tests to cover my change. I need to research what I need to do here
- [ ] All new and existing tests pass.
I can review this draft request and the 2.0 project to make sure this is still accurate. It's been a while since I looked at this
@aaronware are you interested in continuing the extension work here (assuming primarily for deeper Woo support)?
@jeffpaul yes definitely. Now that 2.x has been out in the wild I can revisit. My apprehension before and why I drafted this was adding to the 1.9.x branch when so much was changing in 2.x. There are some quick wins to add hooks like what I drafted, however, I wasn't sure if you all wanted something more structured when integrating with Distributor for other plugins similar to Steam for example