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 check if is in cart page? [closed]
- Display single product attribute value on Shop page (Woocommerce)
- how to use wc_create_order with subscription product
- Is it possible to add custom fields to a WooCommerce attribute term? [closed]
- Add custom variable to cart content [closed]
- Woocommerce 3.1 Add product image to order confirmation email not working
- Woocommerce My Account Endpoint – how to get ID parameter from URL?
- Default woocommerce placeholder image
- How to add Woocomrce cart page shipping calculator to my country state list
- Custom Woocommerce image size [closed]
- Button to update order status Woocommerce with WC Marketplace
- WooCommerce add_to_cart url not working [closed]
- WooCommerce: display text instead of raw checkbox value email
- How to build wordpress site which will have location based services & products?
- How we can edit variations on cart page? [closed]
- new WC_Order(); Coming Back Empty
- Is there any way to find which action/hook is fired?
- Woocoomerce product category count including subcategories
- WooCommerce single products images doesn’t zoom on hover and doesn’t change clicking on gallery
- Disabling the free shipping method when the cart has product/s which assigned a certain shipping class [closed]
- woocommerce_email_subject_customer_completed_order
- is_shop, is_home, is_front_page doesn’t work for woocommerce
- “Cannot read property ‘replace’ of undefined” Javascript error when trying to add attribute terms from add product page [closed]
- Order list woocommerce Orders based on meta for custom status
- How to add a greeting message upon logging into WordPress for certain user role
- Modify some CSS with functions if (function_exists
- WooCommerce back-end very slow takes 10 seconds to load, slow queries
- Woocommerce custom meta fields, sort by date
- WooCommerce hide unexisting variations
- woocommerce_checkout_fields modifying existing billing_phone label created new field
- How can I change the functionality of breadcrumbs?
- Variation name in $product->get_name()
- WordPress keeps moving my widgets to other widget areas
- jquery.validation.js is not working in woocommerce checkout page form
- How do I group product variations on cart page (Woocommerce)?
- How do I add an extra field to comment form above the submit button?
- woocommerce email template detect email recipient
- multi-vender wooCommerce ability to separate products based on zip code [closed]
- Woocommerce – display all sold out products
- Woocommerce how to show most selling products by category
- Hide a shipping method if cart total is higher than an amount
- Woocommerce set loop_shop_columns to be 3 in the main shop page loop only and 4 otherwise
- WordPress pointing animated GIF images with wrong file name upon upload (GIFs animation not working)
- How to update all products with same SKU prefixes when updating stock with CSV?
- What is the best and cheapest way to generate dashboards about conversions data and store users? [closed]
- woocommerce permalinks like “?p=%post_id%”
- Modify existing code to show user nickname in woocoomerce order email instead of user_login
- How to prevent woocommerce product tag field from update?
- WooCommerce custom SVG coloring tool [closed]
- Woocomerce erro shipping [closed]
- How do I prevent double the amount of stock being reduced with this Split Order Woocommerce Code? [closed]