Noptin_Abstract_Ecommerce_Integration::fire_product_hook( string $action, int $product_id )

Fires a specific hook based on a product event.


Parameters Parameters

$action

(string) (Required) The product action.

$product_id

(int) (Required) The product id.


Top ↑

Source Source

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

	public function fire_product_hook( $action, $product_id ) {

		$product = $this->get_product_details( $product_id );

		// Only fired when there is actually a product.
		if ( ! empty( $product['id'] ) ) {
			do_action( "noptin_integration_product", $action, $product_id, $product, $this );
			do_action( "noptin_integration_product_$action", $product_id, $product, $this );
			do_action( "noptin_ecommerce_integration_product_$action", $product_id, $product, $this );
			do_action( "noptin_ecommerce_integration_product", $action, $product_id, $product, $this );
			do_action( "noptin_{$this->slug}_integration_product_$action", $product_id, $product, $this );
			do_action( "noptin_{$this->slug}_integration_product", $action, $product_id, $product, $this );
		}

	}


Top ↑

Changelog Changelog

Changelog
VersionDescription
1.2.6Introduced.

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