• Resolved onelikenoone

    (@onelikenoone)


    Hi, I’m having an issue exectuting this hook in functions.php:

    function check_if_product_in_cart() {
    
    	$product_id_1 = 15801;
    	$product_id_2 = 15799;
    
    	if( WC()->cart->find_product_in_cart( WC()->cart->generate_cart_id( $product_id_1 ) ) || WC()->cart->find_product_in_cart( WC()->cart->generate_cart_id( $product_id_2 ) )) {
    		wc_print_notice( 
    			sprintf( '<b>Dopo l'acquisto siete invitati a mettervi in contatto direttamente con me via Messenger!</b>'), 
    			'notice'
    		);
    	}
    }
    
    add_action( 'woocommerce_before_checkout_form', 'check_if_product_in_cart' );

    I’m using Futurio, Elementor Pro and Woocommerce updated to latest versions. Thank you

Viewing 1 replies (of 1 total)
  • Theme Author FuturioWP

    (@futuriowp)

    Hello

    This code is not related to the theme. Contact the WooCommerce staff please.

    Thank you

Viewing 1 replies (of 1 total)
  • The topic ‘Hook not executing’ is closed to new replies.