Open seanconklin opened 6 months ago
Reported on 7914523-zen
So after a quick investigation I believe the order attribution is missing from orders placed with Express Payment Buttons (eg Google Pay) because WC core sets this meta on the woocommerce_checkout_order_created
hook. That hook is fired when orders are placed using an Express Payment button, however WC core only attempts to generate the Order Attribution data from the $_POST
.
It goes without saying but the $_POST
data when processing a express payments doesn't include the same wc_order_attribution_
data and hence no attribution is made.
I think we have a couple of possible approaches here.
$_POST
data necessary to record the attribution when we process the payment. ie somewhere here: https://github.com/woocommerce/woocommerce-gateway-stripe/blob/8.2.0/includes/payment-methods/class-wc-stripe-payment-request.php#L1698woocommerce_order_save_attribution_data
hook themselves when the woocommerce_store_api_checkout_update_order_from_request
hook is fired.
woocommerce_order_save_attribution_data
hook but we'd need to fetch the attribution data.Notify the WC core of this gap in the order attribution feature
This has been filed with WC core here: https://github.com/woocommerce/woocommerce/issues/46309.
I've given this issue the blocked status while we work out with the WC core team what the right path forward is here.
Hi, This issue has gone 150 days (5 months) without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest version, you can help the project by responding to confirm the problem and by providing any updated reproduction steps. Thanks for helping out.
Just noting that this issue also affects the ECE update we're doing. See my comment here for how this is impacted: https://github.com/woocommerce/woocommerce-gateway-stripe/issues/3022#issuecomment-2054879444
ECE button payments are still largely processed the same via a request without the $_POST
args necessary to make the attribution links.
Describe the bug We use the Checkout Block and have noticed that all of our Apple Pay and Google Pay orders show Unknown (empty) metadata for WooCommerce Order Attribution Tracking.
To Reproduce Steps to reproduce the behavior:
Expected behavior My client and I would expect to see order Origins for the most part (Google, Facebook, Direct, etc.), as we do when people pay via Credit Card.
Screenshots
Environment (please complete the following information): WordPress 6.4.3 running Best Chinese Medicines Block Theme theme. Plugins are as follows: Advanced Custom Fields Advanced Database Cleaner Advanced Order Export For WooCommerce Akismet Anti-spam: Spam Protection Blocks Animation: CSS Animations for Gutenberg Blocks Bot Protection Breeze Cloudflare Code Snippets Facebook for WooCommerce FiboSearch - AJAX Search for WooCommerce (Pro) Google Analytics for WooCommerce Google Listings and Ads Judge.me Product Reviews for WooCommerce Klaviyo Mailgun Microsoft Advertising Universal Event Tracking (UET) Phoenix Media Rename Pinterest for WooCommerce Redirection SimpleTOC - Table of Contents Block Smush Up-sell Trio for WooCommerce User Switching WooCommerce WooCommerce - ShipStation Integration WooCommerce Address Validation WooCommerce Quick View WooCommerce Stripe Gateway Yoast SEO Yoast SEO: WooCommerce