get_id() !== $post->ID ) { $the_subscription = wc_get_order( $post->ID ); } $subscription = $the_subscription; self::init_address_fields(); wp_nonce_field( 'woocommerce_save_data', 'woocommerce_meta_nonce' ); ?>
get_user_id() && ( false !== get_userdata( $subscription->get_user_id() ) ) ) { $user_id = absint( $subscription->get_user_id() ); $user = get_user_by( 'id', $user_id ); $user_string = esc_html( $user->display_name ) . ' (#' . absint( $user->ID ) . ' – ' . esc_html( $user->user_email ) . ')'; } WCS_Select2::render( array( 'class' => 'wc-customer-search', 'name' => 'customer_user', 'id' => 'customer_user', 'placeholder' => esc_attr__( 'Search for a customer…', 'woocommerce-subscriptions' ), 'selected' => $user_string, 'value' => $user_id, ) ); ?>
' . esc_html__( 'Address', 'woocommerce-subscriptions' ) . ':' . wp_kses( $subscription->get_formatted_billing_address(), array( 'br' => array() ) ) . '
'; } else { echo '' . esc_html__( 'Address', 'woocommerce-subscriptions' ) . ': ' . esc_html__( 'No billing address set.', 'woocommerce-subscriptions' ) . '
'; } foreach ( self::$billing_fields as $key => $field ) { if ( isset( $field['show'] ) && false === $field['show'] ) { continue; } $function_name = 'get_billing_' . $key; if ( is_callable( array( $subscription, $function_name ) ) ) { $field_value = $subscription->$function_name( 'edit' ); } else { $field_value = $subscription->get_meta( '_billing_' . $key ); } echo '' . esc_html( $field['label'] ) . ': ' . wp_kses_post( make_clickable( esc_html( $field_value ) ) ) . '
'; } echo 'get_payment_method() ) ? ' class="' . esc_attr( $subscription->get_payment_method() ) . '"' : '' ) . '>' . esc_html__( 'Payment Method', 'woocommerce-subscriptions' ) . ':' . wp_kses_post( nl2br( $subscription->get_payment_method_to_display() ) ); // Display help tip if ( '' != $subscription->get_payment_method() && ! $subscription->is_manual() ) { echo wcs_help_tip( sprintf( _x( 'Gateway ID: [%s]', 'The gateway ID displayed on the Edit Subscriptions screen when editing payment method.', 'woocommerce-subscriptions' ), $subscription->get_payment_method() ) ); } echo '
'; echo '' . esc_html__( 'Address', 'woocommerce-subscriptions' ) . ':' . wp_kses( $subscription->get_formatted_shipping_address(), array( 'br' => array() ) ) . '
'; } else { echo '' . esc_html__( 'Address', 'woocommerce-subscriptions' ) . ': ' . esc_html__( 'No shipping address set.', 'woocommerce-subscriptions' ) . '
'; } if ( ! empty( self::$shipping_fields ) ) { foreach ( self::$shipping_fields as $key => $field ) { if ( isset( $field['show'] ) && false === $field['show'] ) { continue; } $function_name = 'get_shipping_' . $key; if ( is_callable( array( $subscription, $function_name ) ) ) { $field_value = $subscription->$function_name( 'edit' ); } else { $field_value = $subscription->get_meta( '_shipping_' . $key ); } echo '' . esc_html( $field['label'] ) . ': ' . wp_kses_post( make_clickable( esc_html( $field_value ) ) ) . '
'; } } if ( apply_filters( 'woocommerce_enable_order_notes_field', 'yes' == get_option( 'woocommerce_enable_order_comments', 'yes' ) ) && $post->post_excerpt ) { echo '' . esc_html__( 'Customer Provided Note', 'woocommerce-subscriptions' ) . ': ' . wp_kses_post( nl2br( $post->post_excerpt ) ) . '
'; } echo ''; do_action( 'woocommerce_admin_order_data_after_shipping_address', $subscription ); ?>