Automattic\WooCommerce\Internal\StockNotifications

Notification::get_product_permalinkpublicWC 1.0

Get product link.

Method of the class: Notification{}

No Hooks.

Returns

String.

Usage

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

Notification::get_product_permalink() code WC 10.3.6

public function get_product_permalink() {

	$product = $this->get_product();
	if ( ! $product ) {
		return '';
	}

	if ( $product->is_type( 'variation' ) && ! empty( $this->get_meta( 'posted_attributes' ) ) ) {
		return $product->get_permalink( array( 'item_meta_array' => $this->get_meta( 'posted_attributes' ) ) );
	} else {
		return $product->get_permalink();
	}
}