Schema Issues

  • Hi everybody,

    I have many errors when I use the google tool “structured data test tool” for woocommerce products.

    For example on the url put on sensitive data I have 8 errors.

    Concerning the error “priceValidUntil” I added in my functions.php file the code specified in your article and I did the same for the brand but nothing happens, I still have as many errors.

    Can you help me to reduce warnings on my search console ?

    Thank you for your help.

    Patrick

    • This topic was modified 3 months, 3 weeks ago by Patrick.
Viewing 15 replies - 1 through 15 (of 15 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    We have a recent update release with a fix on a number of issues. Would you please install and let us know if the issue still persists.

    Looking forward to helping you. Thank you.

    Hi,

    I’m runing on Version 1.0.42.2 the latest version.

    Kindly regards.

    Hi There. I have added the logo image in the required field. But still, it doesn’t resolve the same error in Google structured data testing tool and showing that”
    false (The value provided for logo.url must be a valid URL.) Could you help?

    Hi Tarun, Please open a new ticket and include the URL where you are seeing this issue.

    Patrick, seems like something to do with offers on variable products. We might need to take a closer look at the settings. Please include your WP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello Patrick,

    We will need you to add the website URL to the Sensitive Data section so we can access the website admin dashboard.

    Thank you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    Thank you for contacting Rank Math today.

    Would you mind sharing some FTP access to your site so that we can check the code that you added to your theme to populate the values?

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    Thank you for contacting Rank Math today.

    I have modified your code to the following to fix the Brand, Pricevaliduntil and GTIN warnings:

       /**
     * Filter to modify Rank Math product schema data
     * Replace $schema_type with schema name like article, review, etc.
     * @param array $entity Snippet Data
     * @return array
     */
    add_filter( "rank_math/snippet/rich_snippet_product_entity", function( $entity ) {
    	$entity['offers']['priceValidUntil'] = '2022-01-01';
    	$entity['brand'] = 'ATHOM';
        $entity['mpn'] = $entity['sku'];
    	return $entity;
    });

    You will now need to collect some reviews and ratings for your products to fix the rest of the warnings.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hi Michael,

    Thank you for your answer.

    Everything seems to be ok for single product but for a Variable product i have still to many “errors” and “warnings” on product.

    I have added on sensitive data some url with errors and warning could you check these url ?

    Kindly regards.

    Patrick.

    Hi Patrick,

    Thank you for the reply.

    I’ve modified the code to the following:

    /**
     * Filter to modify Rank Math product schema data
     * Replace $schema_type with schema name like article, review, etc.
     * @param array $entity Snippet Data
     * @return array
     */
    
    add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
        global $product;
        if ( $product->is_type( 'variable' ) ) {
            $variations = $product->get_available_variations();
            foreach ( $variations as $key => $variation ) {
                $entity['offers'][ $key ]['priceValidUntil'] = '2050-01-01';
                $entity['mpn'][ $key ] = $entity['sku'];
                $entity['brand'][ $key ] = 'ATHOM';
            }
        } else {
            $entity['offers']['priceValidUntil'] = '2022-01-01';
            $entity['brand'] = 'ATHOM';
            $entity['mpn'] = $entity['sku'];
        }
    
        return $entity;
    });

    Let me know if there are any issues. Thank you.

    Hi Michael,

    Everything seems to be ok, just waiting for customer reviews 🙂

    Many thanks for your help.

    Great support and great plugin.

    You rock.

    Kindly regards from Paris.

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 15 replies - 1 through 15 (of 15 total)

The ticket ‘Schema Issues’ is closed to new replies.