Hi,
there isn’t anything built in that does exactly that, however, the simplest way would probably be to use the following filter like so ( as an example, adjust as required )
add_filter('wppizza_filter_ordervars_formatted', 'myprefix_wppizza_ordervars_formatted');
function myprefix_wppizza_ordervars_formatted($order_parameters){
/* change formatted output if id > 0 , i.e a registered user */
if(!empty($order_parameters['wp_user_id']['value'])){
$wpUserId = $order_parameters['wp_user_id']['value'];
$order_parameters['wp_user_id']['value_formatted'] = 'do: get username from user id (as set in wpUserId above / $order_parameters['wp_user_id']['value'] ) according to wordpress codex';
}
return $order_parameters;
}
and subsequently enable the “User ID :” in the WPPizza->Templates” settings where/as required
hope that helps
-
This reply was modified 2 years, 4 months ago by
ollybach.
-
This reply was modified 2 years, 4 months ago by
ollybach.
Thank you @ollybach please consider this a feature request. All the best
As per your feature request: I couldn’t really see any reason not to add the display name (typically the same as login / nicename) after the user id (if enabled in the templates as referred to above)
So v3.18.7 has this now added.
If you still want this differently somewhat, the above filter is the one that would still let you do that
-
This reply was modified 2 years, 4 months ago by
ollybach.
actually , i made a mistake there in 3.18.7 regarding the above. will be fixed tomorrow.
ok, 3.18.8 should now have this fixed
Thank you, keep up the good work