• Resolved carmolim

    (@carmolim)


    Hello,

    I’m creating new theme that supports WooCommerce and I’m trying to customize the My Account page.

    I almost finished, the only thing I couldn’t achieve was to put the edit shipping address form inside a tab.

    I use this variable to build the form:

    <?php $address = apply_filters('woocommerce_billing_fields', $address_fields ); ?>
    <?php foreach ( $address as $key => $field ) : ?>
    <?php woocommerce_form_field( $key, $field, ! empty( $_POST[ $key ] ) ? wc_clean( $_POST[ $key ] ) : $field['value'] ); ?>
    <?php endforeach; ?>

    It almost works, but for each field I get this error:

    Array ( [label] => Last name [placeholder] => Last name [class] => Array ( [0] => form-row-last ) [clear] => 1 [required] => 1 )
    Notice: Undefined index: value

    I couldn’t find a way to retrieve the values for each field, apparently it only works when I access the page via the end point.

    Is possible to achieve this?

    Thanks!

    https://www.ads-software.com/plugins/woocommerce/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Edit billing and shipping addresses outside the endpoint’ is closed to new replies.