Automattic\WooCommerce\Internal\StockNotifications
Notification::get_product
Get the product.
Метод класса: Notification{}
Хуков нет.
Возвращает
\WC_Product|false.
Использование
$Notification = new Notification(); $Notification->get_product();
Код Notification::get_product() Notification::get product WC 11.3.0
public function get_product() {
if ( ! empty( $this->product ) ) {
return $this->product;
}
$product = wc_get_product( $this->get_prop( 'product_id' ) );
if ( ! $product ) {
return false;
}
$this->product = $product;
return $product;
}