Billing/shipping details

This commit is contained in:
Mike Jolley 2016-08-08 14:49:53 +01:00
parent 6bf05396c2
commit 9bbf5df1fd
1 changed files with 4 additions and 4 deletions

View File

@ -266,8 +266,8 @@ class WC_Meta_Box_Order_Data {
$field_name = 'billing_' . $key;
if ( $order->$field_name ) {
echo '<p><strong>' . esc_html( $field['label'] ) . ':</strong> ' . make_clickable( esc_html( $order->$field_name ) ) . '</p>';
if ( is_callable( array( $order, 'get_' . $field_name ) ) ) {
echo '<p><strong>' . esc_html( $field['label'] ) . ':</strong> ' . make_clickable( esc_html( call_user_func( array( $order, 'get_' . $field_name ) ) ) ) . '</p>';
}
}
@ -352,8 +352,8 @@ class WC_Meta_Box_Order_Data {
$field_name = 'shipping_' . $key;
if ( ! empty( $order->$field_name ) ) {
echo '<p><strong>' . esc_html( $field['label'] ) . ':</strong> ' . make_clickable( esc_html( $order->$field_name ) ) . '</p>';
if ( is_callable( array( $order, 'get_' . $field_name ) ) ) {
echo '<p><strong>' . esc_html( $field['label'] ) . ':</strong> ' . make_clickable( esc_html( call_user_func( array( $order, 'get_' . $field_name ) ) ) ) . '</p>';
}
}
}