This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Open | |
jQuery( window ).trigger( { | |
type: 'jet-popup-open-trigger', | |
popupData: { | |
popupId: 'jet-popup-<numeric popup ID>', | |
} | |
} ); | |
//Close , just trigger click to match the rules in popup setting | |
jQuery('#jet-popup-<numeric popup ID> .jet-popup__close-button').click(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function jennsup_custom_checkout_product_validation() { | |
global $woocommerce; | |
$cart_items = $woocommerce->cart->cart_contents; | |
$restrict_product_id = 9787; //your restricted product id | |
foreach ( $cart_items as $key => $item ) { | |
$product_id = $item['product_id'] == 0 ? $item['variation_id']: $item['product_id']; | |
$product_qty = $item['quantity']; | |
if($product_id == $restrict_product_id) { |
OlderNewer