Skip to content

Instantly share code, notes, and snippets.

@sourov-am
Last active August 30, 2022 16:17
Show Gist options
  • Save sourov-am/015494aa201f66cc6a5eace7f7b1036e to your computer and use it in GitHub Desktop.
Save sourov-am/015494aa201f66cc6a5eace7f7b1036e to your computer and use it in GitHub Desktop.
Elementor template for product details page - product views fix snippet.
// Snippet by MI team - start.
add_action( 'woocommerce_after_single_product', function() {
if ( class_exists( 'MonsterInsights_eCommerce_WooCommerce_Integration' ) ) {
$mi_ec_woo = MonsterInsights_eCommerce_WooCommerce_Integration::get_instance();
if ( method_exists( $mi_ec_woo, 'product_detail' ) ) {
$mi_ec_woo->product_detail();
}
}
} );
// Snippet by MI team - end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment