You appear to be a bot. Output may be restricted
Description
Gets a prop for a getter method.
Gets the value from either current pending changes, or the data itself. Context controls what happens to the value before it's returned.
Usage
$mixed = WC_Data::get_prop( $prop, $context );
Parameters
- $prop
- ( string ) required – Name of prop to get.
- $context
- ( string ) optional default: view – What the value is for. Valid values are view and edit.
Returns
mixed
Source
File name: woocommerce/includes/abstracts/abstract-wc-data.php
Lines:
1 to 13 of 13
protected function get_prop( $prop, $context = 'view' ) { $value = null; if ( array_key_exists( $prop, $this->data ) ) { $value = array_key_exists( $prop, $this->changes ) ? $this->changes[ $prop ] : $this->data[ $prop ]; if ( 'view' === $context ) { $value = apply_filters( $this->get_hook_prefix() . $prop, $value, $this ); } } return $value; }