Home Forums Front-end Issues Edit variable product field in frontend Reply To: Edit variable product field in frontend

  • Those fields are part of WooCommerce and you cannot use ACF to edit them without adding code.

    For example, you can create ACF fields for your front end form that mimic WC fields and then use an acf/save_post action to get the values submitted and update the WC fields.

    In this example the WC price field is saved with the meta key of “_regular_price”. Please not that this is only an example, not all WC products will have this field and any updating will depend on how WC stores the data.

    // simple example
    add_action('acf/save_post', 'my_update_wc_fields');
    function my_update_wc_fields($post_id) {
      if (get_post_type($post_id) != 'product') {
        // not a WC product
      $price = get_field('my_price_field', $post_id);
      if (!empty($price) {
        update_post_meta($post_id, '_regular_price', $price);

    In some cases it might be possible to skip the action function and just name your field the same as the WC field. For example you can name an ACF field “_regular_price” as long as the data stored in your ACF field matches the database storage used for WC. In this example an ACF number field would likely work.

    It is important in both of the above examples that your field is only used on the front end form and does not appear in the admin when editing because this will cause conflicts with WC.

    As I stressed above, this is only a simple example, I don’t know everything about WC or how all of the fields are stored or how they might changed based on other WC product settings.