WC_Order::get_payment_method PHP 메소드

get_payment_method() 공개 메소드

Get the payment method.
public get_payment_method ( string $context = 'view' ) : string
$context string
리턴 string
    public function get_payment_method($context = 'view')
    {
        return $this->get_prop('payment_method', $context);
    }

Usage Example

 /**
  * Add content to the WC emails.
  *
  * @access public
  * @param WC_Order $order
  * @param bool $sent_to_admin
  * @param bool $plain_text
  */
 public function email_instructions($order, $sent_to_admin, $plain_text = false)
 {
     if ($this->instructions && !$sent_to_admin && 'cheque' === $order->get_payment_method() && $order->has_status('on-hold')) {
         echo wpautop(wptexturize($this->instructions)) . PHP_EOL;
     }
 }
All Usage Examples Of WC_Order::get_payment_method
WC_Order