• Resolved James

    (@jamesbestbuys)


    Hello
    I have noticed since installing the Hummingbird plugin that Google is not reading the product availability correctly in my structured data. (I changed OutOfStock schema to InStoreOnly which showed on Google before the Hummingbird install).

    Does Hummingbird caching impact the “class-wc-structured-data.php” file?

    If yes, is there a way to prevent this file being cached?

    Thank you

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    Hello @jamesbestbuys

    I hope you’re doing well!

    Please let us know more information, what plugin you’re using to add the structured data? Is the class-wc-structured-data.php file belong to that plugin?

    The Hummingbird does not cache PHP files, but it caches the front end pages. If changes are added to your site’s structured data, please clear cache so the data will be refreshed on a front end page.

    Please advise,

    Kind regards,
    Nastia

    Thread Starter James

    (@jamesbestbuys)

    Thank you for your reply Nastia

    Thanks for letting me know that php files are not cached.

    I believe the class-wc-structured-data.php file is created by WooCommerce and/or Yoast SEO plugin.

    I am not an expert, but I am guessing that SEO issues are not a Hummingbird issue, but I will give a bit more detail just in case you have any suggestion…
    When I get / view the php file in Dreamweaver, the stock availability schema is correct (InStoreOnly), but when I run it through Google’s Structured Data Testing Tool, it shows my product schema as OutOfStock.

    I will try to narrow down the cause of this and will also be in contact with Yoast to see if they have any suggestions.

    Again, if you have any suggestions or can help point me in the right direction, it would be very much appreciated.

    Kind Regards
    James

    Plugin Support Dimitris – WPMU DEV Support

    (@wpmudev-support6)

    Hello there @jamesbestbuys

    Hope you’re doing well today! ??

    The aforementioned file is coming from WooCommerce:
    https://github.com/woocommerce/woocommerce/blob/master/includes/class-wc-structured-data.php

    When I get / view the php file in Dreamweaver, the stock availability schema is correct (InStoreOnly), but when I run it through Google’s Structured Data Testing Tool, it shows my product schema as OutOfStock.

    This sounds more like a caching issue indeed. Are you still getting this after clearing Page Caching in Hummingbird?
    If so, you may have to clear any other caching affecting this website, most probably some kind of server-side caching.

    Warm regards,
    Dimitris

    Thread Starter James

    (@jamesbestbuys)

    Hello Dimitris

    Yes, this still occurs even after clearing cache in Page Caching on Hummingbird.

    I have some URL Strings which I am excluding from the page cache (see below)…
    wp-.*\.php
    index\.php
    xmlrpc\.php
    sitemap.xml
    sitemap_index.xml
    woo-product-feed-pro
    cookie-notice

    Is the first one ( wp-.*\.php ) preventing the structured data php from caching?

    I think the first several url strings were already on the Page Caching settings when I first installed Hummingbird, but this used to work fine several months ago. ??

    If this is not the problem area, I can try speaking to my server provider about the server-side caching as you suggested.

    Kind Regards
    James

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @jamesbestbuys ,

    Did you hear back from your hosting provider about server caching?

    Is the first one ( wp-.*\.php ) preventing the structured data php from caching?

    This is one of the Hummingbird defaults that prevents caching of the WordPress files.
    But Hummingbird doesn’t cache php files – it caches what is on the front end of the site.
    Would it be possible if we could see how it looks on your site? Can you provide us URL to page where data is cached and it should not be?

    kind regards,
    Kasia

    Thread Starter James

    (@jamesbestbuys)

    Hello Kasia

    Thank you for your teams help so far with this.

    I spoke to my provider and they said that my site utilises PHP’s opcache, so changes made to any PHP files can take an hour or two to propagate. However, I believe this was also the case when my sites search results were showing correctly on Google, so I don’t think this is the issue.

    Here is a URL to one of the product which should be appearing as “InStoreOnly” but instead appears as “OutOfStock” on Google search results and the Structured Data Testing Tool:
    https://www.best-buys.co.uk/product/signature-weave-tilly-sofa-lounge-set-grey/

    Here is also the snippet from my class-wc-structured-data.php file showing the “availability” schema I have set up…

    $markup_offer += array(
    ‘priceCurrency’ => $currency,
    ‘availability’ => ‘https://schema.org/’ . ( $product->is_in_stock() ? ‘InStock’ : ‘InStoreOnly’ ),
    ‘url’ => $permalink,
    ‘seller’ => array(
    ‘@type’ => ‘Organization’,
    ‘name’ => $shop_name,
    ‘url’ => $shop_url,
    ),

    Kind Regards
    James

    • This reply was modified 5 years, 7 months ago by James.
    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @jamesbestbuys ,

    I’m sorry for the delay.

    I can see in the code that it shows “OutOfStock” but cache is from 18-08-19 – so it should be updated.
    Can you disable temporary Hummingbird cache (like turn off totally) and check if the problem will be gone?

    kind regards,
    Kasia

    Thread Starter James

    (@jamesbestbuys)

    Hello Kasia

    Thank you for your reply.
    We have managed to figure out that the structured data caching issue was being caused by another plugin we use for Google shopping, which was overriding the php file.

    Thank you and the rest of the WPMU DEV Support team for helping to narrow this issue down. Hummingbird is not the cause of this issue, so this can now be marked as resolved if you wish.

    Kind Regards
    James

    Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    Hello @jamesbestbuys

    Glad to know that this issue is resolved!

    I’ve marked this ticket as resolved for now, but if you need anything else at all, we’re here for you, please just reopen the ticket or create a new one.

    Have a good day and take care!

    Cheers,
    Nastia

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Structured Data Caching?’ is closed to new replies.