Support » Plugin: WooCommerce Address Book » Duplicate “Add New Shipping Address” buttons

  • Hi,

    I’m having an odd problem. When I go to the Address Book in My Account, I’m getting two buttons for Add New Shipping Address. One on top of the other. When I go to add a shipping address, neither button works.

    I have default Billing and Shipping addresses for the user.

    Thanks for any help you can provide.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Gary Thayer

    (@doomwaxer)

    @ryansmiller It’s difficult to guess without seeing the site, or the code, but my guess is there may be a conflict with your theme. Have you tried switching your theme?

    “I have default Billing and Shipping addresses for the user.” Does this mean you’ve extended the plugin so all users start with saved Addresses? If so, can you deactivate your changes to see if they are the cause?

    Plugin Contributor Gary Thayer

    (@doomwaxer)

    My guess is maybe duplicate occurrences of the “woocommerce_account_edit-address_endpoint” hook, or something is up with the saved user_meta.

    Hey @doomwaxer,

    Thanks for the helpful information.

    My user has a default billing and shipping address. We have not loaded up any additional billing and shipping addresses for customers, but will be doing that soon.

    I’m running Storefront, but it looks like the problem is being caused by Elementor (turned off all plugins, minus WooCommerce and WooCommerce Address Book. Then I turned on Elementor and it caused the problem). Not exactly sure why it is though as I’m just calling the WooCommerce My Account shortcode.

    When I look at the HTML I see that the second calling of the address book hook is being nested within the first “address_book” div.

    <div class="address_book">
         <h2></h2>
         <p class="myaccount_address">The following addresses are available during the checkout process.</p>
         <div class="col2-set addresses address-book"></div>
         <div class="add-new-address">
    	<a href="https://beta.eastcoastfabrics.com/my-account/edit-address/shipping/?address-book=shipping2/" class="add button">Add New Shipping Address</a>
          </div>
    
          <hr>
    
          <div class="address_book">
    
    	<h2></h2>
    
    	<p class="myaccount_address">The following addresses are available during the checkout process.</p>
            <div class="col2-set addresses address-book"></div>
    	
    	<div class="add-new-address">
                <a href="https://beta.eastcoastfabrics.com/my-account/edit-address/shipping/?address-book=shipping2/" class="add button">Add New Shipping Address</a>
    	</div>
    
          </div>
    </div>

    Let me know if you have any thoughts. Thanks!

    Plugin Contributor Gary Thayer

    (@doomwaxer)

    Its strange that the H2 values are empty. They are hardcoded in the plugin.

    I believe there may be an HTML error in the plugin which is not closing a div properly. That would explain the nesting, but not why it is displaying twice.

    I don’t know anything about Elementor and don’t think I can help you with that. Reading through the docs, it looks like it wants to run its own hooks. Either remove Elementor from the My-Account page, or look through storefront and remove “woocommerce_account_edit-address_endpoint”

    If it help, i have the same problem and in my case the problem was an plugin named “Premium Addons for elementor”. Disable it and the duplication was gone!

    @beerbits thanks for the suggestion. I am using Elementor, but I do not have the Premium Addons for Elementor plugin installed. It does seem to be a problem around Elementor however.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Duplicate “Add New Shipping Address” buttons’ is closed to new replies.