Google Merchant Center – missing shipping_weight

#915986
  • Resolved Angela
    Rank Math free

    Hi my products are not getting approved in Google Merchant Center because it is not receiving a value for shipping_weight. How do I get Rank Math to submit shipping_weight instead of weight or _weight in the structured product data?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting Rank Math support.

    Can you please share the affected URL with us so we can help take a look?

    Thank you!

    Angela
    Rank Math free

    It was more of a generic question. GMC expects shipping_weight field. How do you get RankMath to submit the schema using this field name?

    Hello,

    We assume that you have already added the data in your product details like in this screenshot

    weight

    However, if you still need to shipping_weight property, you can use and customize this filter:

    add_filter( "rank_math/snippet/rich_snippet_product_entity", function( $entity ) {
    	global $product;
    	if (is_product()) {
    		$entity["shipping_weight"] = $product->get_weight()." kg";
    		return $entity;
    	}
     return $entity;
    });

    If you’re not sure how to add this code, you can follow this guide:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps.

    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 3 replies - 1 through 3 (of 3 total)

The ticket ‘Google Merchant Center – missing shipping_weight’ is closed to new replies.