Changing the "Home Address" and "Billing Address" headings
-
Hi there, my client wants the “Home Address” title in the account details to be “Contact Information” and “Billing Address” to be “Billing Information” and I’m having a bit of trouble figuring out the best way to do this.
I looked through and found that these titles are set in addresses-addon.class.php:
CUAR_AddressHelper::$DEFAULT_HOME_ADDRESS_ID => __('Home address', 'cuar'), CUAR_AddressHelper::$DEFAULT_BILLING_ADDRESS_ID => __('Billing address', 'cuar')
I tried using a filter (which I’m not very familiar with), but this did not work for me (it caused the address areas to just disappear.)
add_filter('cuar/core/address/user-addresses', array( CUAR_AddressHelper::$DEFAULT_HOME_ADDRESS_ID => __('Contact Information', 'cuar'), CUAR_AddressHelper::$DEFAULT_BILLING_ADDRESS_ID => __('Billing Information', 'cuar') ));
Can anyone show me how to correctly overwrite this function? The apply_filters is contained within another function, so I’m not sure if I should overwrite that one instead?
public function get_registered_user_addresses() { return apply_filters('cuar/core/address/user-addresses', array( CUAR_AddressHelper::$DEFAULT_HOME_ADDRESS_ID => __('Home address', 'cuar'), CUAR_AddressHelper::$DEFAULT_BILLING_ADDRESS_ID => __('Billing address', 'cuar') )); }
Thanks in advance!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Changing the "Home Address" and "Billing Address" headings’ is closed to new replies.