1. Go to this page and download the library: Download x-wp/wc-data-attribute-tax library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
x-wp / wc-data-attribute-tax example snippets
// By ID
$attribute = xwc_get_attribute_tax( 5 );
// By name/slug
$attribute = xwc_get_attribute_tax( 'color' );
// By label (creates if it doesn't exist)
$attribute = XWC_Attribute_Tax::from_label( 'Color' );
// Data store access
$data_store = xwc_att_ds();
// Get attribute by ID (with default)
$attribute = xwc_get_attribute_tax( $id, false );
// Get a fresh instance by ID
$attribute = xwc_get_attribute_tax_object( $id );
// Find attribute ID by label
$id = xwc_get_attribute_tax_id_by_label( 'Color' );
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.