wp_set_object_terms( $productID, 'black', 'pa_color', true );
$att_color = Array('pa_color' =>Array(
'name'=>'pa_color',
'value'=>'black',
'is_visible' => '1',
'is_taxonomy' => '1'
));
update_post_meta( $productID, '_product_attributes', $att_color);
Related Posts:
- Creating loop within functions.php
- Set quantity of woocommerce product on page visit [closed]
- How can I remove the main description text box in a Woocommerce product editor page? I only use the “Product short description” text box [closed]
- When sale price is 0.00 show only regular price
- Create custom function for hero image
- Parent category as WOOCommerce Categories widget title
- Woocommerce custom calculation function
- Copy and Modified WooCommerce function is_coupon_valid [closed]
- How to create a custom order status in woocommerce!
- When should you, and when should you not, use wp_list_pluck()?
- How to show product SKU on product page
- How to get woocommerce inventory status [closed]
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- Apply jquery script to only woocommerce product pages and categories
- In WooCommerce I need to modify the thankyou.php page [closed]
- How can I add an extra WooCommerce hook
- Set default options for inserting media
- Default or Preset Content for Custom Post Types
- Remove tag on my RSS Feed
- display 100 products per page on product category page [closed]
- Adding WooCommerce to a Custom Theme – not working [closed]
- How to Add a Random Custom Gravatar in the WordPress Comments?
- Delete pages and Create default pages for all new network sites
- Actions according to image type and size
- Override woocommerce wc-class function
- Post thumbnail relative link and HTML modify
- How to mass-delete inline styles in WordPress custom post type automatically?
- How would go about if I just want a temporary function?
- Remove the deleted users avatar from list
- How to call custom function from functions.php in site-wide template files?
- Pass parameters to function through an action
- str_replace function in theme
- Calling a function from anywhere, used in different places
- Selective Product Category for Carousel
- Right way to update widget on dynamic new input field
- How to display custom option field in woocommerce orders in admin panel?
- Best practices regarding the creation of custom widgets?
- How to add a slide toggle to the Woocommerce-Layout__Activity-Panel area in the orders admin page
- Add to cart php not working [closed]
- How to auto refresh when user change postcode
- Word Press – Dynamic Content [closed]
- Insert image in WordPress with HTML5 tag and caption function
- how can I just add to parent theme function(s) instead of redeclaring whole the function
- woocommerce change currency per category [closed]
- Skeleton Child Theme Add Icon Bar to Header Flex Grid
- Redirect to another page using contact form 7? [closed]
- help I changed one currency in woocommerce and everything is ruined [closed]
- How to override woocommerce.css?
- How can I use Woocommerce $product->get_attribute in functions.php? (if at all)
- How to change this simple code so that it sends the email notification after payment in WooCommerce?
- (Woocommerce) Order by price when entering specific category
- Custom HTML markup
- Use a shortcode to display custom meta box contents
- Woocommerce checkout field
- Add Login/Logout Menu Item to Primary Nav “My Account” Submenu [Woocommerce] [closed]
- The_content and Preg_replace in loaded Iframe [closed]
- Create a Woocommerce product widget with category filter
- Auto scroll to id on page load on all pages except home page. Only do this on mobile
- Change WooCommerce add_to_cart Button Text?
- two search forms on the same page
- WooCommerce -> wc_enqueue_js not working [closed]
- Use existing image sizes for WooCommerce
- New checkbox in custom widget isn’t saving data
- Linking Javascript in functions.php file
- Function to check if custom page is used by page?
- Woocommerce Variable Product Dropdown for Custom Shop Template
- Woocommerce Default sorting product by product type
- Change class woocommerce on function.php
- Header menu aligned right on all pages except for single-post page [closed]
- Adding discount functionality to the cart
- Hide author info in single posts by certain users
- When are the user meta fields created in the database? Admin vs Woo API REST
- price of product can’t return when get data of product in functions.php
- Woocommerce product price change
- is_product_category(‘Services’) not working
- Shortcode to insert default text and change one word throughout it?
- I want to customize the_posts_navigation function by replacing prev and next with images
- Woocommerce – Switching Price for Category
- How would I correctly implement a new if statement in a child functions file?
- Echo a String Based On Geolocation? [Woocommerce || ACF]
- Move product attributes after summary on single product page
- Show number of sold products but be first for less than 2
- True email confirmation for registration (keeping unvalidated users from user table)
- function syntax is off,
- Adding A New Widget to WordPress Disables the Existing Widgets
- How To Show Shortcodes In WordPress Custom Fields?
- How do I integrate my Child Theme into a Custom Template?
- Shortcode to eliminate and replace with
- custom post with loading script per single post
- Get Value of Custom Field
- restrict access to specific urls on a specific period of time
- child_of not working while searching
- Get term count on a category page
- Removing Facebook contact field from user contact not working
- add variable to actions/functions across different files (woocommerce)
- How do I add functionality to images?
- WordPress Custom wp mail template return full template
- How to create a post without link in wordpress?
- post_row_actions filter from parent theme not executing in child theme
- Is it possible to set the first image from a gallery as the product image, rather than the featured image?