Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function add_order_total_field( $meta_fields ) {
- $meta_fields['order_total'] = array(
- 'label' => 'Last Order Total',
- 'group' => 'woocommerce',
- );
- return $meta_fields;
- }
- add_filter( 'wpf_meta_fields', 'add_order_total_field' );
- function get_order_total( $order_data, $order ) {
- $order_data['order_total'] = $order->get_total();
- return $order_data;
- }
- add_filter( 'wpf_woocommerce_customer_data', 'get_order_total', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement