-
Notifications
You must be signed in to change notification settings - Fork 21
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
API Pull - Update metadata for Coupons and Product after being notified. #2338
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/google-api-project #2338 +/- ##
==============================================================
+ Coverage 63.5% 63.9% +0.4%
- Complexity 4391 4443 +52
==============================================================
Files 468 472 +4
Lines 18555 18739 +184
==============================================================
+ Hits 11785 11980 +195
+ Misses 6770 6759 -11
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. I can see both coupon and product's metadata were updated. LGTM.
Changes proposed in this Pull Request:
Part of #2146
Once the products or coupons are notified, we can still update some metadata as we used to when we were pushing the data. This is particularly useful for coupons, as it allows us to inform the user that the coupon has been sent/notified to Google.
This PR adds the following:
HelperNotificationInterface
for theProductHelper
andCouponHelper
. This is because theAbstractItemNotificationJob
expects those classes to have certain methods available. By doing this, we can ensure that those methods are indeed available. The catch is that I had to remove some type hints because PHP versions earlier than 8 don't allow multiple types.Screenshots:
Detailed test instructions:
Coupons
gla/jobs/notifications/coupons/process_item
_wc_gla_sync_status
=synced
and_wc_gla_synced_at
set.Products
gla/jobs/notifications/products/process_item
_wc_gla_sync_status
=synced
and_wc_gla_synced_at
set.Additional details:
Changelog entry