Update Wordpress snippet code to display WordPress user Nickname instead of Username
Budget: $10 – $30 USD
Here is the snippet
add_action('woocommerce_before_cart', 'show_referrer_on_cart');
function show_referrer_on_cart() {
if ( affiliatewp_affiliate_info()->functions->get_affiliate_id() ) {
$info = affiliatewp_affiliate_info()->functions;
$name = $info->get_affiliate_name();
echo '<p>A portion of your purchase price will benefit <b> ' . $name . '<b></p>';
}
}
add_action('woocommerce_before_checkout_form', 'show_referrer_on_checkout');
function show_referrer_on_checkout() {
if ( affiliatewp_affiliate_info()->functions->get_affiliate_id() ) {
$info = affiliatewp_affiliate_info()->functions;
$name = $info->get_affiliate_name();
echo '<p>A portion of your purchase price will benefit <b> ' . $name . '<b></p>';
}
}
add_action('woocommerce_email_after_order_table', 'show_referrer_on_email');
function show_referrer_on_email() {
if ( affiliatewp_affiliate_info()->functions->get_affiliate_id() ) {
$info = affiliatewp_affiliate_info()->functions;
$name = $info->get_affiliate_name();
echo '<p>A portion of your purchase price will benefit <b> ' . $name . '<b></p>';
}
}
add_action('woocommerce_before_cart', 'show_referrer_on_cart');
function show_referrer_on_cart() {
if ( affiliatewp_affiliate_info()->functions->get_affiliate_id() ) {
$info = affiliatewp_affiliate_info()->functions;
$name = $info->get_affiliate_name();
echo '<p>A portion of your purchase price will benefit <b> ' . $name . '<b></p>';
}
}
add_action('woocommerce_before_checkout_form', 'show_referrer_on_checkout');
function show_referrer_on_checkout() {
if ( affiliatewp_affiliate_info()->functions->get_affiliate_id() ) {
$info = affiliatewp_affiliate_info()->functions;
$name = $info->get_affiliate_name();
echo '<p>A portion of your purchase price will benefit <b> ' . $name . '<b></p>';
}
}
add_action('woocommerce_email_after_order_table', 'show_referrer_on_email');
function show_referrer_on_email() {
if ( affiliatewp_affiliate_info()->functions->get_affiliate_id() ) {
$info = affiliatewp_affiliate_info()->functions;
$name = $info->get_affiliate_name();
echo '<p>A portion of your purchase price will benefit <b> ' . $name . '<b></p>';
}
}