How to enable QRCode

QRCode functionality is introduce in WPCargo FREE version 6.9.9. To enable QRCode is very simple using the filter hook “wpcargo_qrcode_enable”.

Copy and paste the following code to the theme function.php file


// Enable QRCode
add_filter('wpcargo_qrcode_enable', '__return_true');

To display barcode in any part of the shipment section, “wpcargo_generate_qrcode” function helper is available which accepts a string parameter.


$sample_shipment = '1234567890';
// Generate QR Code for the Given shipment number.
$qr_code =  wpcargo_generate_qrcode( $sample_shipment );
// Display QR Code
echo '<img class="wpcargo_shipment_barcode1" src="'.$qr_code .'" alt="'.$sample_shipment.'" />';

6
    6
    Your Cart
    Remove
    WPCargo Standard Package
    2 X $119.00 = $238.00
    Remove
    Remove
    WPCargo Merchant Package
    2 X $429.90 = $859.80
    Remove
    WPCargo Receiving Add-ons
    1 X $29.00 = $29.00
    Remove
    WPCargo Vehicle Rate
    1 X $79.00 = $79.00
    Remove
    WPCargo Frontend Manager
    1 X $39.00 = $39.00