Use the short product description instead of description
↑ Back to topThe plugin provides options for choosing how to create the description in the feed. The correct option to choose will depend on how you’ve populated your product data. The full list of available options is shown in the screenshot below:
The default option is “Main product description (full preferred) plus variation description“.Â
Creating a bespoke description
↑ Back to topIf you need to completely customise the description used in the feed you can use the snippet below:
Populate the feed with custom values
↑ Back to topYou can add or override any element value with one of your own using the filters in the plugin. Here’s an example of populating the “brand” element from a custom field called supplier_brand_name:
Programatically excluding products
↑ Back to topIf you want to programatically exclude products from the feed based on your own logic, the following snippet shows how to do so.
Change the image size used in the feed
↑ Back to topBy default, the feed uses the “full” image style. If you want to send an alternative image size, you can adapt this snippet to change the image size used to any of the registered image sizes. This example sets it to the “shop_catalog” image size.
Disable additional images from being included
↑ Back to topThe following snippet will cause only the single, main product image to be sent in the feed.
Choose which images are sent
↑ Back to topThe extension automatically includes images in the feed, including:
- Variation image (on variable products)
- The “Product Image” set on the main product
- Any “Product Gallery” images added to the product
- Any other media files attached to the product in WordPress
The extension will automatically select the first image found from the above as the primary image to use in the feed. If you want to choose exactly which images are / aren’t included and which image is used as the primary image, then you can do so on the edit product page under Product Feed Information. By default, the plugin will show thumbnails of all images that have been found for that product, and indicate whether they are currently included, or excluded, and will indicate any primary image selected by marking with a star.
Clicking on “Manage images” allows you to modify these settings. Changes you make will be automatically saved.
Register custom field for pre-population
↑ Back to topThe pre-population options in the extension do not include “hidden” meta, or custom fields by default. If you want to make a custom field available as a pre-population option then you can use the following snippet, simply replace “_my_custom_field” with the field name of your custom field.
Note: Once this snippet is in place, you will need to click on the “Refresh the field list” link on the settings page before it will be available to select as an option to select.
Remove shipping weight from feed
↑ Back to topIf you want to remove the shipping weight from the feed you can do so with the following snippet:
Remove shipping dimensions from feed
↑ Back to topThe following snippet can be used to remove all shipping dimensions (length, width and height) from products in the feed:
Hide attribute labels on variable product titles
↑ Back to topWhen generating feed items for variable products, the extension generates unique titles for each variation by including attribute information in the feed title as per Google’s requirements. For example, a “Widget” available in 2 different colors and sizes might have its four items listed as:
- Widget (Size: Small, Color: Light)
- Widget (Size: Small, Color: Dark)
- Widget (Size: Large, Color: Light)
- Widget (Size: Large, Color: Dark)
If you have many attributes, or complex attribute names on your variable products then this may generate overly long item titles. The extension will allow you to drop the attribute name (“Size” and “Color” in the previous example). This would generate titles like this:
- Widget (Small, Light)
- Widget (Small, Dark)
- Widget (Large, Light)
- Widget (Large, Dark)
To enable this behaviour use the following snippet:
Modifying the title used in the feed
↑ Back to topThe plugin settings (WooCommerce » Settings » Product Feeds) allow you to choose what is used for the title in the feed. You can choose from the standard product title from WooCommerce, or any of the other supported fields.
As with other feed elements, you can also override the calculated title by supplying a title explicitly in the “Product Feed Information” section of the edit product page – you’ll find the title toward the end of the ‘Common fields‘ sub-section.
If you want to modify the title used in the feed programatically, then the following code snippet shows how you can use a filter to do so.
Modifying the ID generated in the feed
↑ Back to topThe extension automatically generates a unique ID for every product in the feed that meets Google’s requirements for IDs. If you need to change this then you can do so with the following snippet, although we do not recommend this.
However:Â Changing the ID is not recommended as the value you choose for it must meet strict requirements including that it should be unique, and non-changing over time. As such values such as the SKU, or MPN aren’t recommended.
Note: Changing the ID format for an existing feed will result in duplicate products being created, with the new version requiring approval and validation before they can be used for product ads.
If you do still wish to change the ID, then the following snippet shows the filter you can use:
Modifying the product URL sent in the feed
↑ Back to topSometimes you may want to customise the product URL sent in the feed for products. You can do this using the filter below, putting whatever logic in place to modify $feed_item->purchase_link to meet your needs.
Questions & Feedback
↑ Back to topHave a question before you buy? Please fill out this pre-sales form.
Already purchased and need some assistance? Open a support ticket via the Help Desk.