itsmeit.bizitsmeit.biz
  • Home
  • Windows
    • Windows Software
  • Ubuntu & Linux
    Ubuntu & Linux
    The top blog articles on Ubuntu and Linux, featuring valuable tips and tricks, empower you to master these operating systems and enhance your experience.
    Show More
    Top News
    How to Remove Ubuntu Dual boot Windows 11 UEFI and Legacy
    How to Remove Ubuntu Dual boot Windows 11 UEFI and Legacy
    November 10, 2023
    How to install php7.4 on Ubuntu & Config php7.4-fpm - itsmeit.biz
    How to install php7.4 on Ubuntu 22.04 | 20.04 LTS
    November 10, 2023
    Install Ubuntu dual boot Windows 11 | 10 UEFI And Legacy
    Install Ubuntu dual boot Windows 11 | 10 UEFI & Legacy
    November 10, 2023
    Latest News
    How to install Composer on Ubuntu 20.04 | 22.04 & Linux
    November 13, 2023
    How to Configure Redis Cache to Speed ​​Up WordPress Site
    November 15, 2023
    Install Ibus-bamboo or Ibus-unikey for Accented Letters on Ubuntu 22.04
    November 11, 2023
    How to install MariaDB on Ubuntu 22.04, 20.04 and Debian
    November 11, 2023
  • Web developer
    • Wordpress Theme
      • Blog News
      • Fashion Theme
      • Theme Elementor
      • WooCommerce Theme
    • Wordpress Plugin
    • Magento Developer
Reading: Fix missing field shippingDetails & hasMerchantReturnPolicy
Share
Font ResizerAa
itsmeit.bizitsmeit.biz
Font ResizerAa
  • Linux & Ubuntu
  • Windows
    • Tips & Trick
    • Windows Software
  • Web developer
    • Magento Developer
    • Wordpress Plugin
    • WP Blog Theme
    • WP Fashion Theme
    • WooCommerce Theme
  • Log Out
Have an existing account? Sign In
Follow US
Copyright © 2022. All Rights Reserved.
Web developer

Fix missing field shippingDetails & hasMerchantReturnPolicy

duyanh
Last updated: November 15, 2023
By duyanh Published November 12, 2023
Share
SHARE

Table of contents

  1. How to fix missing field shippingDetails, deliveryTime and hasMerchantReturnPolicy Wordpress
    1. Warning error information (Rich snippet product)
    2. How to fix errors with Rankmath SEO
    3. How to fix warning errors with Yoast SEO

In April 2023, Google announced an update regarding the “shippingDetails” and “hasMerchantReturnPolicy” fields on the Google Search Console, focusing on shipping information and return policy.

If you are receiving warning errors like ‘Missing field “hasMerchantReturnPolicy” (in “offers”)’ or ‘Missing field shippingDetails (under “offers”)’, then this article from ItsmeIT will guide you on how to fix shippingDetails and deliveryTime errors, as well as hasMerchantReturnPolicy for sites using WordPress.

How to fix missing field shippingDetails, deliveryTime and hasMerchantReturnPolicy Wordpress

Warning error information (Rich snippet product)

how to fix shippingdetails hasmerchantreturnpolicy 3

The warning regarding the “shippingDetails” field applies to sellers in the US region. If you are verified as a seller in the US region or do not sell in the US, you can ignore this warning. ( Reference ).

How to fix errors with Rankmath SEO

If you are using the Rankmath SEO plugin, you can add the following code to your functions.php file in order to fix missing field shippingDetails or “hasMerchantReturnPolicy” are missing under “offers”.

add_filter( "rank_math/snippet/rich_snippet_product_entity", function( $entity ) {
    // Return policy
    $entity['offers']['hasMerchantReturnPolicy']['@type'] = 'MerchantReturnPolicy';
    $entity['offers']['hasMerchantReturnPolicy']['applicableCountry'] = 'VN';
    $entity['offers']['hasMerchantReturnPolicy']['returnPolicyCategory'] = 'https://schema.org/MerchantReturnFiniteReturnWindow';
    $entity['offers']['hasMerchantReturnPolicy']['merchantReturnDays'] = 30;
    $entity['offers']['hasMerchantReturnPolicy']['returnMethod'] = 'https://schema.org/ReturnByMail';
    $entity['offers']['hasMerchantReturnPolicy']['returnFees'] = 'https://schema.org/FreeReturn';

    // Shipping details
    $entity['offers']['shippingDetails']['@type'] = 'OfferShippingDetails';
    $entity['offers']['shippingDetails']['shippingRate']['@type'] = 'MonetaryAmount';
    $entity['offers']['shippingDetails']['shippingRate']['value'] = 5;
    $entity['offers']['shippingDetails']['shippingRate']['currency'] = 'VND'; //You currency
    $entity['offers']['shippingDetails']['shippingDestination']['@type'] = 'DefinedRegion';
    $entity['offers']['shippingDetails']['shippingDestination']['addressCountry'] = 'VN';

    //deliveryTime
    $entity['offers']['shippingDetails']['deliveryTime']['@type'] = 'ShippingDeliveryTime';
    $entity['offers']['shippingDetails']['deliveryTime']['handlingTime']['@type'] = 'QuantitativeValue';
    $entity['offers']['shippingDetails']['deliveryTime']['handlingTime']['minValue'] = '0';
    $entity['offers']['shippingDetails']['deliveryTime']['handlingTime']['maxValue'] = '1';
    $entity['offers']['shippingDetails']['deliveryTime']['handlingTime']['unitCode'] = 'DAY';

    $entity['offers']['shippingDetails']['deliveryTime']['transitTime']['@type'] = 'QuantitativeValue';
    $entity['offers']['shippingDetails']['deliveryTime']['transitTime']['minValue'] = '0';
    $entity['offers']['shippingDetails']['deliveryTime']['transitTime']['maxValue'] = '5';
    $entity['offers']['shippingDetails']['deliveryTime']['transitTime']['unitCode'] = 'DAY';

    return $entity;
});

How to fix warning errors with Yoast SEO

Similar to Rankmath, if you are using the Yoast SEO plugin, you can add the following code to your functions.php file to fix the warning errors that the fields “hasMerchantReturnPolicy” or “shippingDetails” are missing under “offers”.

add_filter('wpseo_schema_product', function ($entity) {
            // Return policy
            $entity['offers']['hasMerchantReturnPolicy']['@type'] = 'MerchantReturnPolicy';
            $entity['offers']['hasMerchantReturnPolicy']['applicableCountry'] = 'VN';
            $entity['offers']['hasMerchantReturnPolicy']['returnPolicyCategory'] = 'https://schema.org/MerchantReturnFiniteReturnWindow';
            $entity['offers']['hasMerchantReturnPolicy']['merchantReturnDays'] = 30;
            $entity['offers']['hasMerchantReturnPolicy']['returnMethod'] = 'https://schema.org/ReturnByMail';
            $entity['offers']['hasMerchantReturnPolicy']['returnFees'] = 'https://schema.org/FreeReturn';

            // Shipping details
            $entity['offers']['shippingDetails']['@type'] = 'OfferShippingDetails';
            $entity['offers']['shippingDetails']['shippingRate']['@type'] = 'MonetaryAmount';
            $entity['offers']['shippingDetails']['shippingRate']['value'] = 5;
            $entity['offers']['shippingDetails']['shippingRate']['currency'] = 'VND'; //You currency
            $entity['offers']['shippingDetails']['shippingDestination']['@type'] = 'DefinedRegion';
            $entity['offers']['shippingDetails']['shippingDestination']['addressCountry'] = 'VN';

            //deliveryTime
            $entity['offers']['shippingDetails']['deliveryTime']['@type'] = 'ShippingDeliveryTime';
            $entity['offers']['shippingDetails']['deliveryTime']['handlingTime']['@type'] = 'QuantitativeValue';
            $entity['offers']['shippingDetails']['deliveryTime']['handlingTime']['minValue'] = '0';
            $entity['offers']['shippingDetails']['deliveryTime']['handlingTime']['maxValue'] = '1';
            $entity['offers']['shippingDetails']['deliveryTime']['handlingTime']['unitCode'] = 'DAY';

            $entity['offers']['shippingDetails']['deliveryTime']['transitTime']['@type'] = 'QuantitativeValue';
            $entity['offers']['shippingDetails']['deliveryTime']['transitTime']['minValue'] = '0';
            $entity['offers']['shippingDetails']['deliveryTime']['transitTime']['maxValue'] = '5';
            $entity['offers']['shippingDetails']['deliveryTime']['transitTime']['unitCode'] = 'DAY';

            return $entity;
        });

Note: Please replace the country code ‘VN’ and the currency ‘VND’ with the appropriate codes for your website. After making the changes, you can check ‘Testing live URL’ on Google Search Console to verify if the issues have been fixed.

How to fix missing field shippingDetails, deliveryTime and hasMerchantReturnPolicy

shippingDetails and hasMerchantReturnPolicy are two e-commerce related options in WooCommerce. If you receive a warning about this error, you can ignore it if the site doesn’t sell and doesn’t have shipping in the US. If you want to disable and fix the warning error, please refer to the instructions above.

– Advertising –

Share this Article
Facebook Twitter Pinterest LinkedIn Reddit Telegram
Leave a comment Leave a comment
Subscribe
Connect with
Login
Notify of
guest
Connect with
guest
0 Comments
Inline Feedbacks
View all comments
Previous Article Download Slider Revolution Responsive WordPress Plugin v6.6.18 Full Addons + Templates Slider Revolution Responsive WordPress Plugin v6.6.18 Full Addons + Templates
Next Article How to Configure Redis Cache to Speed ​​Up WordPress Site How to Configure Redis Cache to Speed ​​Up WordPress Site

You Might Also Like

Prevent Spam Register Plugin – Block WordPress Spam Accounts

How to Disable and Secure WP JSON API in WordPress

How to install Magento 2.4 on Ubuntu 22.04 with Composer

How to fix errors & change all WordPress links to a new domain

Newsprk v6.1.0 – WordPress theme Magazine and Blogs

Stay Connected

Facebook Like
Twitter Follow
Pinterest Pin
Telegram Follow

Popular Posts

Download IDM FULL Crack v6.42.2 + Repack (Fix fake serial)
Download IDM FULL Crack v6.42.2 + Repack (Fix fake serial)
December 8, 2023 673 Views
Download WPBakery v7.2 Drag and Drop WordPress Page Builder Plugins
WPBakery v7.2 Drag and Drop WordPress Page Builder Plugins
December 4, 2023 23 Views
Download Plugin Product Video Gallery for Woocommerce v1.5.0
Plugin Product Video Gallery for Woocommerce v1.5.0
November 17, 2023 10 Views
Download Prevent Spam Register Plugin - Block WordPress Spam Accounts
Prevent Spam Register Plugin – Block WordPress Spam Accounts
November 17, 2023 15 Views
Elementor PRO v3.17.0 Plugin (Full Templates Pack + Demo)
Download Plugin Elementor PRO 3.17.0 (+Full Templates Pack)
November 17, 2023 38 Views
Download Newspaper v12.6.1 - WordPress theme News Magazine
Download Newspaper v12.6.1 – WordPress theme News Magazine
November 17, 2023 18 Views
We provide tips and tricks on Internet technology, computers, servers as well as share experiences for developers and website designers.

DMCA.com Protection Status

Quick Link

  • Linux | Ubuntu
  • Windows & Software
  • Magento Developer
  • Wordpress Plugin
  • Wordpress Theme

General Policy

  • About US
  • Contact US
  • Disclaimer
  • Privacy Policy
  • Terms of Service

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

itsmeit.bizitsmeit.biz
Follow US
Copyright © 2023. All Rights Reserved.
  • WP Blog Theme
  • WP Fashion Theme
  • WooCommerce Theme
  • Wordpress Plugin
Welcome Back!

Sign in to your account

Continue with Google
Continue with TikTok
Continue with GitHub
Register Lost your password?