Try this
for($i=0; $i<count($attribute); $i++){
$attribute[$i] = sanitize_title('pa_' .$attribute[$i]);
}
$terms = wp_get_post_terms(
'taxonomy' => $attribute
);
Related Posts:
- How to get WooCommerce Product Category Link by ID?
- Approach for saving a product attribute values with a custom UI in a woocommerce+dokan set up [closed]
- Set download limit and expiry for WooCommerce downloadable products in specific categories
- Remove pagination from WooCommerce product categories on admin edit navigation menus
- Taxonomy , subtaxonomy,child taxonomy of a product woocommerce
- Woocommerce custom taxonomies page
- Outputting an array of term meta values in a custom WooCommerce tab?
- Programatically added attribute, set to ‘show on product page’ automatically. Woocommerce [closed]
- Get child product categories from parent product category in WooCommerce
- Top level parent taxonomy ID
- Woocommerce product search result layout page
- Filter WooCommerce admin products list by a custom taxonomy
- Woocommerce: How to change the add to cart text in a certain category? [closed]
- Catchable fatal error on custom category post
- Get custom category image from menu
- Hide product categories and taxonomy terms in menu if empty
- How to target parent product category and its children using WooCommerce?
- woocommerce custom product category template
- Getting WooCommerce product related child categories
- Hiding taxonomies with no children WP_Query & tax_query
- How to display ACF taxonomy checkbox links on WooCommerce product category archive
- Hide custom Woocommerce taxonomies when empty
- Add attribute taxonomy through code don’t appear in admin product page
- Showing custom taxonomy in woocommerce signle product page
- Adding term to a custom taxonomy based on term from product category
- Warning: Undefined variable $post in C:\xampp\htdocs\… after PHP upgrade
- Admin only taxonomies?
- Fill New Taxonomies
- Infinite Scroll appending Next Product Category Term pages
- How to exclude woocommerece product category in search results?
- Cloning product not copying custom taxonomies
- Check if any available product has specific attribute
- how to show product custom taxonomies in woocommerce rest api
- WordPress search form and search result through ACF field in custom taxonomy
- Get user created Woocommerce attributes ( taxonomies ) [closed]
- Custom order of taxonomy using wp_get_object_terms and woocommerce_term_meta
- How do you search for a post by custom taxonomy?
- Display woocommerce product_cat child terms with thumbnails
- Woocommerce – how to get and display selected variations on single product page
- How do I check if a post has a term with a particular ancestor/parent?
- Creating a custom archive page for WooCommerce products based on tags
- Hide empty categories on widget
- Custom columns on edit-tags.php main page
- Display one post from each term in a custom taxonomy [closed]
- Is it possible to add taxonomies to user profiles?
- Get terms from multiple taxonomies
- get_terms showing link to category even if all posts are drafts
- How to restrict on selecting child taxonomy
- Is it possible to sort the post based on a custom field?
- How do I get terms as a list for a specific post?
- How get custom field from custom taxonomy?
- What are terms and taxonomy, how they related to post and how these three are stored in database?
- Get multiple term objects by ids
- Echo custom taxonomy term name
- Move terms from one taxonomy to another keeping the hierarchy
- How can I get WP to build a feed based on multiple taxonomy terms
- Getting the selected terms for custom taxonomies in the editor
- How to add contents of a custom field to a taxonomy term list?
- Custom taxonomy forms for user profile
- Search Tool only refreshes Page without showing results
- Add Taxonomy Subcategory To Permalink
- How can I highlight a top level dashboard menu item created for a custom taxonomy?
- Customizing Primary Menu to include custom taxonomy description
- Rewrites with hierarchical taxonomies in permalink
- Custom Taxonomy with tax_query
- How to get custom category’s link?
- Edit custom taxonomy description programatically
- why are the term_id and term_taxonomy_id doesn’t match on custom taxonomies, but are duplicates on categories
- saving meta/custom field to tag
- Get taxonomy name for the current post
- How to get posts that contain multiple terms from multiple taxonomies?
- Cannot delete or edit a single term in a custom taxonomy, taxonomy name is wrong?
- View the complete list of a taxonomy in the navigation menu
- Duplicate slug/permalink issue
- Getting taxonomies associated with a specified post type
- Changing input type from text to multi select dropdown – skill taxonomy
- Exclude product attributes from taxonomy terms loop
- How to list the taxonomy terms that fit the custom query?
- What’s the best way to add taxonomy’s image in 2017?
- Count of posts by different parameters?
- Add custom taxonomy as a css class
- Wp_query…a type of term a different div
- Taxonomy page shows category in title
- Need equivalent of single_term_slug
- Multiple Drop-Down custom taxonomies search
- Issue adding custom taxonomies to custom post type (PHP)
- Taxonomy URL rewrite whilst keeping filtered posts?
- How to loop custom posts that have an exact match in taxonomy terms?
- True or F False Setting of ‘with_front’ Parameter of Rewrite Is returning Exact Same result
- Filter “get_terms” query
- Error 404 in Custom taxonomy with pagination
- WordPress Taxonomy Permalinks – Custom?
- Need help understanding a rewrite with multi-level taxonomy
- Change Permalink to Value of Custom Field
- Display custom post taxonomies
- Advanced search: roles and multiple taxonomies
- Removing fields from category/taxonomy edit form
- Issue On Listing Woocommerce Parent Tag List
- Remove ‘portfolio’ from URL
- Gravity Forms with Advanced Post Creation Add-On not updating ACF fields on custom taxonomy