WC_Order::get_cart_hash PHP Метод

get_cart_hash() публичный Метод

Get cart hash.
public get_cart_hash ( string $context = 'view' ) : string
$context string
Результат string
    public function get_cart_hash($context = 'view')
    {
        return $this->get_prop('cart_hash', $context);
    }

Usage Example

Пример #1
0
 /**
  * Test: get_cart_hash
  */
 function test_get_cart_hash()
 {
     $object = new WC_Order();
     $set_to = '12345';
     $object->set_cart_hash($set_to);
     $this->assertEquals($set_to, $object->get_cart_hash());
 }
WC_Order