WC_Order_Refund::get_amount PHP Method

get_amount() public method

Get refunded amount.
public get_amount ( string $context = 'view' ) : integer | float
$context string
return integer | float
    public function get_amount($context = 'view')
    {
        return $this->get_prop('amount', $context);
    }

Usage Example

コード例 #1
0
ファイル: refunds.php プロジェクト: pelmered/woocommerce
 /**
  * Test: get_refund_amount
  */
 function test_get_refund_amount()
 {
     $object = new WC_Order_Refund();
     $object->set_amount(20);
     $this->assertEquals('20.00', $object->get_amount());
 }