Comments (6)
Hi @sanesh-acowebs,
Can you provide more details on what you're trying to do? The purchase event is triggered when the order is placed or checked out. Do you want to change when this happens?
from facebook-for-woocommerce.
Hi, We are using the deposit plugin for partial payment. So we have the option to pay the full amount or a partial amount. The issue that we are facing is that when a customer pays the full amount (as a normal order) its purchase events are correctly registered with Facebook. But when we try to make a partial payment, it is not registered. When we try to pay using partial payment, a new custom order status "partially paid" is used for tracking. So want to know whether there are any filters available to add custom order status in the purchase event.
from facebook-for-woocommerce.
Thanks for clarifying. I looked into this, and we only trigger the purchase event post-checkout with a fallback that runs on the thankyou_page. There are no filters to trigger this event at the moment.
from facebook-for-woocommerce.
Thanks for your reply. Can you give a little more clarity about the changes required. Currently, we are only changing the order status to "partially paid" other than normal "processing or completed".
from facebook-for-woocommerce.
We only trigger a purchase event once the checkout is completed. If you want a purchase to be sent when the status changes, this might require some custom logic. For example:
add_action('woocommerce_order_status_changed', 'send_purchase_event', 10, 3);
function send_purchase_event($order_id, $old_status, $new_status) {
$order = wc_get_order($order_id);
if ( ! $order ) {
return;
}
if ( 'your new status' === $new_status ) {
if ( function_exists( 'facebook_for_woocommerce' ) ) {
facebook_for_woocommerce()->get_integration()->events_tracker->inject_purchase_event($order_id);
}
}
}
However, I recommend against something like this as it uses the plugin's internal code, which may be subject to change. You can also add a feature request for this, and our team will review: https://woocommerce.com/feature-requests/facebook/
from facebook-for-woocommerce.
We have created a new feature request on the shared link. And also we will check the shared code and share our comments. Thanks.
from facebook-for-woocommerce.
Related Issues (20)
- Update the readme.txt to meet WordPress requirements HOT 1
- WooCommerce 8.7 compatibility testing HOT 1
- $data['condition'] = 'new'; Hard coded with no way to change it. HOT 1
- Clean up / Remove deprecated code
- Smoke Test v3.1.13 HOT 1
- Message deprecation warning notices not removed after plugin deactivation
- Facebook Messenger - address PageSpeed Insights to lazy-load Messenger with facade before connecting. HOT 1
- Not able to login to my facebook account while configuring HOT 1
- WooCommerce 8.8 compatibility testing HOT 1
- Quantity to sell not syncing HOT 7
- Documentation cleanup. HOT 1
- Fully remove deprecated Messenger code HOT 1
- What is the status of WooCommerce to Meta sync? HOT 3
- Links from Facebook to translated products do not work
- Smoke Test 3.2.0
- All events added with inject_event() are delayed if woocommerce_cart_redirect_after_add == yes HOT 2
- Add WooCommerce as a plugin dependency to the plugin header
- WooCommerce 8.9 compatibility testing HOT 1
- Product Sets JS alert about excluded categories always displays
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facebook-for-woocommerce.