Ich versuche, das Versandgewicht über „functions.php“ in woocommerce für Google Merchant Center zum Schema hinzuzufügen
Posted: 06 Jan 2025, 19:44
Ich versuche, das Versandgewicht über „functions.php“ in woocommerce mit add_filter('woocommerce_structured_data_product') zum Schema hinzuzufügen.
Ich habe derzeit
Das Google Merchant Center meldet jedoch immer noch, dass das Produktgewicht/Versandgewicht fehlt. Hat es irgendjemandem gelungen, ein Schema über seine Website hinzuzufügen und GMC dazu zu bringen, seine Produkte zu akzeptieren?
Ich habe derzeit
Code: Select all
if ( $product_weight ) {
$markup['additionalProperty'][] = [
"@type" => "PropertyValue",
"name" => "ShippingWeight",
"value" => $product_weight . " " . strtoupper( $weight_unit )
];
}