Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

how to add meta for order in woocommerce

by this action can add extra meta to order
add_action(‘woocommerce_checkout_update_order_meta’,function( $order_id, $posted ){
update_post_meta( $order_id, ‘my_custom_meta_key’, ‘my data’ );
} , 10, 2);

$order_id is the id of the order, which is stored as a custom post type

$posted is all the data from $_POST

Related Posts:

  1. Add multiple attributes to product from php
  2. How can I concatenate variables to search results title? [closed]
  3. “Enable Media Replace” plugin does not update serialized object in WPMeta
  4. Get value from an input field and pass into update_meta_data as $meta_value
  5. Remove /product/ from url. I want only category name then product name
  6. Pre booking doesn’t work with custom bootstrap modul in woocommerce [closed]
  7. WooCommerce specifc variations for specific user role [closed]
  8. Save custom attributes of product in woocommerce
  9. Filtering WooCommerce Orders by Category
  10. trying to get product category image in woo-coomerce
  11. How to add checkboxes for a woocommerce product? [closed]
  12. Why am I getting ( WooCommerce Services could not be installed (Could not create directory.). ) error and how to solve it ?
  13. Product queue for my subscription box
  14. Want to Show Sub categories under Categories section using Woo Commerce [closed]
  15. how to do login using woocommerce rest api From android
  16. Custom Pages for Woocommerce Product-Category Pages
  17. Woocommerce Minimum Price for a Composite Product to add in cart
  18. How can I change the meta_key for a particular piece of information?
  19. creating a custom shop page display on archive woocommerce
  20. WordPress Post Visibility Options for Frontend
  21. Bulk update all posts from plugin settings screen
  22. Woocommerce Shop page variation product button replace with add to cart button
  23. How can I insert thousands of Woocommerce products by batch with PHP? [closed]
  24. WooCommerce search products between price range using WP_Query
  25. Redirect to another page using contact form 7? [closed]
  26. How to use add_submenu_page() for editors?
  27. PHP Error When a plugin is active
  28. woocommerce with custom post type
  29. Meta box losing its value when scheduled post is published
  30. How to insert multiple postmeta values with one query?
  31. Mass SQL WordPress Meta Key deletion
  32. Is there a way to get plugins and themes not built for multisite to work on a network subsite?
  33. Exact Hook to payment methods
  34. Restrict content based on buy woocommerce product
  35. How to get a list of bundled products using wp_query in woocommerce
  36. Adding Static Image to WooCommerce Content-Single-Product template
  37. Date format – Meta Box plugin
  38. Hide a Menu Item on Login
  39. get meta value from database by post id
  40. Product count in archive page Title in WooCommerce [closed]
  41. Add item to the woocommerce dashboard menu from a plugin
  42. How to remove bulk actions from custom post type
  43. WooCommerce – set session with new cart item meta when updating cart item quantity [closed]
  44. How to get the particular product quantity in orders in Woocommerce [closed]
  45. Get Every Key & Value from Array then Display All in New Line
  46. Woocommerce Coupon Menu and Marketing Menu missing After “Coupons can now be managed from Marketing > Coupons.” [closed]
  47. Adding custom meta boxes to specified custom post type
  48. Get orders of a specific customer woocommerce
  49. WooCommerce: Force coupon for existing/registered customers [closed]
  50. Add_rewrite_endpoint doesn’t work with post name permalink structure
  51. wc_get_template new template does not showing up
  52. How to select a paragraph other than the 1st to be the post’s excerpt?
  53. Show icons or badges under title on product archives/category pages
  54. Conditional Shipping Options if Certain Products are in Cart WooCommerce
  55. WordPress Stock Update Programatically
  56. Woocommerce Backend Search by Title and SKU
  57. Problem with add_action
  58. Set Multiple Meta Values as an Array Using dispatch( ‘core/editor’ ).editPost() Call in Gutenberg/JS
  59. WooCommerce Shopping Cart Not Initially Showing Products [closed]
  60. WooCommerce: after install hook
  61. How to add a new column with text fields to WooCommerce Cart List?
  62. Add a “View all” button on WooCommerce product archives pages
  63. I am trying to make a field show and save from quickedit screen
  64. Woocommerce: limit user to see only the products he created
  65. Woocommerce singe product custom gallery output works just on the first slide
  66. How to include a custom field in the woocommerce email?
  67. woocommerce search by sku and title ajax
  68. Woocomerce add info after order email prouct item
  69. Remove Pagination for Product Category Pages WooCommerce
  70. add seperate suffix for low price and high price in woocommerce
  71. Get products list by url key in WordPress Woocommerce [closed]
  72. Cross Sells are not being shown in Cart Page. Please Help!
  73. How to display registered customer list as dropdown in WooCommerce checkout?
  74. How do I get the Payzone WooCommerce payment gateway plugin to show up in the settings? [closed]
  75. Error with get_price (and others) in self-written plugin to show price
  76. How to change WooCommece variation data programmtically [closed]
  77. Getting a ressource ID, from a WC_Order_Item_Product/Order
  78. .php file for woocommerce edit category? [closed]
  79. Woocommerce – WordPress Roles & Capabilities
  80. Advanced Custom Fields (acf) – Filter Relationship by Taxonomies not Post Type
  81. Sending customer an email with link to stripe to make payment
  82. Override a Plugin Function
  83. Custom template for all woo commerce categories
  84. How to remove products-links after the product title using remove_action
  85. Search users with custom meta data
  86. WordPress Multi-Step Product Search
  87. Is it possible to instantiate a new WC_Cart?
  88. Woocommerce Free shipping method [closed]
  89. how get curent URL slug from archive page [closed]
  90. dynamically create callback functions inside a for loop
  91. Sell access to form [closed]
  92. get_term_meta returns false in widget
  93. Add key and value to an array in another file
  94. Custom search search does not work?
  95. WordPress custom plugin that uses woocommerce enabled payment gateway for payment [closed]
  96. Disable variations on woo commerce if out of stock
  97. How to change layout of shop page in wordpress? [closed]
  98. I want to filter my products with attributes [closed]
  99. How to add category and subcategory in WordPress custom code?
  100. Customizing $product->get_title() function
Categories plugins Tags plugins, post-meta, woocommerce-offtopic
Archive pagination – second page shows exactly the same posts
A splash page on landing page

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress