WC_Order::get_formatted_billing_full_name PHP Méthode

get_formatted_billing_full_name() public méthode

Get a formatted billing full name.
    public function get_formatted_billing_full_name()
    {
        /* translators: 1: first name 2: last name */
        return sprintf(_x('%1$s %2$s', 'full name', 'woocommerce'), $this->get_billing_first_name(), $this->get_billing_last_name());
    }

Usage Example

 /**
  * Process customer: updating or creating a new customer/saved CC
  *
  * @param  WC_Order           $order          Order object
  * @param  WC_Payment_Token   $customer_token Payment Token
  * @param  string             $cart_token     CC Token
  */
 protected function process_customer($order, $customer_token = null, $cart_token = '')
 {
     // Are we saving a new payment method?
     if (is_user_logged_in() && isset($_POST['wc-simplify_commerce-new-payment-method']) && true === (bool) $_POST['wc-simplify_commerce-new-payment-method']) {
         $customer_info = array('email' => $order->get_billing_email(), 'name' => trim($order->get_formatted_billing_full_name()));
         $token = $this->save_token($customer_token, $cart_token, $customer_info);
         if (!is_null($token)) {
             $order->add_payment_token($token);
         }
     }
 }
All Usage Examples Of WC_Order::get_formatted_billing_full_name
WC_Order