Thanks, will do next time. I figured this one out:
function my_custom_wc_api_order_response( $order_data, $order, $fields ) {
$customer_info = get_post_meta( $order->id, '_customer_info', true );
$order_data['payment_details']['customer_info'] = $customer_info;
// Apply filters if necessary
if ( $fields ) {
$order_data = WC()->api->WC_API_Customers->filter_response_fields( $order_data, $order, $fields );
}
return $order_data;
}
add_filter( 'woocommerce_api_order_response', 'my_custom_wc_api_order_response', 10, 3 );
Related Posts:
- How to remove “out of stock” variation options from size dropdown in woocommerce?
- How To Change The Html of Products filtration sidebar in Woocommerce?
- How to sort WooCommerce products page by latest in-stock items first?
- Variation prices breakdown only for single product page
- How to add custom checkout field in user details mail template
- Remove Woocommerce product link
- Change the footer text on the login page
- How can I hook into and edit the text of a wp_nav_menu tag?
- WooCommerce: How to display item meta data in email confirmation using woocommerce_order_item_meta_end
- Check if page parent has certain template
- WooCommerce – Customer Order History Pagination
- How to Remove a Filter from the Admin List Table?
- Woocommerce, recognize the loop of related products
- Find variables available at a given hook
- Replace existing content from specific WooCommerce admin orders list column
- Getting my head round WordPress filter
- Woocommerce filter cart and category specific quantity [closed]
- How to set a custom path, for ajax image upload folder in admin?
- When using the_author hook, how can I determine the PHP file that generates each call to `the_author()`?
- How to call function at the bottom of post using plugin?
- Limiting woocommerce line_total decimal length
- How to add a second ‘place order’ button in WooCommerce [closed]
- Setting up 2 SMTP accounts: 1 for wordpress and 1 for woocommerce
- Handling Body class based on Template
- WooCommerce Related Products by Attribute
- Automatically remove a canceled order in Woocommerce
- Edit incorrect password message WordPress
- Show prices with tax in Woocommerce Mini Cart [closed]
- Reload part of checkout on changed shipping method
- Trying to build simple deposit code that hooks into woocommerce
- Contact Fom 7 – how to add custom HTML inside span.wpcf7-form-control-wrap AND IMMEDIATELY AFTER input.wpcf7-form-control?
- Woocommerce: hook action/filter I could use to add variation id and price with each attribute opt on WooCommerce Rest api
- Add a product to checkout via form
- Remove the first 5 characters of the_title and orderby that
- Remove a div from RSS feed
- Is it possible to intercept all ajax requests and get the parameters and the returns?
- How to add an arrow to menu items has submenus
- WordPress Gravatar filter is removing my custom attributes
- how to fix error “called incorrectly, should not be accessed directly”?
- Generating an nonce for Content Security Policy and all scripts – How to make it match/persist for each page load?
- How to remove woocommerce_breadcrumb() from do_action( ‘woocommerce_before_main_content’ ); [closed]
- get_total () returns 0 – woocommerce [closed]
- How to have different site identity logos on each page on Astra Theme [closed]
- Must filter functions receive all arguments passed to them?
- Filter wordpress posts without searching the keywords in the post content
- Display custom field value in woocommerce variable product via jQurey
- Adding custom field to product category and show it to shop/category shop page
- How can I change the background color of divs dynamically (depending on an order-status in woocommerce)?
- Remove span tags from WooCommerce Downloads page
- How to edit post meta data before publishing the post it self wordpress?
- Adding new divs with custom classes to products on WooCommerce shop page [closed]
- Fatal error: Uncaught Error: Class ‘WP_Block_Styles_Registry’
- using filter and hook inside class
- Discount in the specific product title using keyword ( Woocoommerce )
- How do I remove an action hook inside a class that is called by another class?
- Need to forward Data from WooCommerce Webhook sent to same site WordPress REST API custom endpoint
- How to override WooCommerce Order Item Meta with data from Cart?
- add_filter() inside another add_filter()
- How can i style “echo apply_filters”
- Add class to all meta boxes for a custom post type
- Clone the “proceed to cart” button and place it above checkout on the cart page, but only appear display size is 320px
- Woocommerce Price Text
- For each loop will not append to the_content hook
- Change Checkout “Place Order” text if cart has a specific product
- Send a custom notification to customer on WooCommerce cancelled order status
- Assign new post author IF another user in custom field on post transition
- Woocommerce – add tracking code to another email template
- using custom pages for myaccount in woocommerce
- Add text below WooCommerce short description if metabox value is true
- Is there a hook that I can use when a fatal error occurs?
- Using register_activation_hook in classes
- How to get the original price of the product in woocommerce?
- Remove commas from WooCommerce checkout addresses fields
- Writing scripts using WordPress / WooCommerce classes?
- Add the Name of Products Ordered to Admin New Order Email WooCommerce
- get current product name in functions.php
- Get WooCommerce product details and transfer them to a custom DB table
- hook that when page is starting to load
- Ajax category filtering products default show all
- Add a specific part of current category page url to shortcode
- Why ajax doesn’t work on certain wordpress hooks?
- Print last modified date only on posts
- Add default user field to WooCommerce checkout [closed]
- How to add specific meta tags to head of cart and checkout pages in woocommerce?
- Redirect no product url’s to static url
- How to access page variable inside action hook
- Payment field disappears on custom Paypal plugin
- Creating a brand attribute as a variable
- I am having errors with checkout on wordpress
- Programmatically add a product to the cart and set price to zero when buying from certain category
- I want to show cart items number if any or nothing, simple CART text
- How to retrieve quantity input field by id in woocommerce
- How can I update the price when someone enters postcode or zip code in woocommerce checkout page?
- i want add conditional for add category in wordpress
- How to remove title tag with this filter
- PHP – Woocommerce 3.2 Add variable shipping insurance with multiple “else if ” conditions
- WordPress 3.0 PHP Error – notice WordPress_product_Type was called incorrectly
- Adding my own custom template page but got white page
- WordPress HTML Helper
- Why does WordPress not send the user the email to add a password?