Ok, I figured it out (finally)
Instead of using the code above to add a new custom field, I changed it to this:
add_filter( 'woocommerce_checkout_fields', 'custom_override_checkout_fields' );
function custom_override_checkout_fields ( $fields ) {
$fields['order']['the_script'] = array (
woocommerce_form_field ( 'the_script', array(
'type' => 'textarea',
'class' => array('extracheckoutinfo form-row-wide'),
'label' => __('What is the script?'),
'placeholder' => __('You can skin this section if you added the "script" extra to your purchase'),
'required' => true
);
return $fields
}
which now allows me to target my custom field like this:
unset ($fields['order']['the_script'] );
Related Posts:
- Redirect to another page using contact form 7? [closed]
- Custom Shipping method not showing in checkout
- Create or Update thousands of woocommerce products via PHP
- Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type
- Creating a Callback URL for WordPress Woocommerce to update Order Status
- Change Woo Custom Endpoint Titles from a Plugin
- Woocommerce list variations that are added already to cart in Single Product
- Change pricing in Woocommerce based on Category and Product [closed]
- Creating a user ‘add custom field’ section
- Unable to show 4 products in a row
- Woocommerce attatch files and custom input meta to cart items and then to order
- Need to add custom cart item data
- Custom Search Function in WordPress Returns No Results
- WP WC CLI – WooCommerce setup store with wp-cli [closed]
- Adding Custom Fields for Img in Posts
- How to pass JavaScript variable to PHP in wordpress widget?
- Unable to add admin notice on plugin activation
- How To Ignore a Filter On Applying Filter the Content In a Function
- Saving Plugin settings to the database
- Add CSS animation as Preloader to WordPress
- Deleting images through upload folder, but not deleting from media library
- WordPress plugin installation
- Sort products without thumbnail in WooCommerce shop page
- send_headers don’t work on wordpress multisite
- Update Option Error: Notice: Undefined index
- Self deactivate plugins after an action occurs
- How to periodically scrape and cache strings from remote txt files. – My First Plugin
- Avoid class name collision when using third party libraries in plugins?
- Using a custom plugin to capture input data via Ajax and PHP
- Replacing a plugin function with a custom renamed function doesn’t work
- How to output CMB2 select options from repeated groups select elements?
- How to deal with WordPress and Pocket API to automate content curation on my hosted wordpress blog? [closed]
- WP All Import – Execute Imports
- Create a plugin from within WordPress
- Class variables not correct on page
- Duplicate results are displayed in a custom plugin [closed]
- Why is my custom post type not being activated on plug-in activation?
- How to redirect to same page after form submission
- Get Every Key & Value from Array then Display All in New Line
- How do I add $_SESSION[”] to my wordpress page?
- I receive taxonomy id
- output html on post or page from custom plugin [closed]
- Loop in elementor custom widget not working
- How to add a new column with text fields to WooCommerce Cart List?
- Built a second plugin but it overwrote the first one
- Creating a functionality plugin to edit seriously simple podcasting
- Error with get_price (and others) in self-written plugin to show price
- How to change WooCommece variation data programmtically [closed]
- .php file for woocommerce edit category? [closed]
- Asynchronous request in wordpress
- Make plugin php file called directly aware of WordPress?
- Search users with custom meta data
- dynamically create callback functions inside a for loop
- How to change layout of shop page in wordpress? [closed]
- Next Previous Post in wordpress with previous / next link with title?
- Different registration form for different roles
- Custom Fields for Page Edits
- Apply html elements in php statement
- WordPress Post HTML after Posting
- Settings options not showing up on Sub Menu page in WordPress plugin
- Creating New Dynamic Fields for a Certificate (Number Generation, Code Referencing, and more)
- WordPress Phone Field Check (use numbers, spaces and pluses)
- Can export gallery but can’t import it Wp all import
- Get product categories and add them to a custom taxonomy
- How to Get Category Name When Export Products
- woocommerce remove coupon link does not work
- need to find duplicated meta value in custom filed and view the posts that have the same value
- The Build menu theme is frozen with the wordpress theme
- How can I translate something in my class constructor of my plugin in WordPress?
- Define global variable in theme file and call that variable in plugin file
- Adding discount functionality to the cart
- Rename a folder via HTML POST request
- How to translate to spanish wordpress hardcoded content/files?
- Google Maps for Woocommerce Checkout
- working code, not working – Plugin Dev
- category page multiple products add to cart any plugin available for woocommerce
- SimpleXML is not working with xml response from external api
- Multiple image selection custom widget
- “Enable Media Replace” plugin does not update serialized object in WPMeta
- Prefix WordPress Taxonomy Tags With Hashtag Symbol Like Twitter
- Meta Key array building with multiple input values from fields
- Configuring default woo commerce login with modal popup
- register_activation_hook doesn’t fire at all
- Adding/ Removing actions for plugins
- Creating Nested custom fields
- My ajax request don´t work and return 0
- How to allow customers to input a text as a product variation *and* charge per character?
- Plugin Breaking WordPress Login
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- WordPress Meta Query: Relation is not working correctly
- How to fix ‘Call to undefined function do_settings()’ error?
- What is the source outline for a basic word press plugin?
- Submit posts in two different post types with the same form
- how to search through plugin in wordpress cimy-user-extra-fields?
- Integrating WordPress Content into a jQuery Slider
- Outputting custom field query from a plugin to the website header
- Adding a script & php to functions.php
- Displaying Category Feature image on loop
- additional fields based on the quantity of products selected
- Fields are not displayed on front end under custom php code in Advanced Custom Fields and Flexible Content field WordPress