1. Home
  2. Knowledge Base
  3. WooCommerce Wholesale Lead Capture
  4. Registration
  5. How To Remove Custom Fields From Another Wholesale Registration Form

How To Remove Custom Fields From Another Wholesale Registration Form

The WooCommerce Wholesale Lead Capture plugin allows multiple wholesale registration forms by the use of shortcodes.

However, all enabled standard and custom fields on the Wholesale Lead settings are applied to all wholesale registration forms. So if you want to remove certain fields from an individual registration form, you can use the custom snippet provided below.

add_filter('wwlc_registration_form_fields', function($fields) {
// Remove custom field on this page only
if( get_the_ID() == 1234 ) {
foreach( $fields as $key => $field ) {
// Target the Field ID of custom field
if( $field[ 'id' ] == 'wwlc_cf_example' )
unset( $fields[ $key ] );
return $fields;
} , 10 , 1);

In the example above, you need to replace the ID of 1234 to the Page ID of the wholesale registration page you want to remove the custom field on.

Next, the ‘wwlc_cf_example’ string should be changed to match the field name you want to remove from that particular registration page.

You can go to WooCommerce > Settings > Wholesale Lead > Custom Fields, to check the Field ID of the custom field you want to remove.

Then put this on the functions.php file of your theme/child theme to apply the change to your Wholesale Registration Form.

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support