Created
September 2, 2020 16:54
-
-
Save leewillis77/f0daec3aa5bc24433236801447da6d78 to your computer and use it in GitHub Desktop.
Mark fields as pre-populatable in the WooCommerce Product Feeds extension
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: WooCommerce Product Feeds : Mark fields as pre-populatable. | |
* Plugin URI: https://www.ademti-software.co.uk/ | |
* Description: Marks fields in the Google Product Feed as pre-populatable. | |
* Author: Ademti Software | |
* Version: 1.0.0 | |
* Author URI: https://www.ademti-software.co.uk | |
*/ | |
add_filter( 'woocommerce_gpf_all_product_fields', function ( $fields ) { | |
$fields['age_group']['can_prepopulate'] = true; | |
$fields['gender']['can_prepopulate'] = true; | |
return $fields; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment