Title: benjamindavis's Replies | WordPress.org

---

# benjamindavis

  [  ](https://wordpress.org/support/users/benjamindavis/)

 *   [Profile](https://wordpress.org/support/users/benjamindavis/)
 *   [Topics Started](https://wordpress.org/support/users/benjamindavis/topics/)
 *   [Replies Created](https://wordpress.org/support/users/benjamindavis/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/benjamindavis/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/benjamindavis/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/benjamindavis/engagements/)
 *   [Favorites](https://wordpress.org/support/users/benjamindavis/favorites/)

 Search replies:

## Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] My-account address(es) menu item is styled wrong ie. singular/plural](https://wordpress.org/support/topic/my-account-addresses-menu-item-is-styled-wrong-ie-singular-plural/)
 *  Thread Starter [benjamindavis](https://wordpress.org/support/users/benjamindavis/)
 * (@benjamindavis)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/my-account-addresses-menu-item-is-styled-wrong-ie-singular-plural/#post-15398707)
 * Thanks for the info, I have tried to bump the existing bug report. We shall see
   if they decide that a core function that is broken should be corrected.
 * I have decided to use the ‘woocommerce_account_menu_items’ hook and rewrite the
   text so I don’t need to update the files anymore.
 * It’s just annoying to have the site waste resource on a line of code that is 
   essentially worthless.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Disabled Shipping removes “Addresses” link from tab](https://wordpress.org/support/topic/disabled-shipping-removes-shipping-link-from-tab/)
 *  [benjamindavis](https://wordpress.org/support/users/benjamindavis/)
 * (@benjamindavis)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/disabled-shipping-removes-shipping-link-from-tab/#post-14179474)
 * Having looked into it the translation lookup seems to be the problem.
 * In woocommerce/includes/wc-account-functions.php @ line 101:
 * `'edit-address' => _n( 'Addresses', 'Address', (int) wc_shipping_enabled(), '
   woocommerce' ),`
 * My guess is that because it is used in reverse it’s failing.
    With Shipping Disabled:
   wc_shipping_enabled() provides a boolean which becomes 0 when converted to (int)
   As that is !=1 it is intended to give text “Address”
 * With Shipping Enabled: wc_shipping_enabled() gives bool true converted to int
   1
    1 is singular so the text is “Addresses”
 * My fix, swap the words so they are correct for the function, ie singular then
   plural, and add 1 to the result of wc_shipping_enabled() so the new line is
    `'
   edit-address' => _n( 'Address', 'Addresses', (int) wc_shipping_enabled()+1, '
   woocommerce' ),`
    -  This reply was modified 5 years, 5 months ago by [benjamindavis](https://wordpress.org/support/users/benjamindavis/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Disabled Shipping removes “Addresses” link from tab](https://wordpress.org/support/topic/disabled-shipping-removes-shipping-link-from-tab/)
 *  [benjamindavis](https://wordpress.org/support/users/benjamindavis/)
 * (@benjamindavis)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/disabled-shipping-removes-shipping-link-from-tab/#post-14179271)
 * I am having the same problem.
    Disable shipping and the Addresses link text gets
   removed. Not a good experience for the user, the only way to update their billing
   address is via the link on the my-account dashboard.

Viewing 3 replies - 1 through 3 (of 3 total)