2 questions about shipping address field
-
Hi,
I am using this code below.
if( !function_exists("woe_get_state_full_name")) { function woe_get_state_full_name ( $country,$state){ $state_names = WC()->countries->get_states( $country ); return isset($state_names[$state]) ? $state_names[$state] : $state; } } add_filter('woe_get_order_value_full_address', function ($value,$order, $field) { if ($order->get_shipping_address_1() == "" ) $texts = array_filter( array( $order->get_meta("billing_sub_district") . " ". $order->get_billing_city() . " ". $order->get_billing_address_1() . " ". $order->get_billing_address_2(), woe_get_state_full_name($order->get_billing_country(),$order->get_billing_state()), )); else $texts = array_filter( array( $order->get_meta("shipping_sub_district") . " ". $order->get_shipping_city() . " ". $order->get_shipping_address_1() . " ". $order->get_shipping_address_2(), woe_get_state_full_name($order->get_shipping_country(),$order->get_shipping_state()), )); return join( ", ", $texts); }, 10, 3);
1.
The state shows at the end of the field.
But I want to show it on the first of the field.
How can I achieve it?2.
I want to start a new line in one shipping address field and the order is below.state
city
address1
address2Please tell me how to achieve it.
Hope your reply soon.
Best
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- You must be logged in to reply to this topic.