Comments (1)
Sigh after all that I've just realised the error of my ways: passing the $order
object to woocommerce_wp_text_input
solves it. Using the same example code:
add_action(
'woocommerce_admin_order_data_after_billing_address',
function ( $order ) {
woocommerce_wp_text_input(
[
'id' => 'example_meta',
'label' => __( 'Example meta', 'text-domain' ),
- ]
+ ],
+. $order
);
woocommerce_wp_text_input(
[
'id' => 'another_meta',
'label' => __( 'Another meta', 'text-domain' ),
'value' => $order->get_meta( 'another_meta', true ),
]
);
},
5
);
There's probably an improvement here, a check to see if HPOS is active and no value is passed results in a 'doing it wrong'? Happy to contribute a PR if that's the right path to follow.
from woocommerce.
Related Issues (20)
- [Flaky] checkout/checkout-block.merchant.classic_theme.spec.ts HOT 1
- Double Click Required to Interact with Elements After Invalid Coupon Code Entry on Cart Page
- WooCommerce failed to add the automatic `.product` wrapper to the single product block template (theme's template file) when the single product blocks are inside a block pattern
- Unexpected hooked block rendered before product summary block (`wp-post-excerpt`) when any action in added on `woocommerce_before_single_product_summary` hook.
- Gutenberg plugin breaks the description editor in the new product editor experience
- Patterns and Media are not available in the new product editor experience
- Migrate All Products block to functional component
- [Changelog auto add] Add changelog to PR fails for repositories with names different than default
- Gutenberg Interaction Between WC Patterns and CoBlocks
- Product Collection: allow syncing with query for custom taxonomies templates
- woocommerce product data is blank HOT 2
- The Atributes is not showing iven i selected it in product settings page. HOT 1
- WooCommerce Standard rate taxes getting issues with pagination
- Include purge cache when coming soon template is updated in documentation
- [Flaky Test] New Arrivals
- Product image incorrect when accessing product variation through URL
- HPOS meta data on the fly sync (compatibility mode) not working properly HOT 1
- Missing css .tips class in admin list with order statuses
- Performance issue with variation products saving
- Woocommerce shop page redirects to the homapage HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from woocommerce.