Closed puntope closed 1 month ago
Attention: Patch coverage is 80.00000%
with 7 lines
in your changes missing coverage. Please review.
Project coverage is 64.7%. Comparing base (
7ff8a9e
) to head (f03a407
). Report is 33 commits behind head on feature/google-api-project.
- but when I restore the simple product, we send an UPDATE topic instead of a CREATE topic.
Good catch. Fixed here. https://github.com/woocommerce/google-listings-and-ads/pull/2450/commits/413c7c54312d0b2fa76b2b708d61016af9463540
I am unsure if this is ideal because we only updated one variation. Will Google make X (number of variations + parent product) REST API requests? It seems unnecessary to make so many requests. For example, if a product has 30 variations and only 1 is updated, we'll schedule 30 + 1 jobs, and the merchant will receive 31 API requests?
Seems like when we did activate the MC Push again we forgot to handle that https://github.com/woocommerce/google-listings-and-ads/blob/develop/src/Product/SyncerHooks.php#L180
I did some tweaks for it also. Now should be trigger per variation and parent only.
Thanks @jorgemd24 for all your feedback. I applied some changes. Can you take another look?
As far as I can tell, we only need to notify the product ID, topic, and offer_id, so can't we just schedule the job to notify that? Or do we need the actual product?
The logic know uses get_item that needs the product from DB. We can refactor that in future iterations. Since DarkL is next week I would suggest to have it working even if the performance is not the optimal.
p.s I also added the check for WC_Product. This is ready for a new round.
Changes proposed in this Pull Request:
This PR tweaks the logic for notifications when handling variations. In particular:
Detailed test instructions:
Additional details:
Changelog entry