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
- Custom Dynamic Tag in Elementor not showing image
- WordPress plugin installation
- How to prevent action in ajax request, when in admin side?
- I would like to use create a function in my custom plugin to tell WP to use a different header
- Getting media library popup in custom plugin admin page
- Sort products without thumbnail in WooCommerce shop page
- send_headers don’t work on wordpress multisite
- Add multiple attributes to product from php
- jQuery function didn’t work in my plugin
- Is it possible to set up multistore in Woocommerce? [closed]
- Sanitizing, Validating and Escaping in WordPress (Plugin)
- Plugin not saving values when placed in a folder within /wp-content/plugins
- Escape when echoed
- Scope for PHP Variables Assigned in functions.php or a plugin
- Make specific products accessible only to a user role in WooCommerce
- How to remove the woocommerce_checkout_process action hook in woocommerce if particular project in cart [closed]
- Plugin exceeds memory limit
- How to get subscription key or id using Woocommerce Subscriptions [closed]
- Write to / remove from default .htaccess file from plugin?
- Update Option Error: Notice: Undefined index
- How can I display a contact form for out of stock products in WooCommerce?
- Plugin Development sqlite or WordPress’ database
- How to cancel WordPress’ action/filter when using OOP with anonymous callback
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- How to trigger $_GET request within admin plugin page?
- HTML in WooCommerce settings
- How to generate video out of images via WordPress plugin
- How can I get WordPress to save comments in markdown format?
- WooCommerce get_price returning wrong price when used via ajax
- How to ‘clone’ a wp plugin to make small changes
- Open Post Thumbnail in New Child Theme File in WordPress
- Where should I save an API key of my user when installing my plugin?
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- Programatically download a plugin
- Redirecting to home page after login as custom role WordPress
- Add keywords meta to index.php page
- Custom form action to handle data inside a plugin
- Woocommerce plugin for minimum order and add-to-card-step
- Add Product Subtitle to Woocommerce Product Page
- Self deactivate plugins after an action occurs
- Pulling data from custom plugin settings using PHP shortcode and Javascript
- woocommerce 3.2.1 not sending order notification emails
- WooCommerce Custom Product to checkout
- Woocommerce – How to populate custom select field with stored values on checkout page?
- How to periodically scrape and cache strings from remote txt files. – My First Plugin
- Automatically add attributes to woocommerce product?
- WP Post Template – Templates in own folder
- Avoid class name collision when using third party libraries in plugins?
- wordpress plugin is not activating from widget
- Edit Yoast SEO breadcrumbs output [closed]
- How would I go about creating a user ranked post popularity page?
- Redirection of users away from wp-admin (but not administrators)
- Using a custom plugin to capture input data via Ajax and PHP
- How to stop activating a plugin and show admin notice when dependent plugins minimum version is not met
- Assign / update custom field value for all posts (How can I assign only to posts without custom field value?)
- How to enable specific plugin only based around shop manager role?
- code is working properly in Core PHP but writing coding in WordPress
- woocommerce payment gateway callback not firing [closed]
- How to modify WCMP Rest API response?
- Fetch Children of Grouped Products Inside WooCommerce Product Loop
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- Woocommerce dependent plugin
- How to check current user before all actions and filters?
- New databes tables with – WooCommerce – for developers [closed]
- Image upload and download from front-end
- WooCommerce: Building a page with user input which is used to query order status and external API and return a result
- Change commission_status paid when withdraw_status vendor is completed
- How to toggle between two custom fields in WordPress woocommerce ‘WC Product Field Group’ plugin?
- custom payment gateway in woocommerce failed to connect to remote api server
- wp_remote_get() returns 403 while file_get_contents() does not
- 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 create a plugin with automatic update?
- How can I see $post object in frontend from functions.php?
- Google Maps for Woocommerce Checkout
- Move plugin pages from dashboard to front-end
- working code, not working – Plugin Dev
- category page multiple products add to cart any plugin available for woocommerce
- Easiest way to load/fire a handful of functions, IF checkbox is checked?
- SimpleXML is not working with xml response from external api
- How to use Datatable with Ajax when creating plugin on WordPress?
- Getting all woocommerce products from REST API call in plugin
- WordPress plugin blog creation
- Problem with wordpress has_action() function
- Offering a freemium plugin (a free version + paid version)
- Using id to show item
- Multiple image selection custom widget