wc_edit_address_i18n()
Get the edit address slug translation.
Hooks from the function
Return
String
. Address slug i18n.
Usage
wc_edit_address_i18n( $id, $flip );
- $id(string) (required)
- Address ID.
- $flip(true|false)
- Flip the array to make it possible to retrieve the values from both sides.
Default: false
wc_edit_address_i18n() wc edit address i18n code WC 9.4.2
function wc_edit_address_i18n( $id, $flip = false ) { $slugs = apply_filters( 'woocommerce_edit_address_slugs', array( 'billing' => sanitize_title( _x( 'billing', 'edit-address-slug', 'woocommerce' ) ), 'shipping' => sanitize_title( _x( 'shipping', 'edit-address-slug', 'woocommerce' ) ), ) ); if ( $flip ) { $slugs = array_flip( $slugs ); } if ( ! isset( $slugs[ $id ] ) ) { return $id; } return $slugs[ $id ]; }