WooCommerce Code Correction
₹600-1500 INR
K zaplacení v momentě doručení
I have defined two custom fields for my Woocommerce orders using WooCommerce Admin Custom Order Fields extension to create these.
When I manually create an order (/wp-admin/[login to view URL]), I can see those fields and I can successfully add data and save the order.
I have chosen "Show in my Order/Emails" in attributes of WooCommerce Admin Custom Order Fields extension and these fields are appearing in view order page of each orders at front end.
I would, however, also like to have these fields appear as columns in order detail page at /orders/ endpoint where tabular summary of all orders is shown.
Documentation of this extension "WooCommerce Admin Custom Order Fields" tells me that I can use something like get_post_meta($post_id, '_wc_acof_2') with 2 being the ID of that custom field. Have used several ways to achieve result, however, with no luck.
Here is the code I tried in [login to view URL]:
add_action( 'woocommerce_order_details_after_order_table', 'admin_custom_order_field', 10, 1 );
function admin_custom_order_field($order){
echo '<p><strong>'.__('Candidate Name').':</strong> ' . get_post_meta( $order->id, '_wc_acof_1', true ). '</p>';
echo '<p><strong>'.__('Case Due Date').':</strong> ' . get_post_meta( $order->id, '_wc_acof_2', true ). '</p>';
}
Identifikační číslo projektu: #15891040
O projektu
Uděleno uživateli:
Greetings! My name is Amit Kumar and I am an expert in web development. I believe my skills are good enough to match your project. I have a good grasp of working with core php, wordpress and framework Relevant Skills Další
6 Freelnceři na tento projekt zveřejňují nabídky v průměru ₹3778
Hi greetings of the day I am a Experienced PHP Developer based out in Chennai,India. My experience revolves around development of web and mobile applications,Ecommerce websites. Relevant Skills and Experience I believ Další
Hello I am Ruchi Maniar wordpress developer since 2.5+ years. I will manage your problem after see the actual code. I may conflict with your other plugins. I have enough experience to solve this problem easily. Další