Here’s the relevant code (lines 13, 17 and 18):
$term = wp_insert_term(sanitize_text_field(
$_POST['Color_Name']), 'product_color', $args);
$wc_term = wp_insert_term(sanitize_text_field(
$_POST['Color_Name']), 'pa_ewd_uwcf_colors', $args);
update_term_meta($term['term_id'], 'EWD_UWCF_WC_Term_ID', $wc_term['term_id']);
You can see from the stack trace that either $term
or $wc_term
here must be a WP_Error object meaning that one of the wp_insert_term() calls failed. It would be useful to find out what that error is: I’d suggest adding
error_log( print_r( $term, true ) );
error_log( print_r( $wc_term, true ) );
between those two lines and reproducing the error again, then check your server or PHP error log to see the error details. After that I suggest you talk to the plugin authors and ask them to check is_wp_error($term)
and is_wp_error($wc_term)
here, and give them the error details too.
Related Posts:
- Show only geolocated user country into Woocommerce checkout country fields
- Reverse engineering of WooCommerce Storefront filters
- How to modify “[Product] has been added to your cart” in WooCommerce?
- WordPress codex: apply_filters – clarification on creating a new hook on the fly. How do we use it?
- Is there a Woocommerce hook that fires when applying a coupon but before checking if it’s valid?
- Filter on a custom product attribute in WooCommerce using meta_query or tax_query [closed]
- Rewriting Woocommerce Product Filters To URL Segments
- What is the action hook for an order that fails on frontend checkout in WooCommerce?
- woocommerce_get_price filter hook not working for product variation price
- Accessing parameters when adding filter
- Using a filter with multiple parameters and $this
- Remove add to cart icon/view product button woocommerce
- Separeting product from post in search result
- Woocommerce get billing state manually
- Redirect customer to login page (with other signup plugin) if user not logged in when proceeding to checkout
- Woocommerce: Complex query in pre_get_posts [closed]
- Using a filter to change a path
- Pre filter woocommerce products to remove a certain category of products
- How to apply these filters
- How to add order status class to the body tag?
- Redirect no product url’s to static url
- What Hook/Action is performed when a field in checkout form is changed in WooCommerce
- How can I remove a WooCommerce Product Tab’s sub section in wp-admin?
- How do I create a filter to hide the One Click Accessibility plugin button in WordPress?
- manage_shop_order_posts_custom_column() hook is Not working In Functions.php file in my WordPress active theme
- Display custom product option in admin order details
- How to create a WooCommerce Product filter based on PHP foreach
- Woocommerce : Add name filed of checkout page to buyers wordpress display name
- Two Filter Issue [closed]
- apply_filter and add_filter conflict
- Woocommerce – Hide shipping at all, if only certain product or products with certain shipping class is in the cart
- Running JavaScript after using WooCommerce Filter Plugin
- Redirecting orders by company field
- Combine one action and one filter
- How to add woocommerce product price filter widget to other page
- How can i add product Accessories from front-end using custom php form?
- How to change lost password email text using custom plugin wordpress?
- Overriding Plugin function in your child theme
- Update / refresh mini cart, after custom AJAX add_to_cart event
- Filter orders in Admin area based on logged in user
- WooCommerce Tax Filter Not Working
- Add suffix to price html does not work
- woocommerce price filter not working when change currency
- With what hook do I remove WooCommerce existing Product Data Tab form fields?
- AffiliateWP not calculating multiple quantities when using affwp_calc_referral_amount filter
- Add second price option based on payment method at cart item price
- How to get the attributes based on dependency in woocommerce?
- Reposition variation stock message
- Add custom ID to WooCommerce product tab
- How to display product price of the product in loop
- Limit users to one active subscription in WooCommerce Subscriptions? [closed]
- How do I add a text input field for customers to leave a note on a single WooCommerce product page?
- WooCommerce HTML after short description if product is in specific category
- Auto update cart after quantity change
- Save and display selected product option and cost as cart item data in WooCommerce
- How to implement Handling Fee like the Shipping on Cart and Checkout page on WooCommerce [closed]
- How to remove product base from WooCommerce product permalinks
- woocommerce image product add a class and data-src attributes
- Woo create order only after payment done
- Change Category Widget Dropdown List Select Name
- wooCommerce checkout page State / County (optional) validate not working
- WooCommerce – Multiple meta query not working
- Display product category taxonomy terms in WooCommerce shop loop
- Show prices with tax in Woocommerce Mini Cart [closed]
- Woocommerce Moving Review Below add to cart breaks button
- WP All Import manual Cron
- Download permission for non-purchased products
- Display FREE for $0 products in woocommerce ++++ [closed]
- How to add existing categories into a post using wp_insert_post
- WooCommerce Hook: Content get’s displayed twice and not AFTER the order total
- Have I got this IF Statement correct?
- WooCommerce Price Filter not working? [closed]
- Adding Field in WooCommerce
- Woocommerce Sort by default variation price
- Add Name and SKU Main Product to Secondary Product to Cart
- Add rewrite rule to make Woocommerce product category page seo friendly
- add the attribute value above the english product title
- How to add woocommerce products header title in woocommerce_breadcrumb hook to function.php
- Can I create categories or attribute contain more than 70,000?
- Format decimals of get_price_html
- Return product list based on current product attribute
- Getting in an exception for get product detail by id in woocommerce REST api
- Woocommerce Disabling Auto Restocking for Cancelled Orders
- Custom pagination permalink structure Product page
- Pseudo class :before don’t working in a specific button
- How to speed up “My Account > Orders Page” on Site with More than 200,000 orders?
- Editing product categories suddenly crashes website and goes back to wordpress installation
- ACF in WooCommerce mail template
- Merge “description” and “additional informations” product tab
- I need to refresh the checkout page if someone changes the zip code
- add_filter not works in ajax
- How to skip woocommerce checkout after payment page? [closed]
- WooCommerce order created via REST – sending the date_created along
- Get Third Level Categories WooCommerce
- Change wp-login.php? Problem with .htaccess password protection and multi user shop
- Conditional email recipient based off Shipping Method [closed]
- Show pop up message for specific categoryies
- How to show detailed order history on woocommerce product page [closed]
- Create WordPress account on different domain when WooCommerce order completed
- Creating a woocommerce order when a user creates an account