Skip to main content

Google Listings & Ads

Overview​

Google Listings & Ads connects the store to a Google Merchant Center account over OAuth and pushes products to it through the Content API. Each product gets a mapping row recording its Google offer id, its listing status as Google reports it — pending, approved, disapproved or expiring — and any validation issues Google raised.

Syncing is incremental by design: each mapping carries a sync hash, so a run only sends what has actually changed rather than the whole catalogue.

Every sync writes a log with what was processed, what failed and why, and the module carries diagnostics with a repair action for putting its own state right.

It is for stores advertising their catalogue through Google.

Availability​

ItemValue
Module keygoogle_listings_ads
TierPremium
Entitlement keygoogle_listings_ads
Admin tabgoogle-listings-ads
Enabled optionaiowc_module_enabled_google_listings_ads (off until turned on)
REST namespaceaiowc/v1

registerHooks() registers only the REST routes and the jobs. This module hooks nothing in WooCommerce — it does not filter prices, alter the cart or render anything on the storefront. It reads products and talks to Google.

Settings​

Feed settings and sync settings are separate, each with its own routes.

Feed settingDefaultMeaning
target_countryUSThe country the feed targets.
content_languageenThe feed's language.
channelonlineonline or local.
include_variationstrueWhether variations are sent as separate offers.
include_out_of_stockfalseWhether out-of-stock products are sent. Off by default.
shipping_settings, tax_settings, category_mappings–Feed configuration, stored as structured values.

Connecting​

The module implements a full OAuth flow against Google:

  • POST /google-listings-ads/connect starts it.
  • GET /google-listings-ads/oauth/callback receives Google's redirect. It is a public, rate-limited route because Google calls it in the customer's browser rather than as an authenticated request.
  • POST /google-listings-ads/disconnect revokes the tokens.

It requests the content and userinfo.email scopes, and revokes through Google's revocation endpoint on disconnect rather than merely forgetting the token locally.

🔴 Tokens are stored encrypted. The module keeps them in a dedicated repository that encrypts before writing and decrypts on read, rather than as a plain setting. That is a meaningfully better position than the sibling Google Shopping Feed module — see that page's limits.

Syncing​

A sync is full, incremental or single, and each run writes a log row with counts of items processed and failed, start and completion times, an error message and details.

Mappings carry Google's own view back: listing_status reflects what Merchant Center says about the offer, and validation_issues holds what it objected to — so a product disapproved by Google is visible in WordPress without logging into Merchant Center.

Admin screen​

The Google Listings & Ads tab manages the connection, shows the merchant account and an overview, edits feed and sync settings, previews and downloads the generated feed, runs a sync now, shows sync status and logs, lists the product mappings, and runs diagnostics with a repair action.

REST API endpoints​

All routes are on aiowc/v1 and answer with the { success, data, message } envelope. All require manage_woocommerce except the OAuth callback.

MethodPathPurpose
POST/google-listings-ads/connectBegin the OAuth flow.
GET/google-listings-ads/oauth/callbackReceive Google's redirect. Public, rate-limited.
POST/google-listings-ads/disconnectRevoke and forget the tokens.
GET/google-listings-ads/connectionWhether the store is connected.
GET/google-listings-ads/merchantThe connected Merchant Center account.
GET/google-listings-ads/overviewSummary of listings and sync state.
GET / POST/google-listings-ads/feed/settingsRead and write the feed settings.
GET/google-listings-ads/feed/previewPreview the generated feed.
GET/google-listings-ads/feed/downloadDownload it.
GET / POST/google-listings-ads/sync/settingsRead and write the sync settings.
POST/google-listings-ads/sync/nowRun a sync immediately.
GET/google-listings-ads/sync/statusWhether a sync is running.
GET/google-listings-ads/sync/logsPast sync runs.
GET/google-listings-ads/sync/logs/{id}One run in detail.
GET/google-listings-ads/mappingsProduct-to-Google mappings and their status.
GET/google-listings-ads/diagnosticsDetected problems.
POST/google-listings-ads/diagnostics/repairRepair them.

WooCommerce integration​

None. The module registers no WooCommerce hooks at all — it reads products through WooCommerce's own APIs when a sync runs, and otherwise stays out of the request.

Database schema​

TableHolds
{prefix}aiowc_google_feed_settingsThe feed configuration: target country, language, channel, inclusion flags, shipping, tax and category mappings.
{prefix}aiowc_google_product_mappingsOne row per product: the Google product and offer ids, listing status, last sync time, a sync hash and any validation issues.
{prefix}aiowc_google_sync_logsEach run: type, status, items processed and failed, timings, error message and details.

OAuth tokens are not in these tables — they are in their own encrypted option.

Background jobs​

HookIntervalWork
aiowc_google_product_syncconfigurable, hourly+Pushes changed products to Merchant Center.
aiowc_google_sync_cleanupdailyPrunes old sync logs.

The sync interval is a setting rather than a constant, so a large catalogue can sync less often.

Action hooks for integrators​

HookFired when
aiowc_google_feed_settings_created / _updatedFeed settings change.
aiowc_google_mapping_created / _updated / _deletedA product mapping changes.
aiowc_google_sync_log_created / _updatedA sync run starts or finishes.
aiowc_track_eventThe module is enabled or disabled.

Entitlement limits​

google_listings_ads is an on/off grant with no cap on products, mappings or sync runs. Google's own Merchant Center quotas apply on their side.

Health check​

The diagnostics route reports the module's own state — connection, tokens, mappings — and the repair action fixes what it can.

Known gaps​

  • Connecting requires a Google account with Merchant Center access and an OAuth client. None ships with the plugin, so the module does nothing until a store completes that setup on Google's side.
  • A second, overlapping module also pushes products to Google — Google Shopping Feed. The two keep separate tables, separate settings and separate sync jobs, and nothing detects that both are active. A store should pick one; this one is the better-secured implementation.
  • Nothing is hooked in WooCommerce, so a product edited in the admin is not pushed until the next scheduled sync. The sync hash means the change is detected, but not immediately.
  • Google's listing status is only as current as the last sync, so a disapproval raised by Google between runs is not visible until the next one.