WC_Product_Variation::get_purchase_note( string $context = 'view' )
Get purchase note.
Description Description
Parameters Parameters
- $context
-
(Optional) What the value is for. Valid values are view and edit.
Default value: 'view'
Return Return
(string)
Source Source
File: includes/class-wc-product-variation.php
public function get_purchase_note( $context = 'view' ) {
$value = $this->get_prop( 'purchase_note', $context );
// Inherit value from parent.
if ( 'view' === $context && empty( $value ) ) {
$value = apply_filters( $this->get_hook_prefix() . 'purchase_note', $this->parent_data['purchase_note'], $this );
}
return $value;
}
Changelog Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |