Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/lordsyncrus/gla-unit-pricing/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
GLA Unit Pricing
Plugin for WordPress/WooCommerce that automatically adds unitpricingmeasure and unitpricingbasemeasure to Google Listings & Ads (now Google for WooCommerce), reading a product attribute.
It complements the official Google Listings & Ads for WooCommerce plugin.
Table of Contents
- 🇬🇧 English
- 🇮🇹 Italiano
Features
- Reads formats like 250ml, 1 L, 5kg, 12ct from the product attribute.
- Converts them to [unitpricingmeasure] + [unitpricingbasemeasure] for Google Merchant Center.
- Choose the product attribute (including custom) in WooCommerce settings.
- Configurable base unit and base value (or auto-detect).
- Works for variations (fallback to parent product).
Requirements
- WordPress
- WooCommerce
- Google Listings & Ads plugin active (Google Listings & Ads for WooCommerce)
Installation (Plugin)
1. Create a folder gla-unit-pricing in wp-content/plugins/.
2. Copy gla-unit-pricing.php into wp-content/plugins/gla-unit-pricing/.
3. Activate GLA Unit Pricing in Plugins.
Configuration
Go to WooCommerce Settings Products GLA Unit Pricing.
Available settings:
- Product attribute: choose the product attribute (e.g. paformat).
- Custom attribute name: if using custo