WC_Product_Variation::get_purchase_note
Get purchase note.
Method of the class: WC_Product_Variation{}
Hooks from the method
Returns
String.
Usage
$WC_Product_Variation = new WC_Product_Variation(); $WC_Product_Variation->get_purchase_note( $context );
- $context(string)
- What the value is for. Valid values are view and edit.
Default:'view'
Changelog
| Since 3.0.0 | Introduced. |
WC_Product_Variation::get_purchase_note() WC Product Variation::get purchase note code WC 10.7.0
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;
}