Automattic\WooCommerce\GoogleListingsAndAds\Tests\Unit\Product\SyncerHooksTest::test_delete_created_product_calls_notify_directly
Expectation failed for method name is "notify" when invoked 1 time(s).
Method was expected to be called 1 times, actually called 0 times.
This seems to happen because the metadata is empty after the code calls the delete hook. To solve it. I moved the notifications to the pre-delete.
Screenshots:
Detailed test instructions:
Tests are passing
Create a simple product. It will schedule a create notification. See it works as expected and shows in the logs after the action is completed.
Trash the simple product. See directly the delete notification in the logs.
Changes proposed in this Pull Request:
There is a test failing in regards
This seems to happen because the metadata is empty after the code calls the delete hook. To solve it. I moved the notifications to the pre-delete.
Screenshots:
Detailed test instructions:
Additional details:
Changelog entry