Created
April 7, 2020 08:36
-
-
Save leewillis77/4d49a70143d4178f44c632c450974dc8 to your computer and use it in GitHub Desktop.
Mark field as able to prepopulate
This file contains hidden or 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 | |
/* | |
* Plugin Name: Mark GPF fields as pre-populatable | |
* Plugin URI: http://docs.woothemes.com/document/google-product-feed/ | |
* Description: Example of how to mark a field as pre-populatable in the Google Product Feed plugin. | |
* Version: 1.0 | |
* Author: Ademti Software | |
* Author URI: https://www.ademti-software.co.uk/ | |
*/ | |
add_filter( 'woocommerce_gpf_all_product_fields', function ( $fields ) { | |
$fields['energy_efficiency_class']['can_prepopulate'] = true; | |
return $fields; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment