Docs
Metafields & Attributes

Metafields & Attributes

Sync Square Custom Attributes to WooCommerce metafields for extended product data.

Square Custom Attributes allow you to store additional product information beyond standard fields. SquareSync can sync these attributes to WooCommerce metafields automatically.

Overview

With metafield syncing enabled:

  • Square Custom Attributes import as WooCommerce metafields
  • Extended product data stays synchronized
  • Map Square attributes to existing WooCommerce metafields
  • No manual data entry required

Enable Metafield Syncing

When importing products, include metafields in your sync:

  1. Go to SquareSync for Woo > Products
  2. Select the products you want to import
  3. Click Import All
  4. Check the Metafields option in import settings
  5. Run the import

Square Custom Attributes will automatically sync to WooCommerce metafields with matching keys.

Metafield Mapping

For more control, map Square attributes to specific WooCommerce metafields:

Step 1: Access Mapping Settings

  1. Go to SWS Pro > Settings > Products
  2. Scroll to the Metafield Mapping section

Step 2: Configure Mappings

  1. Enter the Square attribute key in the left field
  2. Enter the WooCommerce metafield key in the right field
  3. Add additional mappings as needed
  4. Click Save Changes

Example Mappings

Square AttributeWooCommerce Metafield
manufacturer_manufacturer
material_product_material
warranty_warranty_period

WooCommerce Fields (Weight)

Some WooCommerce fields are not metafields at all — weight is a product field of its own, so it cannot be mapped through the table above. Instead, pick the Square custom field that holds it.

Set it up

  1. In Square, create a custom attribute for weight. A Number type is best; text works too.
  2. Go to SWS Pro > Settings > Metafields.
  3. In WooCommerce Fields → Square Custom Fields, choose that attribute next to Weight.
  4. Click Save Field Bindings.

Weight then syncs in both directions on every product sync that includes metafields: the Square value is written to the WooCommerce weight field on import, and the WooCommerce weight is sent back to Square on export.

Units and formats

Square custom fields hold plain text, so whatever a merchant has typed can end up in there. SquareSync reads all of it and converts to your store's weight unit (WooCommerce > Settings > Products):

In SquareRead as (store in kg)
2.52.5 kg — no unit means your store's unit
2,52.5 kg — decimal comma
1.234,5 / 1,234.51234.5 kg — either grouping convention
2.5 kg / 2.5kg2.5 kg
1200 g1.2 kg
3 lb / 3 lbs / 3 pounds1.361 kg
48 oz1.361 kg
≈ 2,5 kg each2.5 kg

Grams, kilograms, milligrams, tonnes, pounds, ounces and stone are all recognised, in long or short form. A value that holds no number at all — about a kilo — is ignored, leaving the WooCommerce weight untouched.

Going the other way, a Number attribute in Square receives the bare figure, and a Text attribute receives the figure with your store's unit (2.5 kg) so it stays unambiguous and reads back the same.

Things worth knowing

  • The binding wins over any metafield mapping row for the same Square attribute, and that attribute's meta key box is disabled while it is bound — one value, one home.
  • A variation only sends a weight it has of its own. A variation left blank in WooCommerce inherits the parent's weight for shipping but sends nothing to Square, so an import cannot silently pin the parent's weight onto it.
  • A product with no weight sends nothing rather than zero.
  • A Square value that is not a number is ignored, leaving the existing WooCommerce weight untouched.

Developers can add other fields — length, width, height — with the squarewoosync_product_field_attributes filter. See the Filters Reference.

Use Cases

Extended Product Information

Store additional specs like dimensions, materials, or manufacturer details that sync between platforms.

Custom Specifications

Technical products can include detailed specifications that display on product pages via custom themes or plugins.

Inventory Tracking Data

Internal tracking codes, supplier references, or warehouse locations can sync as hidden metafields.

Troubleshooting

Metafields not syncing

  • Verify Metafields is checked in import options
  • Confirm the product has Custom Attributes in Square
  • Re-import the affected products

Mapping not applying

  • Check that attribute keys match exactly (case-sensitive)
  • Verify mappings are saved in settings
  • Ensure the WooCommerce metafield key is valid

Missing attribute data

  • Review the product in Square Dashboard
  • Confirm Custom Attributes are properly configured
  • Check that attribute values are not empty