Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function add_address_to_note( $engagement_data, $order_id ) {
- $order = wc_get_order( $order_id );
- $order_data = $order->get_data();
- $new_text = '<br /><br />Address:';
- $new_text .= '<ul>';
- $new_text .= '<li>Address 1 ' . $order_data['billing_address_1'] . '</li>';
- $new_text .= '<li>Address 2 ' . $order_data['billing_address_2'] . '</li>';
- $new_text .= '<li>City ' . $order_data['billing_city'] . '</li>';
- $new_text .= '<li>State ' . $order_data['billing_state'] . '</li>';
- $new_text .= '</ul>';
- $engagement_data['metadata']['body'] .= $new_text;
- return $engagement_data;
- }
- add_filter( 'wpf_ecommerce_hubspot_add_engagement', 'add_address_to_note', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement