name = __( 'Product Price', 'wpc-conditions' ); $this->slug = __( 'product_price', 'wpc-conditions' ); $this->group = __( 'Product', 'wpc-conditions' ); $this->description = __( 'Compare against the product price', 'wpc-conditions' ); parent::__construct(); } public function validate() { return isset( $GLOBALS['product'] ); } public function get_compare_value() { /** @var $product WC_Product */ global $product; return $product->get_price(); } } }