• Resolved sandykg09

    (@sandykg09)


    I met a warning in google webmaster

    Warning The “priceValidUntil” field is missing
    Warning The “aggregateRating” field is missing
    Warning “availability” field is missing
    Warning The “brand” field is missing
    Warning The “url” field is missing
    Warning The “sku” field is missing”

    I want to hide unnecessary fields in: wp-product-review\includes\functions.php

    if ( ! function_exists( 'wppr_schema_data_types_allowed_brand' ) ) {
    	add_filter( 'wppr_schema_data_types_allowed_for_Product', 'wppr_schema_data_types_allowed_brand', 10, 1 );
    	add_filter( 'wppr_schema_data_types_allowed_for_IndividualProduct', 'wppr_schema_data_types_allowed_brand', 10, 1 );
    	add_filter( 'wppr_schema_data_types_allowed_for_ProductModel', 'wppr_schema_data_types_allowed_brand', 10, 1 );
    	add_filter( 'wppr_schema_data_types_allowed_for_SomeProducts', 'wppr_schema_data_types_allowed_brand', 10, 1 );
    	add_filter( 'wppr_schema_data_types_allowed_for_Vehicle', 'wppr_schema_data_types_allowed_brand', 10, 1 );
    
    	/**
    	 * IndividualProduct, Product, ProductModel, SomeProducts, Vehicle need the Brand field.
    	 */
    	function wppr_schema_data_types_allowed_brand( $types ) {
    		$types[] = 'schema:Brand';
    		return $types;
    	}
    }

    I don’t want to show them how?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor contactashish13

    (@rozroz)

    @sandykg09 I believe Google will show the warning even if you hide the fields because it expects them to be present. It would be better to provide some values for those fields using the filter wppr_schema.

    Plugin Contributor contactashish13

    (@rozroz)

    @sandykg09 I’m closing this thread assuming you have solved this ?? If you continue to face a problem, please open a new thread referencing this one.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide unnecessary fields’ is closed to new replies.