I’m getting error Ultimate WooCommerce Filters

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 … Read more

Impossible to create a new WooCommerce customer using Rest API

In the documentation of WP REST User https://wordpress.org/plugins/wp-rest-user/ you have the aswer: To perform further actions after user is registered, write and add_action: add_action(‘wp_rest_user_user_register’, ‘user_registered’); function user_registered($user) { // Do Something } Replace “// Do Something” for the code to change the user role. Something like this (not tested): $u = new WP_User( 3 ); … Read more