Skip to content

TWO-24740/chore: Remove sync endpoints, status endpoint, before_order_update#319

Open
dgjlindsay wants to merge 2 commits into
mainfrom
doug/TWO-24740-remove-sync-endpoints
Open

TWO-24740/chore: Remove sync endpoints, status endpoint, before_order_update#319
dgjlindsay wants to merge 2 commits into
mainfrom
doug/TWO-24740-remove-sync-endpoints

Conversation

@dgjlindsay

@dgjlindsay dgjlindsay commented Jun 10, 2026

Copy link
Copy Markdown

What

  • Removes the four order-sync REST endpoints: twoinc_list_out_of_sync_order_ids, twoinc_sync_order_state, twoinc_get_plugin_configs, twoinc_get_order_info (registrations + wrappers + handlers)
  • Removes twoinc_plugin_status_checking — unauthenticated, publicly exposed the plugin version
  • Removes WC_Twoinc_Helper::auth_rest_request() — only used by the removed endpoints
  • Removes before_order_update() + its save_post_shop_order hook — marked @TODO: Edit rework: remove this function after edit is stable
  • Removes $status_to_states — only consumed by the removed handlers

Why

Production log analysis (TWO-24740 gap analysis) confirms the nightly backend sync jobs calling these endpoints were either broken or only correcting stale local WP metadata with no Two API mutations.

before_order_update pre-seeded _twoinc_req_body_hash on each admin edit; with it gone the hash baseline is simply the one stored at last successful Two sync (process_update_twoinc_order), which is the correct comparison anyway.

Deploy order

This is step 3 of three (chain: CronJob → checkout-api handler → plugin endpoint):

  1. step 1 — two-app-values#1674 — remove CronJobs (first)
  2. step 2 — checkout-api#12260 — remove batch handler
  3. step 3 (this PR + woocommerce-abn-plugin counterpart) — remove plugin endpoints

🤖 Generated with Claude Code

…_update

Removes the four order-sync REST endpoints (twoinc_list_out_of_sync_order_ids,
twoinc_sync_order_state, twoinc_get_plugin_configs, twoinc_get_order_info),
the unauthenticated twoinc_plugin_status_checking endpoint (exposed plugin
version publicly), their auth helper auth_rest_request, and the
before_order_update save_post hook long marked @todo for removal.

The backend caller (sync_woocom_order_status batch job) is removed in
checkout-api#12260; its CronJob triggers in two-app-values#1674. The
status_to_states map was only used by the removed handlers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown

🖌 Pre-commit success 🏆

Details
Downloading virtualenv (7.2MiB)
 Downloaded virtualenv
Installed 11 packages in 12ms
prettier.................................................................Passed

Exit code: 0

Author ✍️@dgjlindsay

Its only caller was the get_order_info sync endpoint removed in the
previous commit (adversarial review finding).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant