Viewing 3 replies - 1 through 3 (of 3 total)
  • I have this running on WC 2.6.2. It looks okay to me. Can you tell me how it’s broken? On what page?

    Thread Starter Puck

    (@puck)

    I’m sorry, I wasn’t very specific in my description.

    On the My Account page, editing addresses doesn’t show any support for multiple addresses.

    https://store.alderac.com/my-account/

    Now that I check for more details, I notice that it does appear to be working during Checkout ( https://store.alderac.com/checkout/ ) which also offers a big button to “Configure Addresses” that goes to
    https://store.alderac.com/my-account/multiple-shipping-addresses/
    which does work.

    The “My Account” edit address link instead goes to https://store.alderac.com/my-account/edit-address/

    which only has single-address support.

    I’ve set up a redirect for now. Is there an easier way to get the “Edit Address” link from My Account to work? Is that theme-based?

    I just looked at this. It’s pretty broken. The edit link is actually on a different page (that the plugin didn’t know about) and there’s no hook to modify that edit link anyway.

    There’s lots of ways to fix this using copies of woocommerce templates in your theme directory. The easiest would be to copy /wp-content/plugins/woocommerce/templates/myaccount/my-address.php to /themes/THEMENAME/woocommerce/myaccount/my-address.php then edit it so that it reads (something like–I haven’t tried it):

    Old line 51
    <a href="<?php echo esc_url( wc_get_endpoint_url( 'edit-address', $name ) ); ?>" class="edit"><?php _e( 'Edit', 'woocommerce' ); ?></a>

    to

    New line 51 and more

    <?php if ( $title == 'Shipping Address' ): ?>
    <a href="<?php echo esc_url( '/my-account/multiple-shipping-addresses/' ); ?>" class="edit"><?php _e( 'Edit', 'woocommerce' ); ?></a>
    <?php else: ?>
    <a href="<?php echo esc_url( wc_get_endpoint_url( 'edit-address', $name ) ); ?>" class="edit"><?php _e( 'Edit', 'woocommerce' ); ?></a>
    <?php endif ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘No longer functioning with Woocommerce 2.6.2’ is closed to new replies.