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
- Problems with autoloading classes via sp_autoload_register / maybe interfering WP-specific autoloader
- How to remove duplicate sub-menu name for top level menu items in a plugin?
- category_name not working (not showing up in sql query debug)
- How can I make my custom shortcode work in a Custom HTML Widget?
- How to Loop Plugin Option Field Set?
- Update Multiple Post Meta for the Same Post In One call?
- Updating WooCommerce variable product stock issue
- How do I configure WordPress to talk to a Microsoft SQL Server database?
- How to Create a Directory in a Plugin Folder?
- Ajax call doesn’t work in frontend but it’s working in backend (when I’m logged in)
- Create plugin that works in background
- Checking for user role in a custom plugin
- HELP: Integrating WP with raw PHP code once published button is hit
- Loading class files via autoload method
- I would like to use create a function in my custom plugin to tell WP to use a different header
- jQuery function didn’t work in my plugin
- Escape when echoed
- How to remove the woocommerce_checkout_process action hook in woocommerce if particular project in cart [closed]
- Write to / remove from default .htaccess file from plugin?
- How to cancel WordPress’ action/filter when using OOP with anonymous callback
- Programatically download a plugin
- Redirecting to home page after login as custom role WordPress
- WooCommerce Custom Product to checkout
- How would I go about creating a user ranked post popularity page?
- 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?
- How to modify WCMP Rest API response?
- Woocommerce dependent plugin
- How to check current user before all actions and filters?
- WooCommerce specifc variations for specific user role [closed]
- Woocommerce Minimum Price for a Composite Product to add in cart
- Create a plugin from within WordPress
- Class variables not correct on page
- Why is one phpunit test throwing an error on one class when all other classes are similar without error?
- Activate my plugins via FTP
- Why is my custom post type not being activated on plug-in activation?
- How to add apply_filter for a class property in plugin
- A server-side hook failed when committing plugin code to SVN
- Content-Security-Policy Headers are there and showing the correct settings, but still getting a refused connection
- How do I add $_SESSION[”] to my wordpress page?
- output html on post or page from custom plugin [closed]
- Built a second plugin but it overwrote the first one
- How to delete all categories programatically?
- How to use custom Javascript code inside a plugin?
- Search users with custom meta data
- Way to send multiple values for column to MySQL?
- How to change layout of shop page in wordpress? [closed]
- Creating New Dynamic Fields for a Certificate (Number Generation, Code Referencing, and more)
- How to makes changes on the shop/category/tag pages but not on the product pages in woocommerce?
- need to find duplicated meta value in custom filed and view the posts that have the same value
- Conditional delete metadata does not works
- How can i solve php upgrade problem
- woocommerce: Customize email with item total count
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- Create multiple posts when a custom post is created
- Rename a folder via HTML POST request
- How to get the checkout form data from checkout page when place-order button is clicked
- Getting Fatal error: Uncaught Error: Call to undefined function plugin_dir_path() when linking to another file within my wordpress plugin
- How to make WooCommerce multiple filter with custom meta fields
- Google Maps for Woocommerce Checkout
- working code, not working – Plugin Dev
- category page multiple products add to cart any plugin available for woocommerce
- WordPress plugin blog creation
- implement checkbox or toggle switch in plugin code
- “Enable Media Replace” plugin does not update serialized object in WPMeta
- Meta Key array building with multiple input values from fields
- Configuring default woo commerce login with modal popup
- Custom plugin issue – Notice: Trying to get property of non-object in
- submit form data to wordpress existing database table using my plugin
- register_activation_hook doesn’t fire at all
- How can I call functions from a custom plugin?
- My ajax request don´t work and return 0
- How to limit each front-end user to view just his own uploaded files on Amazon S3?
- How can I insert a record into a custom table from my custom form in my custom admin page?
- How to add a handler for a button in plugin?
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- How to fix ‘Call to undefined function do_settings()’ error?
- Move related products after product summary? [closed]
- wordpress select multiple options and illegal string offset ‘timeslot’ [closed]
- how to search through plugin in wordpress cimy-user-extra-fields?
- Woocommerce disable checkout on specific day
- Hook for single product thumbnail
- Translate text for empty product
- Function not being called on form submit, only blank admin-post.php page
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- How to add a static image inbetween the product tiles on main shoppage woocommerce?
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- WordPress Throwing Deprecated Errors on its own Files
- plugin doesn’t retrieve data from database