Skip to main content
WooCommerce guide

Open Graph for WooCommerce Stores

By ยท Updated ยท 7 min read

How Open Graph Works Inside WooCommerce

WooCommerce runs on WordPress, which means Open Graph meta tags are not generated by WooCommerce itself โ€” they depend entirely on a separate SEO or social plugin. Out of the box, a WooCommerce store shares pages to Facebook, LinkedIn, or Slack with no og:title, og:description, or og:image tags unless a plugin adds them. That missing layer causes product cards to render as bare URLs or pull random images from the page DOM.

The distinction matters for store operators: WooCommerce product pages are custom post types (product), not standard WordPress posts. Many generic Open Graph plugins default to post and page post types only, leaving product post type completely untagged. Before assuming your store is covered, verify the plugin explicitly supports the WooCommerce product post type.

The Main Plugin Options for WooCommerce Open Graph

Yoast SEO is the most widely deployed solution. Its free tier generates og:title, og:description, and og:image for WooCommerce products, pulling from the product's featured image by default. Yoast Premium adds the ability to set a separate social title and social description per product, distinct from the SEO title and meta description โ€” useful when product names are long or keyword-heavy.

Rank Math is a direct alternative with similar coverage. Its WooCommerce module maps product-specific fields โ€” including sale price and product category โ€” into Open Graph output. Rank Math also generates og:price:amount and og:price:currency from WooCommerce product data, which Facebook uses when rendering dynamic product ads. All In One SEO (AIOSEO) covers the same territory and is favored by stores already using it for XML sitemaps.

For stores that want granular control without a heavyweight SEO plugin, the dedicated plugin WP Social SEO Booster or a custom functions.php snippet using the wpseo_opengraph action hook gives direct access to tag output. Custom code routes are viable but require maintenance whenever WooCommerce updates its product data structures.

WooCommerce-Specific Conventions That Affect Open Graph Output

WooCommerce product images live in its own gallery structure, not just in the standard WordPress featured image field. Most Open Graph plugins read only the featured image (thumbnail) for og:image. If a product's featured image is absent but gallery images exist, many plugins output no og:image tag at all โ€” resulting in a blank image card on social platforms. The fix: always set a featured image on every product, not just a gallery.

Variable products introduce a second complication. A configurable product โ€” a t-shirt in five colors โ€” has one canonical URL but multiple variation images. Open Graph tags are written at page load, before a shopper selects a variant. The og:image therefore always reflects the parent product's featured image, never the selected variant image. This is a structural limitation of static HTML meta tags, not a plugin bug. Stores running variant-heavy catalogs should choose a representative hero image for the parent product specifically for social sharing.

Product category and tag archive pages in WooCommerce are also shareable URLs. Unless the SEO plugin is configured to tag taxonomy archives, category pages share with no og:image. Yoast and Rank Math both support custom Open Graph settings on taxonomy archive pages โ€” this configuration step is frequently skipped during store setup.

Facebook Commerce and og:type Product Tags

Facebook's Open Graph specification includes a product object type (og:type = product) with structured properties: og:price:amount, og:price:currency, og:availability, and og:brand. WooCommerce product data maps naturally to these fields, but standard SEO plugins do not output them by default. Rank Math's WooCommerce module is one of the few to populate og:price:amount and og:price:currency automatically from WooCommerce's product price fields.

For stores running Facebook dynamic product ads through a catalog feed, these structured tags become important for consistent data between the catalog and the product page. Discrepancies between the feed price and the og:price on the product page can trigger Facebook's policy review flags. If dynamic ads are part of the paid media strategy, audit product Open Graph output with Facebook's Sharing Debugger to confirm price and availability tags match the live product data.

Common WooCommerce Open Graph Failures and Their Fixes

Cached og:image is the most reported issue in WooCommerce stores. Facebook and other platforms cache Open Graph data aggressively. After a product image is updated, the old image continues to appear in shares until the cache is cleared via Facebook's Sharing Debugger (formerly Open Graph Debugger). This is a platform-level cache behavior, not a WooCommerce or plugin problem. Re-scraping through the Sharing Debugger resolves it immediately for Facebook; Pinterest and LinkedIn have equivalent tools.

Theme conflicts cause a second class of failures. Some WooCommerce themes โ€” particularly those with built-in social sharing features โ€” output their own Open Graph tags in the theme's header.php. When a SEO plugin also outputs tags, the result is duplicate og:title or og:image tags. Crawlers and social scrapers use the first tag found, which may be the theme's poorly formatted version. The fix is to disable the theme's built-in social meta output, usually via a theme settings panel or by removing a hooked function in the child theme.

Checkout and cart pages in WooCommerce should not carry product-specific Open Graph tags. These dynamic pages change per session and have no fixed shareable content. Both Yoast and Rank Math default to omitting Open Graph tags on cart and checkout โ€” verify this is the case and that no custom code is overriding it.

Actionable Setup Checklist for WooCommerce Store Operators

Install Yoast SEO or Rank Math and confirm both the product post type and product category taxonomy are included in Open Graph tag generation. Set og:image dimensions to at least 1200ร—630 pixels for all product featured images โ€” this is the recommended size for Facebook link previews. For every product, set the featured image explicitly; do not rely on gallery images alone.

Run a representative sample of product URLs through Facebook's Sharing Debugger and Pinterest's Rich Pins Validator. Confirm og:title, og:description, og:image, og:url, and og:type are present and accurate. For stores running paid social, additionally confirm og:price:amount and og:price:currency are output by the plugin. Disable any duplicate Open Graph output from the active WooCommerce theme. Schedule a quarterly audit: product catalog updates, theme changes, and plugin updates all create opportunities for tag breakage.

Frequently asked questions

Does WooCommerce generate Open Graph tags by default?

No. WooCommerce itself does not output any Open Graph meta tags. Open Graph coverage requires a plugin โ€” typically Yoast SEO, Rank Math, or AIOSEO. Without one, product pages share to social platforms as bare URLs with no title, description, or image card.

Why is my WooCommerce product image not showing when shared on Facebook?

The three most common causes: the product has no featured image set (only gallery images), the Open Graph plugin does not cover the product post type, or Facebook is serving a cached version of an outdated image. Use Facebook's Sharing Debugger to force a re-scrape and confirm the og:image tag is present and pointing to a correctly sized image.

Which plugin outputs og:price for WooCommerce products?

Rank Math's WooCommerce module outputs og:price:amount and og:price:currency directly from WooCommerce product price fields. Standard Yoast SEO does not output price tags by default. If Facebook dynamic product ads are part of your strategy, Rank Math or a custom implementation is the practical choice for price-structured Open Graph output.

Can Open Graph tags reflect the selected variant image on a variable product page?

No. Open Graph tags are written in the HTML head at page load, before any user interaction. For a variable product, og:image always reflects the parent product's featured image regardless of which variant a shopper selects. This is a fundamental constraint of how static meta tags work, not a plugin limitation.

What image size should WooCommerce product featured images be for Open Graph?

Facebook requires a minimum of 200ร—200 pixels and recommends 1200ร—630 pixels for link previews to render at full size. Images below 600ร—315 pixels render in a small format. Set WooCommerce product featured images to at least 1200ร—630 pixels and confirm the SEO plugin outputs that image โ€” not a cropped thumbnail โ€” in the og:image tag.

MG
Written by

Matt is the founder of RunOctopus. He built All Angles Creatures from zero to page-1 rankings in reptile feeder insects in under 60 days using exactly this method โ€” turning a hard, entrenched niche into RunOctopus's proof store for programmatic SEO and AI search citation.

Connect on LinkedIn →

See what Otto would build for your store

Free architecture preview. No card required. Five minutes.

Generate Preview →