Repository navigation
Conversation
ukilla
force-pushed
the
fix/subscription-renewal-contents
branch
2 times, most recently
from
October 5, 2026 13:02
b722635 to
11d38c4
Compare
Contributor
📦 Latest Plugin BuildBuilt at: 2026-11-05T10:26:02Z Download: Click here to download the plugin To download: Click the link above → Scroll to bottom → Download "facebook-for-woocommerce" artifact |
vahidkay-meta
approved these changes
Oct 13, 2026
Subscription plugins save an empty order first and add its items and totals afterwards, so the Purchase sent from woocommerce_new_order had no contents and a zero value. Defer orders that have no items at creation and report them at the end of the request from their persisted state, whichever plugin created them. Checkout orders are unchanged. Keep stripping Purchase tracking meta from renewal, resubscribe and parent order copies so stale flags on a subscription cannot suppress the event.
vahidkay-meta
force-pushed
the
fix/subscription-renewal-contents
branch
from
November 5, 2026 10:24
11d38c4 to
dbc0b1d
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Subscription plugins create an order empty and add its items and totals afterwards, so the Purchase sent from
woocommerce_new_orderhad no contents and a zero value. Woo Subscriptions, WP Swings Subscriptions and YITH Subscription all do this, each with a different save sequence.Orders that have no items when
woocommerce_new_orderfires are now deferred and reported onshutdownfrom their persisted state, independent of the plugin that created them. Checkout orders have items at creation and are reported exactly as before. Orders still empty or deleted by the end of the request are skipped. Purchase tracking meta is still stripped when Subscriptions copies data onto renewal, resubscribe and parent orders, so stale flags cannot suppress the event.Type of change
Checklist
Changelog entry
Fix missing product details in Purchase events for orders created by subscription plugins.
Test Plan
Tested with WooCommerce 11.1.0, HPOS enabled, Woo Subscriptions 8.2.0, WP Swings Subscriptions for WooCommerce 2.0.2 and YITH WooCommerce Subscription 4.17.0.
wcs_create_renewal_order(),wcs_create_resubscribe_order(), a generated parent order, a renewal from a subscription carrying stale tracking meta, and a realwoocommerce_scheduled_subscription_paymentrun; WP Swings' HPOS renewal scheduler; YITH'srenew_order(). Capture the outgoing Purchase withpre_http_request.payment_complete()and two thank-you page loads add no further server event while reusing the same event ID.