Reputation: 21
I'm trying to add the shipping weight via functions.php in woocommerce to the Schema using add_filter('woocommerce_structured_data_product').
I currently have
if ( $product_weight ) {
$markup['additionalProperty'][] = [
"@type" => "PropertyValue",
"name" => "ShippingWeight",
"value" => $product_weight . " " . strtoupper( $weight_unit )
];
}
But Google Merchant Center still says that product weight/shipping weight is missing. Has anyone had any success adding schema through their website and getting GMC to accept their products?
Upvotes: 1
Views: 63