Skip to content

Instantly share code, notes, and snippets.

@leewillis77

leewillis77/functions.php Secret

Last active Dec 3, 2018
Embed
What would you like to do?
Add custom field to prepopulation list
<?php
function lw_woocommerce_gpf_custom_field_list( $list ) {
// Register the _my_custom_field meta field as a pre-population option.
$list['meta:_my_custom_field'] = 'My custom field';
return $list;
}
add_filter( 'woocommerce_gpf_custom_field_list', 'lw_woocommerce_gpf_custom_field_list' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment