Display a barcode using a shortcode

The WooCommerce Ultimate Barcodes plugin has a set of shortcodes that could be used to display barcodes easily by passing some parameters.

Product barcode shortcode #

To display a product barcode with the shortcode the product ID is required to be passed:

[wcub_product_barcode id="21"]

Order barcode shortcode #

To display a order barcode with the shortcode the order ID is required to be passed:

[wcub_order_barcode id="231"]

PDF document barcode shortcode #

To display a PDF document barcode with the shortcode the order ID and the document type are required to be passed:

[wcub_document_barcode order_id="231" type="invoice"]

Styling shortcode barcodes #

The shortcode barcodes have specific CSS classes to be used to style this barcodes. For example, if you want to change the size of the different barcodes, you can do like this:

/* product barcode */
.shortcode_wcub_product_barcode .wpo-barcode-wrapper {
	width: 300px;
}
/* order barcode */
.shortcode_wcub_order_barcode .wpo-barcode-wrapper {
	width: 200px;
}
/* PDF document barcode */
.shortcode_wcub_document_barcode .wpo-barcode-wrapper {
	width: 150px;
}