LLMS_Voucher::is_product_to_voucher_link_valid( [type] $code, [type] $product_id )

[is_product_to_voucher_link_valid description]


Description Description


Parameters Parameters

$code

([type]) (Required) [description]

$product_id

([type]) (Required) [description]


Top ↑

Return Return

(boolean) [description]


Top ↑

Source Source

File: includes/class.llms.voucher.php

	public function is_product_to_voucher_link_valid( $code, $product_id ) {

		$voucher = $this->check_voucher( $code );

		if ( $voucher ) {
			$this->id = $voucher->voucher_id;

			$products = $this->get_products();

			if ( ! empty( $products ) && in_array( $product_id, $products ) ) {
				return true;
			}
		}

		return false;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.