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.
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; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.3.0 | Introduced. |