Display custom message to customers coming from referral link
If you want to write some text on the checkout screen, to the users coming through referral link, add code below to the functions.php file:
add_action('woocommerce_before_checkout_form', 'my_custom_message'); function my_custom_message() { if ( isset($_COOKIE['gens_raf']) ) { wc_print_notice( __('This is my custom message'), 'notice' ); } }
Depending on your theme, a customer should see something like: