lukecb
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] E-mail add SKUThanks for the reply.
One more question. Is it possible to increase the width of the sent email in the template?
Forum: Plugins
In reply to: [WooCommerce] REST API – coupon_lines discount 0That 0 is displayed when calling the order
https://elabela.cz/wp-json/wc/v3/orders/6977/?
"discount_total": "150.00",
"discount_tax": "0.00"
"coupon_lines": [
{
"id": 3325,
"code": "domi15",
"discount": "0",
"discount_tax": "0",
"meta_data": [
{
"id": 31333,
"key": "coupon_info",
"value": "[11910,\"domi15\",\"percent\",15]",
"display_key": "coupon_info",
"display_value": "[11910,\"domi15\",\"percent\",15]"
}
],
"discount_type": "percent",
"nominal_amount": 15,
"free_shipping": false
}
],Forum: Plugins
In reply to: [WooCommerce] REST API – coupon_lines discount 0Hi,
The coupon was used by the customer in the cart.
Some orders have it right. This is an example that has 0 in the REST API 22521025:
https://snipboard.io/ce3QUJ.jpg
REST API:
https://snipboard.io/0batkI.jpg
Thanks
Forum: Plugins
In reply to: [WooCommerce] REST API – coupon_lines discount 0I send: https://pastebin.com/k23iffcV
Thank you
Forum: Plugins
In reply to: [WooCommerce] REST API – coupon_lines discount 0On the customer and sales side, the amount and discount are displayed correctly.
We call the value to accounting via REST API and sometimes zero is displayed there, see first post.
Thank you
Forum: Plugins
In reply to: [WooCommerce] REST API – coupon_lines discount 0The coupon was entered directly in the cart by the customer.
I don’t know what letters the customer entered the coupon in. The system automatically always converts it to lowercase, even if the customer enters it in uppercase.
Sorry, I was on vacation. Ticket submitted.
It will happen, maybe one day. So the e-shop cannot be switched to a different template for a long time. I haven’t found anything in the log yet.
This happens with Cancelled Order and New Order for both the administrator and the customer.
We have two physically separate websites elabela.cz and elabela.sk and it does it on all of them. On one website, all plugins, wordpress, wocommerce were updated. Template Envo eCommerce PRO.
The error still occurs with some emails.
So now an email came in without formatting. I can’t find where the problem could be.
I’ll try setting a 3s delay for sending emails to see if there’s a timing problem:
add_action( 'init', function() {
if ( ! class_exists( 'WC_Emails' ) ) return;
$mailer = WC()->mailer();
$emails = $mailer->get_emails();
foreach ( $emails as $email_id => $email_obj ) {
// Odpojíme automatické odesílání
add_filter( "woocommerce_email_enabled_{$email_id}", function( $enabled, $order ) use ( $email_id ) {
if ( $enabled && $order instanceof WC_Order ) {
wc_schedule_single_action( time() + 3, 'custom_delayed_email_send', [
'email_id' => $email_id,
'order_id' => $order->get_id()
] );
return false;
}
return $enabled;
}, 10, 2 );
}
});
add_action( 'custom_delayed_email_send', function( $args ) {
if ( empty( $args['email_id'] ) || empty( $args['order_id'] ) ) return;
$email_id = $args['email_id'];
$order_id = $args['order_id'];
$mailer = WC()->mailer();
$emails = $mailer->get_emails();
if ( isset( $emails[ $email_id ] ) ) {
$emails[ $email_id ]->trigger( $order_id );
}
} );- This reply was modified 10 months, 3 weeks ago by lukecb.
Hi,
it started in early June. I have updated all components now and will monitor it.
If the problem occurs again, I will report back in this thread.
Thank you, that’s it.
Forum: Plugins
In reply to: [Mergado Pack] Uncaught TypeError: mergado-marketing-pack/src/ServiceVerze WooCommerce:8.8.3
Verze WordPress:6.5.3
Mergado marketing pack: 3.7.3
Forum: Plugins
In reply to: [Mergado Pack] Uncaught TypeError: mergado-marketing-pack/src/ServiceDobrý den,
využíváme jen výchozí kupóny Woocommerce.
Děkuji za pomoc