Output the barcode image with PHP

Forums EAN and Barcodes for WooCommerce Output the barcode image with PHP

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #85190
    Tom Anbinder
    Moderator
    Plugin Support

    Hi,

    I would suggest using the do_shortcode() function with our [alg_wc_ean_barcode] and/or [alg_wc_ean_barcode_2d] shortcodes, like this:

    echo do_shortcode( '[alg_wc_ean_barcode]' );
    echo do_shortcode( '[alg_wc_ean_barcode_2d]' );

    And if you need to specify the product ID then:

    echo do_shortcode( '[alg_wc_ean_barcode product_id="' . $product_id . '"]' );
    echo do_shortcode( '[alg_wc_ean_barcode_2d product_id="' . $product_id . '"]' );

    Please give it a try and let me know what you think.

    #85191
    IOWEB
    Participant

    Hi that seems to work.

    Thank you.

    #85192
    Tom Anbinder
    Moderator
    Plugin Support

    Hi,

    Happy to hear it’s solved. Let me know if you’ll need anything else.

    And if you like the plugin, please consider leaving me a rating here or here.

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