Support

Account

Home Forums Backend Issues (wp-admin) How update product_cat ACF fields after product_cat saved (Woo)

Unread

How update product_cat ACF fields after product_cat saved (Woo)

  • Hi here!
    I try update some ACF fields for product_cat (woocommerce)
    This is my code

    function product_cat_save_taxonomy_description( $term_id ) {
          $term_descriptions = get_field($sub_domain.'_subdomain_description', 'product_cat_'.$term_id);
    if (!$term_descriptions) {
    			$meta_value = 'hello';
    			update_field($sub_domain.'_subdomain_description', $meta_value, 'product_cat_'.$term_id); }
    add_action( 'create_product_cat', 'product_cat_save_taxonomy_description', 10, 2 );
    add_action( 'edited_product_cat', 'product_cat_save_taxonomy_description', 10, 2 );

    Before i think is easy task, but really tired finding answear..

Viewing 1 post (of 1 total)

The topic ‘How update product_cat ACF fields after product_cat saved (Woo)’ is closed to new replies.