• Resolved paulfitzwordpress

    (@paulfitzwordpress)


    I am developing a stock re-ordering system in Woocommerce. Ideally I’d like to use the Kaya shortcode plugin to generate QR codes for re-ordering.

    I just need the QR code to redirect people to a url similar to https://www.mysite.com/wp-admin/admin.php?page=woo-qr-stock-manager&product_id=149207

    The challenge I have is that when I call the shortcode from inside my plugin, it doesn’t include an image source.

    Example code below, great plugin by the way.

    Inside my plugin I am using:


    if ( shortcode_exists( 'kaya_qrcode_dynamic' ) ) {
    echo do_shortcode( '[kaya_qrcode_dynamic title="Test Code" title_align="alignnone" querystring="page=woo-qr-stock-manager&product_id=" ecclevel="L" new_window="1" download_button="1" download_text="Download" download_align="alignnone"]https://www.mysite.com.au/wp-admin/admin.php[/kaya_qrcode_dynamic]' );
    } else {
    echo ("No Plugin shortcode exists!\n");
    }

    This generates:

    <!-- START Kaya QR Code Generator --><div class="wpkqcg_qrcode_wrapper"><input type="hidden" id="wpkqcg_qrcode_outputimg_73668a20a0b477c50_ecclevel" value="L" /><input type="hidden" id="wpkqcg_qrcode_outputimg_73668a20a0b477c50_size" value="" /><input type="hidden" id="wpkqcg_qrcode_outputimg_73668a20a0b477c50_border" value="4" /><input type="hidden" id="wpkqcg_qrcode_outputimg_73668a20a0b477c50_color" value="#000000" /><input type="hidden" id="wpkqcg_qrcode_outputimg_73668a20a0b477c50_bgcolor" value="#FFFFFF" /><input type="hidden" id="wpkqcg_qrcode_outputimg_73668a20a0b477c50_content" value="https://www.mysite/wp-admin/admin.php?page=woo-qr-stock-manager" /><img src="" id="wpkqcg_qrcode_outputimg_73668a20a0b477c50" alt="QR Code" class="wpkqcg_qrcode" style="width: auto; height: auto; max-width: 100%;" ><div style="clear: none;"></div></div><!-- END Kaya QR Code Generator -->
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter paulfitzwordpress

    (@paulfitzwordpress)

    Could my issue relate to the plugin not loading the necessary javascript files? Any steps I can take?

    Plugin Author Kaya Studio

    (@kayastudio)

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

    Yes indeed, in order to function correctly, all my plugin files must be loaded, including JavaScript files.

    The image of the QR Code, and therefore the ‘source’ field of the img tag, is generated by my JavaScript functions after processing the shortcode via PHP.

    I hope this is useful to you, don’t hesitate if you have any other questions, or to mark the topic as resolved if so.

    Thank you, kind regards.

    Thread Starter paulfitzwordpress

    (@paulfitzwordpress)

    Thanks for the response. Would I need to just include the JS files or other files as well? If I need to include other files, which ones specifically?

    Thanks in advance.

    Thread Starter paulfitzwordpress

    (@paulfitzwordpress)

    It’s ok, I’ve decided to use another option for it, thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.