WC_Order_Refund::get_reason PHP Method

get_reason() public method

Get refund reason.
Since: 2.2
public get_reason ( string $context = 'view' ) : integer | float
$context string
return integer | float
    public function get_reason($context = 'view')
    {
        return $this->get_prop('reason', $context);
    }

Usage Example

コード例 #1
0
ファイル: refunds.php プロジェクト: pelmered/woocommerce
 /**
  * Test: get_refund_reason
  */
 function test_get_refund_reason()
 {
     $object = new WC_Order_Refund();
     $object->set_reason('Customer is an idiot');
     $this->assertEquals('Customer is an idiot', $object->get_reason());
 }