Automattic\WooCommerce\Internal\StockNotifications

Notification::get_productpublicWC 1.0

Get the product.

Method of the class: Notification{}

No Hooks.

Returns

\WC_Product|false.

Usage

$Notification = new Notification();
$Notification->get_product();

Notification::get_product() code WC 10.3.6

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;
}