Hey @eugyenoch,
Thank you for reaching out! Currently, we don’t have a built-in shortcode to output the affiliate’s first name.
Even so, you can add the following code snippet to your website to register the [slicewp_custom_shortcode_affiliate_first_name] custom shortcode. Once registered, this shortcode can be used to display the affiliate’s first name.
function slicewp_custom_shortcode_affiliate_first_name() {
$affiliate = slicewp_get_affiliate( slicewp_get_current_affiliate_id() );
if ( empty( $affiliate ) ) {
return '';
}
$user = get_userdata( $affiliate->get( 'user_id' ) );
if ( empty( $user ) ) {
return '';
}
return $user->first_name;
}
add_shortcode( 'slicewp_custom_shortcode_affiliate_first_name', 'slicewp_custom_shortcode_affiliate_first_name' );
Thank you and best wishes,
Mihai