Skip to content

Instantly share code, notes, and snippets.


leewillis77/functions.php Secret

Last active Dec 3, 2018
What would you like to do?
Add custom field to prepopulation list
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