Hi, I added code below to add a custom checkout field and the value is rendered in admin portal. I need the same value to be rendered in Shipping Details box in order detail page in vendor dashboard. Could you please provide me the code snippet for doing so. Also, how can I add a image upload field in checkout field and render in order detail page below Customer Note.
Thank you.
add_action( 'woocommerce_admin_order_data_after_shipping_address', 'edit_woocommerce_checkout_page', 10, 1 );
function edit_woocommerce_checkout_page($order){
global $post_id;
$order = new WC_Order( $post_id );
echo '<p><strong>'.__('Shipping Phone number').':</strong> ' . get_post_meta($order->get_id(), '_shipping_phone', true ) . '</p>';
}
Hi,
Please override templates/vendor-dashboard/vendor-orders/views/html-order-info.php template by copying it to yourtheme/dc-product-vendor/vendor-dashboard/vendor-orders/views/html-order-info.php.
add your code to show the shipping phone no
To add image in order detail page below Customer Note.
Override templates/vendor-dashboard/vendor-orders/views/html-order-notes.php template by copying it to yourtheme/dc-product-vendor/vendor-dashboard/vendor-orders/views/html-order-notes.php.