The following snippet will let you remove all shipping dimensions from the WooCommerce Google Product feed.
1 2 3 4 5 6 7 | function gpf_remove_shipping_attrs($elements, $product_id) { unset($elements['shipping_width']); unset($elements['shipping_length']); unset($elements['shipping_height']); return $elements; } add_filter( 'woocommerce_gpf_elements_google', 'gpf_remove_shipping_attrs', 11, 2 ); |
Simply drop it into your theme’s functions.php file if you’re using a child theme, or add it to a Functionality plugin.