Noptin_Abstract_Ecommerce_Integration::is_product_post_type( int $product_id )

Checks the post type of a post.


Parameters Parameters

$product_id

(int) (Required) The product id.


Top ↑

Source Source

File: includes/integrations/class-noptin-abstract-ecommerce-integration.php

	public function is_product_post_type( $product_id ) {

		if ( empty( $product_id ) || empty( $this->product_post_type ) ) {
			return false;
		}

		if ( is_array( $this->product_post_type ) ) {
			return in_array( get_post_type( $product_id ), $this->product_post_type );
		}

		get_post_type( $product_id ) == $this->product_post_type;

	}


Top ↑

Changelog Changelog

Changelog
VersionDescription
1.3.0Introduced.

Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation