Skip to content

Instantly share code, notes, and snippets.

@salcode
Last active November 25, 2015 16:41
Show Gist options
  • Save salcode/2a752a733879ed652b30 to your computer and use it in GitHub Desktop.
Save salcode/2a752a733879ed652b30 to your computer and use it in GitHub Desktop.
Clarification on custom versus global attribute slugs in WooCommerce

This page in the documentation, Using custom attributes in menus and taxonomy archives indicates

Custom attribute slugs are prefixed with ‘pa_’, so an attribute called ‘size’ would be ‘pa_size’

image

However, the behavior I appear to be seeing is global (i.e. taxonomy) based attributes are prefixed with pa_ and custom (i.e. local) attributes are not, which I believe is the opposite of what the documentation says.

For clarification, I'm referring to a custom (i.e. local) attribute as one I add to a specific product using the Custom Product Attribute Add button.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment