-
-
Save leewillis77/27fe2a18ca76e88cca150a1912cbbaac to your computer and use it in GitHub Desktop.
Add custom field to prepopulation list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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