Synchronising Commerce Integration partner_metadata
weekly.
#1079
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed in this Pull Request:
The PR adds a weekly commerce integration
partner_metadata
sync action. The action will attempt to create the integration if the one is still missing. The integration will also run through a set of retries if the API is not responding successfully, delaying the synchronization until the integration is finally created.Detailed test instructions:
Commerce Integration Sync tries to create the integration if the one does not exist.
APIV5::create_commerce_integration
call fail.pinterest-for-woocommerce/src/API/APIV5.php
Lines 407 to 413 in f48b082
pinterest-for-woocommerce-create-commerce-integration-retry
actions so they will all run (fail to create the integration).pinterest_for_woocommerce_weekly_heartbeat
action.Since integration was not created previously, the sync action will attempt to create it. Fail and start the same commerce integration retry cycle (three attempts).
Commerce Integration Sync updates the
parent_metadata
if it has changed.pinterest_for_woocommerce_weekly_heartbeat
action to create commerce integration or reconnect to your Pinterest account.Replace any
partner_metadata
array value with something to your tastepinterest-for-woocommerce/src/CommerceIntegration.php
Lines 198 to 204 in 2ec9295
pinterest_for_woocommerce_weekly_heartbeat
action from the Pending section of the ScheduledActions tab.wp_options
key withpinterest_for_woocommerce_data
name updated.NOTE: It is not possible to watch how the data goes to Pinterest API and gets saved there (under returning me the response with the updated data, I am assuming that Pinterest is saving it) without using a debugger and settings breakpoints.
Screenshots
Changelog entry