You’re creating a string representation of an array, when you need an actual array!
$blogusers = get_users();
$options = array();
foreach ( $blogusers as $user ) {
$options[ $user->user_email ] = $user->user_email; // No need to pass through __(), don't translate emails!
}
And then pass it to your options
argument:
$this->form_fields = array(
'sec_r2_mail' => array(
'options' => $options,
// Other arguments
),
);
Related Posts:
- How can I define a custom template for woocommerce [products] shortcode? [closed]
- Where is the “default attribute” values located in the phpMyAdmin in Woocommerce?
- Display Categories Assigned to a WooCommerce Product
- Get current WooCommerce endpoint not working
- Changing Woocommerce price display [closed]
- Which WooCommerce hook do I need to use to place the coupon field after the checkout sidebar
- WooCommerce Cart – Group Products By Category
- WooCommerce – update order item price and recalculate totals
- Set a default quantity input value for a variable product category in WooCommerce
- WooCommerce product sorting VERY slow
- WooCommerce change price in cart [closed]
- Categories not shown in admin after adding woocommerce products via wp wc cli
- Enabling autosave when plugin disabled
- WooCommerce email text based on category && shipping zone && payment method [closed]
- woocommerce – get_image_size() deprecated [closed]
- Problem with cURL and rest API
- Avada & WooCommerce Customization – Replacing product_title in woo-config.php [closed]
- WooCommerce template page for category
- Woocommerce PHP site that shows table with orders from specific category
- How to get the webshop page in 2:nd language, with Polylang and Hyyan
- Subcategories not working when using shared base with custom taxonomy
- Change how the Subtotal Price in cart being calculated [closed]
- Auto generate user email while registration
- WooCommerce Cart Total Table chronology order change [closed]
- Woocommerce Update Order Notes Date
- Shipping Method does not inherit settings from the class
- My woocommerce checkout page and woocommerce setting page are not responding [closed]
- Woocommerce Shortcode custom orderby not working
- Show only one variaton in catalog on meta key
- Switch position of short description and variations [closed]
- Overwrite ‘require’ in child-theme
- Javascript error when adding an item to the cart [closed]
- Best Practice – Customise a WooCommerce+WordPress Templates
- Woocommerce: Complex query in pre_get_posts [closed]
- How can I get all the woocommerce api orders [closed]
- Is it possible to update the total price on the checkout page in woocommerce from a custom field
- Tax are not showing on order while placing order with REST API
- Customize WooCommerce Add To Cart Form Name [closed]
- Remove WooCommerce block styles
- WooCommerce adding product to cart programatically [closed]
- Can’t find a product by SKU
- Weird strange letters appeared in all website links [duplicate]
- password_reset doesnt work
- How can I reference external attachments without breaking core WordPress files?
- Hide prices from certain category in woocommerce
- Check if a WooCommerce Order Item has a specific meta data key
- Simple Product not displaying in frontend
- WooCommerce Cart Items
- Retrieve Data from Custom Endpoint
- Online wc-blocks-style.css rendering instead of the hosted wc-blocks-style.css
- Broken link additional images after moving server
- WooCommerce Meta
- I have 3 types of prices in WP and I need to change price for each specific user role using hooks
- How do I display only the relevant attributes?
- How to hide “Shipping” label from Woocommerce cart page
- What is the problem with these lines of code?
- Dynamic product total add to cart amount
- How can I make a thumbnail slider
- How to add php variable inside wc_enqueue_js(‘jQuery’) function?
- Show menu order field in quick edit
- Adapt shipping surcharge code [closed]
- How to access product’s meta data when deleting a WooCommerce product?
- How to show specific admin menu to specific user role?
- WC_Structured_Data Class Causing Needless Translation
- Placing Lock Icon on WooCommmerce “Place Order” Checkout Button (WordPress ‘ignoring’ Changes…)
- How to Sync Woocommerce and CRM via External API
- Add sale count next to star rating in woocommerce single product page
- Format number to 2 decimal places
- Two e-commerce in two different folders of the same domain
- Random 503 and 504 errors
- How do i display zip code options during checkout [closed]
- Woocommerce language isn’t default language
- How set variation after filter in WooCommerce?
- Does anyone know a crowdsourcing plugin that can support the following use case?
- How to get products without tag?
- I can’t add pictures to the product attribute item in woocommerce
- WooCommerce – Show different terms and conditions for different user roles
- Display product thumbnail in Woocommerce email notifications
- Getting error in debug : price was called incorrectly. Product properties should not be accessed directly
- Woocommerce rounding cart totals with tax up
- WordPress user ID prefix
- Woocommerce add 15% discount to a product if quantity is greater than or equal to 6
- How to make product free for some customers and paid for others?
- WooCommerce – different icons for product categories
- WordPress returning “XHR” even when access keys are used
- mydomain.com/wp-login redirects to wordpress.com/wp-login
- WooCommerce Admin Only Email Hook
- Woocommerce – Dynamic Link to The Most Recently Added Product
- How to get _POST variable on WooCommerce product page (form on homepage)
- How do I put woocommerce cart page to my checkout page? [closed]
- Sort by promo code used woocommerce admin panel [closed]
- Search box missing Woocommerce Product Bundle Extension
- DatePicker in Woocommerce (My Account) Registration [closed]
- problems with an object product wooCommerce [closed]
- CSS url rules not relative to css path in account endpoint areas. IE. subscriptions
- Adding a column to woocomerce admin order page that can be sorted
- Auto generating API keys using the Application Authentication Endpoint [closed]
- Critical error on woocommerce checkout page
- Can’t add variable products since update WooCommerce [closed]
- Add custom ID to WooCommerce product tab