I found in documentation
Checkbox, Radio and Select-Only Parameters
- $options (array): An array of options. The array must be or the form
array( 'option_id' => 'Option Label' )
Example
wpas_add_custom_field( 'my_field_with_options', array( 'title' => 'My Options', 'options' => array( 'option1' => 'First Option', 'option2' => 'Second Option'), 'order' => 1 ) );
You add the order IDs to array as values, not keys. Try to change array to 'order_ID' => 'order_title'
:
$MyValueArray = [];
foreach ($customer_orders as $customer_order) {
$MyValueArray[$customer_order->ID] = $customer_order->post_title;
}
Related Posts:
- Woocommerce – Add a product to cart programmatically via JS or PHP [closed]
- ( Woocommerce) How to get the user belonging to an order? [closed]
- WooCommerce: Webhook disabled on its own
- How to delete woo commerce order pragmatically? [closed]
- Hook and send Woocommerce data after click Place Order button
- When Free shipping is available hide other shipping methods except Local pickup in WooCommerce [closed]
- Change add to cart text if a product is in cart on WooCommerce
- How to change page via login as user and admin
- WooCommerce WebHook Retry
- Can I set a custom “alt” attribute with woocommerce_get_product_thumbnail()?
- Remove all Span Tags and class From Woocommerce Price [closed]
- Importing Woocommerce products with variations
- Woocommerce login not working on the first try
- WOO-Commerce translation | Tried it all [closed]
- Is there a way to show Single Variation prices in the product loop when filters or attributes are active?
- WooCommerce: “account is already registered with your email address”
- Enter name and email on the Product page and keep the input data on the Checkout page
- Separeting product from post in search result
- Woocommerce: Same gross price for different tax rates [closed]
- add shoppy.gg to woocommerce instead of add to card [closed]
- List of shipping on product page [closed]
- How to edit T&C checker text in Woocommerce checkout page? gettext?
- What is the reason for two classes storefront_woocommerce and storefront
- Get email type inside email template – order emails
- Caption not showing with Woo commerce thumbnails
- Change the Title Tag of Search Products Page
- Confirm Password on checkout page not working in woocommerce 3.0.1
- Woocommerce’s add_to_cart function returns false and doesn’t add anything to the cart [closed]
- How to check woocommerce single product tag
- In WooCommerce can you make a list of ‘steps’ for quantity increase? [closed]
- Send email notifications to a defined email address depending if a product in order has a specific TAG [closed]
- Adding author option to [products] woocommerce shortcode
- Set dynamic Options array in woocommerce_form_field
- WooCommerce product title formatting
- Colour of selected radio button seems backwards in Twenty Seventeen + Woocommerce
- How to modify WooCommerce button text in default and additional languages
- How to hide URL for downloadable product in WooCommerce? [closed]
- Customizing WooCommerce
- Get Post ID from attachment ID (Redirect to product page)
- WooCommerce set a min order price for a single country [closed]
- “Reset my password” links to itself (page refreshes) [closed]
- Woocommerce custom taxonomy filtering
- Woocommerce product tab is not showing probably
- How to list best seller products in woocommerce
- Updating failed. The response is not a valid JSON response. Gutenberg + Woocommerce Products
- Add product image to Woocommerce downloads page
- How to check if woocommerce_order_item_name is use in email?
- Sharing data between filters on a snippet (user specific) for Woocommerce
- How to add custom checkboxes from loop to WooCommerce product variation options?
- Restrict product tags archive to certain users
- Logo showing on some page but not on product categories pages
- Woocommerce doesn’t work with theme, header missing and css messed up
- Woocommerce Product Variation – Add Price Logic
- Display related product categories by subcategory
- Woocommerce Multisite global search how to mod ajax function?
- How to let users create lists of woocommerce products?
- How to force Woocommerce to deliver the product to the paypal adress which was used?
- Order again Woocommerce inside View Order
- Photo cover in WooCommerce
- How to vary WooCommerce product prices based on order dates
- How to save one API response to WooCommerce order meta data
- WooCommerce and ACF: How to Redirect Upon Add to Cart – Partially Working Example
- Woocommerce: Search by custom attribute
- How to fix: “The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.” after malware cleaning
- Can’t update WooCommerce payment method title
- Set Post Thumbnail to external URL
- Custom theme woocommerce product detail page template not working
- Increase the download speed of a large number of variations in WooCommerce
- remove add to cart for free (0 $) product woocommerce
- WooCommerce related products load random posts per page
- WooCommerce: Adding a setup fee to certain products
- Removing shipping for one product with coupon
- Add button linked to single product page on order detail page
- syntax error – woocommerce
- How to on/off woocommerce filter with redux framework [closed]
- WooCommerce Admin Only Email Hook
- Woocommerce – Dynamic Link to The Most Recently Added Product
- How to set up a single product shop with woocommerce? Skipping the product archive
- I’m trying to display product categories on each product in the list
- Cross-sells on WooCommerce product page
- Admin Order adding an extra product on add_line_item
- Woocommerce update cart
- Get WP All Export row ID
- WooCommerce – missing products when viewed by tag
- Quotes not rendering properly in WooCommerce settings API [closed]
- WooCommerce add custom product_type_option
- Hiding all products except for one in wordpress admin panel
- woocommerce: get product detail form sku [closed]
- Woo-Commerce new order email no style attached
- woocommerce method to preview new order email,avilable hook
- Update WooCommerce product price periodically
- Edit woocommerce subscription email
- cannot create product attribute (taxonomy) and add terms on the same execution
- How to Manage Multiple WordPress Websites from one dashboard (WooCommerce)
- Setting stock levels to “0” for all products in store using WP CLI
- WooCommerce Review ID Block
- custom status in Woocommerce with database results
- Question about WooCommerce Subscription
- WooCommerce: Redirect to an item’s product page after item is removed from cart
- Blurry product card image – rendered is 486×452 vs 300×279 in real image. Smaller versions being autocreated and served using srcset