Download the PHP package x-wp/wc-data-attribute-tax without Composer
On this page you can find all versions of the php package x-wp/wc-data-attribute-tax. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download x-wp/wc-data-attribute-tax
More information about x-wp/wc-data-attribute-tax
Files in x-wp/wc-data-attribute-tax
Package wc-data-attribute-tax
Short Description WooCommerce attribute taxonomy data objects
License MIT
Informations about the package wc-data-attribute-tax
WC Data Attribute Tax
WooCommerce attribute taxonomy data objects
[](https://packagist.org/packages/x-wp/wc-data-attribute-tax)



[](https://github.com/x-wp/wc-data-attribute-tax/actions/workflows/tests.yml)
[](https://codecov.io/gh/x-wp/wc-data-type-attribute-tax)
This package provides XWC_Attribute_Tax data objects for working with WooCommerce product attribute taxonomies. Built on the x-wp/wc-data-type framework, it wraps WooCommerce's wc_*_attribute() functions in a model-driven CRUD workflow with typed properties, a dedicated factory, and convenience helpers.
Installation
[!TIP] We recommend using
automattic/jetpack-autoloaderwith this package to reduce autoloading conflicts in WordPress environments.
Usage
Loading an attribute
Working with attribute properties
Converting to WC_Product_Attribute
Utility functions
Testing
The package ships with a PHPUnit suite that boots a WordPress + WooCommerce test environment.
Local prerequisites:
- Docker with
docker compose - PHP
- WP-CLI (
wp) - MySQL client tools (
mysqlandmysqladmin) curlunzip
Run the suite with:
To prepare the local WordPress test environment first:
composer test:install starts the MySQL service, downloads WordPress, installs WooCommerce, and prepares the WordPress test suite under .cache/wp-tests.
To fully reset the local test environment:
That command stops the test containers and removes the cached WordPress test files.
Documentation
Core classes:
XWC_Attribute_Tax— attribute taxonomy entityXWC_Attribute_Tax_Factory— string-aware factory for resolving attributes by name or labelXWC_Attribute_Tax_Data_Store— data persistence layer using WooCommerce attribute functions
For framework-level documentation, see x-wp/wc-data-type.