show wc_add notices on particular page in woo commerce custom plugin development
I solve this problem below is code. add_action( ‘woocommerce_init’, array( $this, ‘afwo_add_notices’ ) ); public function afwo_add_notices() { if ( isset( $_POST[‘whatsapp_cart_nonce_field’] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST[‘whatsapp_cart_nonce_field’] ) ), ‘whatsapp_cart_field’ ) ) { echo ”; } if ( empty( WC()->session->get( ‘WhatsApp_cart’ ) ) ) { return; } if ( isset( $_GET[‘index_to_remove’] ) ) { … Read more