Missing field “deliveryTime” (optional)

#682352
  • Resolved Anonymous
    Rank Math free

    I have added below code to code snippets plugin but I still get this error:Missing field “deliveryTime” (optional)
    Can you help me solve this issue?

    add_filter( “rank_math/snippet/rich_snippet_product_entity”, function( $entity ) {
    // Shipping details
    $entity[‘offers’][‘shippingDetails’][‘@type’] = ‘OfferShippingDetails’;
    $entity[‘offers’][‘shippingDetails’][‘shippingRate’][‘@type’] = ‘MonetaryAmount’;
    $entity[‘offers’][‘shippingDetails’][‘shippingRate’][‘value’] = 5;
    $entity[‘offers’][‘shippingDetails’][‘shippingRate’][‘currency’] = ‘USD’;
    $entity[‘offers’][‘shippingDetails’][‘shippingDestination’][‘@type’] = ‘DefinedRegion’;
    $entity[‘offers’][‘shippingDetails’][‘shippingDestination’][‘addressCountry’] = ‘US’;

    return $entity;
    });

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    The example you gave is a property that is currently not in the filter, so you would need to include in the following code:

    $entity['offers']['shippingDetails']['deliveryTime']= 'Your delivery time goes here';
    

    You may also need to make sure that the Schema is all with the correct values so you might need to change those further to your specific needs.

    Hope that helps.

    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.

Viewing 1 replies (of 1 total)

The ticket ‘Missing field “deliveryTime” (optional)’ is closed to new replies.