- 1 ) ) as $key => $product ) { $id = $product->get_id(); $products[ $key ] = array( 'label' => $product->get_name(), 'id' => $id, ); } return $products; } public static function get_id() { return 'woo_products'; } public static function get_type() { return 'autocomplete'; } public static function is_ajax_field() { return true; } public static function get_validators() { return array( 'required' ); } }