Hello,
Thank you for getting in touch and I am extremely sorry about the trouble this might have caused.
Rank Math takes the schema data from your product pages automatically and turns it into Schema-ready content. Likewise, the aggregateRating and review fields are taken from your actual product reviews that your buyers/customers leave on your products.
If you don’t have any reviews yet, that is going to show up as a warning in the schema testing tool. That’s because Google will actually look for those fields.
Please acquire some reviews and ratings to get rid of the aggregateRating
and review
warnings.
You can fix the SKU and availability issue easily as well:
For the GTIN, ISBN, MPN issue, you can fix it by adding that to your products using the custom product attribute feature in WooCommere or you can use this plugin: https://wordpress.org/plugins/product-gtin-ean-upc-isbn-for-woocommerce/
For the priceValidUntil warning, you have to either ignore that or add a sale price with validity to get rid of it: https://i.rankmath.com/cMqAAH
Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.
Hello,
thank you and sorry to join this conversation,
about gtin issue there is a code that we can simply add to function child file.
if the code is simple like adding “brand” and “price valid until”, i’d rather to put code instead of installing plugin
thank you
Helo @Alberto
thank you for your reply. Yes, that is what i mean
i have scenario, and please let me know if this possible
i currently have SKU that consist 5 numeric, then since gtin must be at least 8 number i will add 3 number so my SKU would be 8 number.
is that possible to adopt each SKU to become gtin of each product ?
please correct if i can implement this code :
add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
$product = wc_get_product( get_the_ID() );
if ( $product->is_type( 'simple' ) ) {
$gtin_value = get_post_meta( get_the_ID(), '_sku', true );
$entity['gtin8'] = $gtin_value;
return $entity;
}
});
Hello,
If you are sure your value will always amount to required 8 numbers for gtin8, you can sue the code for your Gtin. If you are not so sure, and to be on the safer side, I can recommend you add a length check for the value: if (strlen ($gtin_value) == 8){//go on}
Hope this helps you. Thank you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.