0

from days i have a problem, sorry for my bad english.

I've wordpress with buddypress + woocommerce + wc vendors pro.

I need show member products list inside his buddypress profile.

This list is called by shortcode:

echo do_shortcode( '[wcv_products vendor="USERNAMEHERE"]' ); 

I think to resolve with the user buddypress fullname into shortcode.

I try with:

$myhope = bp_core_get_user_displayname(bp_user_fullname() );
echo do_shortcode( '[wcv_products vendor="'.$myhope.'"]' );

But without success. The page is blank. I wrong the sintax?

Thanks!!

0

I don't think you want the display name - it may not be unique.

Try using the log-in name instead.

The user name for the displayed profile:

$myhope = bp_get_displayed_user_username();

The user name for the current user:

 $current_user = wp_get_current_user();
 $myhope = $current_user->user_login;
  • If the answer was helpful, please accept it: stackoverflow.com/help/someone-answers – shanebp Oct 1 '18 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.