distributor icon indicating copy to clipboard operation
distributor copied to clipboard

feat(#524): Add hooks for subscription(s) post push

Open aaronware opened this issue 1 year ago • 3 comments

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.

aaronware avatar Apr 06 '23 13:04 aaronware

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 avatar Jun 13 '23 12:06 aaronware

@aaronware are you interested in continuing the extension work here (assuming primarily for deeper Woo support)?

jeffpaul avatar Feb 07 '24 17:02 jeffpaul

@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

aaronware avatar Feb 07 '24 17:02 aaronware