Automattic\WooCommerce\Internal\PushNotifications\Notifications

StockNotification::read_meta │ public │ WC 1.0

{@inheritDoc}

Method of the class: StockNotification{}

No Hooks.

Returns

null. Nothing (null).

Usage

$StockNotification = new StockNotification();
$StockNotification->read_meta( $key ): string;
$key(string) (required)
The meta key.

StockNotification::read_meta() code WC 11.3.0

public function read_meta( string $key ): string {
	$product = WC()->call_function( 'wc_get_product', $this->get_resource_id() );

	return $product instanceof WC_Product ? (string) $product->get_meta( $this->meta_key( $key ) ) : '';
}