Hello Cees,
Does woocommerce_admin_order_data_after_order_details
help?
https://github.com/woocommerce/woocommerce/blob/release/5.3/includes/admin/meta-boxes/class-wc-meta-box-order-data.php#L310
There’s also woocommerce_admin_order_data_after_billing_address
and woocommerce_admin_order_data_after_shipping_address
that loads as such:
Link to image: https://d.pr/i/FWfcoP
No, those hooks print something on certain positions.
I need something to happen when the customer is has been selected.
Thanks!
Thanks for clarifying.
I’m not sure of hooks that might trigger based on your requirement. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.
I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.
You can also visit the WooCommerce Facebook group or the #developers
channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.`
Cheers!
I figured it out… well, to a certain degree. First I add a custom field to the billing fields array, using: woocommerce_admin_billing_fields and then I change the value of that field using: woocommerce_ajax_get_customer_details
So far I have it working with a text field, but I really want “woocommerce_admin_billing_fields” to add a select and then have “woocommerce_ajax_get_customer_details” add the options.
Any change of shining a light on that?
Hello,
There hasn’t been much activity on this thread, so I recommend visiting the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. Those are the best places to get assistance related to customization.
Thanks!
@connectcase
How were you able to pass $data using woocommerce_ajax_get_customer_details?
In my filter I have:
$data['shipping']['shipping_noti-email-order']['value'] = get_user_meta( $user_id, 'shipping_noti-email-order', true );
return $data;
This outputs to the correct form-field, but the output reads as:
[object Object]
I get the same output no matter what I assign to [‘value’], any tips?
@connectcase
Well I answered my own question by looking at another thread of yours! Turns out I didn’t need [‘value’], I got confused while look at how array is represented in a different file… Well thanks!
Glad to be of service! Cheers!