Hello,
I am trying to understand where comes this new error from.CRITICAL Uncaught ArgumentCountError: Too few arguments to function muxp_email_after_order_table(), 4 passed in /home/XXXXXX/wp-includes/class-wp-hook.php on line 310 and exactly 5 expected in /home/XXXXXX/wp-content/plugins/mxp-sepaqr/muxp-sepaqr.php:98
I guess a wrong number of arguments are passed to the function but still I am not really sure where to start from.
Any help / suggestion would be really appreciated. ??
Is there any option to get the qr smaller on checkout and email?
]]>For PDF-invoices and packaging slips I modified the section as follows:
/* QR-Code in invoices */
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-sepa-qr-code-addon-for-woocommerce/muxp-sepaqr.php';
$muxp_order = wc_get_order( $order);
$order_id = $order->get_id();
if ( !empty($muxp_order->get_total()) && (float)$order->get_total() > 0 ) {
echo '<p>QR-Code for your online banking app<p>';
echo '<img class="muxp-bacs-qrcode" src="' . esc_attr(muxp_get_qrcode($order->get_total(), $order_id)) . '" alt="qr-code" width="100" height="100"></p>';
}
}
That fits better with the style of the invoices.
]]>we are testing this plugin. Thank you very much for your effort.
Can I delete the functions.php line on line 5865? Or do I have to change something in the configuration?
Or does the error message refer to HTTP. ? We test with HTTP and our production system is HTTPS
The following section is inserted in the customer email:
Notice: Die Funktion status wurde fehlerhaft aufgerufen. Order properties should not be accessed directly. Backtrace: edit_post, wp_update_post, wp_insert_post, do_action(‘save_post’), WP_Hook->do_action, WP_Hook->apply_filters, WC_Admin_Meta_Boxes->save_meta_boxes, do_action(‘woocommerce_process_shop_order_meta’), WP_Hook->do_action, WP_Hook->apply_filters, WC_Meta_Box_Order_Actions::save, WC_Emails->customer_invoice, WC_Email_Customer_Invoice->trigger, WC_Email->get_content, WC_Email_Customer_Invoice->get_content_html, wc_get_template_html, wc_get_template, include(‘/plugins/woocommerce/templates/emails/customer-invoice.php’), do_action(‘woocommerce_email_order_details’), WP_Hook->do_action, WP_Hook->apply_filters, WC_Emails->order_details, wc_get_template, include(‘/plugins/woocommerce/templates/emails/email-order-details.php’), do_action(‘woocommerce_email_after_order_table’), WP_Hook->do_action, WP_Hook->apply_filters, muxp_email_after_order_table, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong Weitere Informationen: Debugging in WordPress (engl.). (Diese Meldung wurde in Version 3.0 hinzugefügt.) in /pages/c2/8d/d0014454/home/htdocs/test_technik/wp-includes/functions.php on line 5865
Notice: Die Funktion status wurde fehlerhaft aufgerufen. Order properties should not be accessed directly. Backtrace: edit_post, wp_update_post, wp_insert_post, do_action(‘save_post’), WP_Hook->do_action, WP_Hook->apply_filters, WC_Admin_Meta_Boxes->save_meta_boxes, do_action(‘woocommerce_process_shop_order_meta’), WP_Hook->do_action, WP_Hook->apply_filters, WC_Meta_Box_Order_Actions::save, WC_Emails->customer_invoice, WC_Email_Customer_Invoice->trigger, WC_Email->get_content, WC_Email_Customer_Invoice->get_content_html, wc_get_template_html, wc_get_template, include(‘/plugins/woocommerce/templates/emails/customer-invoice.php’), do_action(‘woocommerce_email_order_details’), WP_Hook->do_action, WP_Hook->apply_filters, WC_Emails->order_details, wc_get_template, include(‘/plugins/woocommerce/templates/emails/email-order-details.php’), do_action(‘woocommerce_email_after_order_table’), WP_Hook->do_action, WP_Hook->apply_filters, muxp_email_after_order_table, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong Weitere Informationen: Debugging in WordPress (engl.). (Diese Meldung wurde in Version 3.0 hinzugefügt.) in /pages/c2/8d/d0014454/home/htdocs/test_technik/wp-includes/functions.php on line 5865
Für eine bequeme Zahlung scanne diesen QR-Code! Einige Emailprogramme zeigen unglücklicherweise keine Base64-kodierten Bilder an. Das tut mir leid!
Hello,
First, thanks for providing this plugin!
It works out of the box for emails and thank you page.
Only with the placement in PDF invoice we have issues.
We are using the same plugin “PDF Invoices & Packing Slips for WooCommerce” as you, placed the the code snipped in child theme function.php, but the QR code will not show up in invoices.
Do we miss anything?
Thanks & regards!
After publishing the plugin I realized the slug has been changed so the code in the reade is incorrect. I pushed the new readme but for the meantime till it is published here is the correct code:
/wp-content/themes/Your(Child)Theme/functions.php
/* QR-Code in invoices */
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-sepa-qr-code-addon-for-woocommerce/muxp-sepaqr.php';
$muxp_order = wc_get_order( $order);
$order_id = $order->get_id();
if ( !empty($muxp_order->get_total()) && (float)$order->get_total() > 0 ) {
echo '<h1>QR-Code for your online banking app<h1>';
echo '<img class="bacs-qrcode" src="' . muxp_get_qrcode($order->get_total(), $order_id) . '" alt="qr-code"></p>';
}
}
]]>