• Resolved kyledoesit

    (@kyledoesit)


    I have looked through the forum and haven’t seen anything on this, I am wanting to auto generate a qr code for users who have purchased a membership that has their user data like name, email, phone, address etc. I’m not sure what I would need to do this though.

    This plugin looks like it is very capable and may be able to do this. Would it be first_name last_name? Or [first_name] [last_name]? Maybe using this in combination with ACF? Any guidance would be appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Kaya Studio

    (@kayastudio)

    Hello,
    Thank you for your comment and for using ‘Kaya QR Code Generator’.

    This plugin can indeed generate QR Codes for users, but ‘Kaya QR Code Generator’ don’t provide any data from users, in order to get users data as content you must use another shortcode from an other plugin in addition .

    For example with shortcode, use [kaya_qrcode_dynamic][user_plugin_example_shortcode][/kaya_qrcode_dynamic] or with the widget, you just need to check the checkbox “Use dynamic content (other shortcodes)” with the [user_plugin_example_shortcode] as dynamic content.

    I hope this will answer your question.

    Thank you, best regards.

    Thread Starter kyledoesit

    (@kyledoesit)

    This is perfect, thank you! I managed to add a shortcode to wordpress using a plugin called Code Snippets by Code Snippets Pro as I didn’t want to have to make a child theme and set up the code through the functions file.

    For anyone who needs something like this, I found it here – https://wordpress.stackexchange.com/questions/416704/how-do-i-create-a-shortcode-that-returns-a-logged-in-users-email

    function current_user_email_address() {
        if ( ! is_user_logged_in() ) {
            return '';
        }
    
        $user = wp_get_current_user();
    
        if ( empty( $user->user_email ) ) {
            return '';
        }
    
        return esc_html( $user->user_email );
    }
    add_shortcode( 'current_user_email_address', 'current_user_email_address' );

    and this is the shortcode for the page to display it on

    [kaya_qrcode_dynamic][current_user_email_address][/kaya_qrcode_dynamic]
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.