Closed vortexfoto closed 2 years ago
I would love to have this function as well. As for my part a professional programmer created the first bit - the plugin itself. Which plugin are you using for PDF-invoices? Maybe you can contact your plugin provider. As this plugin is free and I am not a programmer I cannot give any assistance on this – as said before would love to have this functionality as well.
Any chance we can get in touch with the original programmer who made the base of this plugin?
I can do that. I will ask him about the effort on monday as I will see him then.
He is on holiday now however will have a look at it after his holidays.
also have a look at https://github.com/Coernel82/SEPA-QR-for-Woocommerce/issues/10
After a bit of research i figured it out myself. What you need is the hook of your other plugin which creates the pdfs, for instance this:
/* QR-Code in Rechnungen */
add_action( 'wpo_wcpdf_after_order_details', 'wpo_wcpdf_qr_code', 10, 2 );
function wpo_wcpdf_qr_code ($document_type, $order) {
require_once WP_PLUGIN_DIR . '/mxp-sepaqr/mxp-sepaqr.php';
$mxp_order = wc_get_order( $order);
$order_id = $order->get_id();
if ( !empty($mxp_order->get_total()) && (float)$order->get_total() > 0 ) {
echo '<img class="bcas-qrcode" src="' . mxp_get_qrcode($order->get_total(), $order_id) . '" alt="qr-code"></p>';
}
}
Could you please give info on what code to insert to html to display QR code in other programs / plugins like PDF invoices
thanks