#Overview
This filter is run by the Enhanced Ecommerce addon before the order data is passed to the CRM for processing. It can be used to override the order details that are synced to the CRM.
To use the code examples below, add them to your active theme’s functions.php file.
#Parameters
$order_args
: An array of order data:order_label
: The label, for example “WooCommerce Order #123”order_number
: The order umber, for example 123order_edit_link
: The link to edit the order in the adminpayment_method
: The payment methodproducts
: An array of products and their pricesline_items
: An array of line items (discounts, shipping, etc) and their amountstotal
: The order totalcurrency
: The order currencycurrency_symbol
: The order currency symbolorder_date
: The order dateprovider
: The plugin source, for examplewoocommerce
oreasy-digital-downloads
status
: The order statususer_id
: The user ID who placed the order, 0 for guestuser_email
: The customer email address
$order_id
: The ecommerce order ID
#Examples
#Override order label
This example overrides the order label that’s synced to the CRM.
function alt_emails_for_attendees( $order_args, $order_id ) { $order_args['order_label'] = 'Custom Label, Order #' . $order_args['order_number']; return $order_args; } add_filter( 'wpf_ecommerce_order_args', 'override_order_label', 10, 2 );
Was this helpful?
Let us know if you liked the post. That’s the only way we can improve.