首页 文章

WooCommerce已取消电子邮件通知订单到期时未发送

提问于
浏览
2

我已经在woocommerce中设置了库存,并在几分钟后配置了自动取消订单的时间,如果付款没有完成,那么工作正常的订单会在那段时间后被取消,但不会生成电子邮件 . 我已检查电子邮件地址并将模板复制到我的主题但尚未进行任何更改,

要接收电子邮件,如何解决此问题?

注意:新订单电子邮件正在接收,但未取消此订单 .

这是Woocomerce的状态:

### WordPress Environment ###

Home URL: https://www.lfp-store.de
Site URL: https://www.lfp-store.de
WC Version: 3.2.5
Log Directory Writable: ✔
WP Version: 4.9.1
WP Multisite: -
WP Memory Limit: ❌40 MB - We recommend setting the PHP memory limit (memory_limit) to at least 64 MB. See: PHP increase memory limit
WP Debug Mode: -
WP Cron: ✔
Language: de_DE_formal

### Server Environment ###

Server Info: Apache
PHP Version: 06/05/32
PHP Post Max Size: 6 MB
PHP Time Limit: 30
PHP Max Input Vars: 1000
cURL Version: 7.38.0
OpenSSL / 1.0.1t

SUHOSIN Installed: -
MySQL Version: ❌5.5.58 - We recommend at least MySQL version 5.6. See: WordPress Requirements
Max Upload Size: 64 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

### Database ###

WC Database Version: 3.2.5
WC Database Prefix: hcQxuuYa
MaxMind GeoIP Database: ✔
Total database size: 8.75MB
Database data size: 6.55MB
Database index size: 2.20MB
hcQxuuYawoocommerce_sessions: Data: 0.05MB + Index: 0.00MB
hcQxuuYawoocommerce_api_keys: Data: 0.00MB + Index: 0.00MB
hcQxuuYawoocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.01MB
hcQxuuYawoocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB
hcQxuuYawoocommerce_order_items: Data: 0.01MB + Index: 0.01MB
hcQxuuYawoocommerce_order_itemmeta: Data: 0.09MB + Index: 0.07MB
hcQxuuYawoocommerce_tax_rates: Data: 0.00MB + Index: 0.01MB
hcQxuuYawoocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB
hcQxuuYawoocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB
hcQxuuYawoocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.01MB
hcQxuuYawoocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB
hcQxuuYawoocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB
hcQxuuYawoocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB
hcQxuuYawoocommerce_log: Data: 0.02MB + Index: 0.02MB
hcQxuuYacommentmeta: Data: 0.00MB + Index: 0.01MB
hcQxuuYacomments: Data: 0.03MB + Index: 0.02MB
hcQxuuYaduplicator_packages: Data: 0.02MB + Index: 0.02MB
hcQxuuYalayerslider: Data: 0.07MB + Index: 0.00MB
hcQxuuYalayerslider_revisions: Data: 0.02MB + Index: 0.00MB
hcQxuuYalinks: Data: 0.00MB + Index: 0.00MB
hcQxuuYaoptions: Data: 0.58MB + Index: 0.12MB
hcQxuuYapostmeta: Data: 2.82MB + Index: 1.50MB
hcQxuuYaposts: Data: 2.69MB + Index: 0.22MB
hcQxuuYatermmeta: Data: 0.01MB + Index: 0.02MB
hcQxuuYaterms: Data: 0.01MB + Index: 0.03MB
hcQxuuYaterm_relationships: Data: 0.03MB + Index: 0.06MB
hcQxuuYaterm_taxonomy: Data: 0.01MB + Index: 0.01MB
hcQxuuYausermeta: Data: 0.05MB + Index: 0.03MB
hcQxuuYausers: Data: 0.00MB + Index: 0.01MB
hcQxuuYayoast_seo_links: Data: 0.02MB + Index: 0.02MB
hcQxuuYayoast_seo_meta: Data: 0.02MB + Index: 0.00MB

### Post Type Counts ###

attachment: 300
avia_framework_post: 29
nav_menu_item: 46
page: 22
portfolio: 1
post: 1
product: 146
product_variation: 1023
revision: 441
shop_coupon: 61
shop_order: 87

### Security ###

Secure connection (HTTPS): ✔
Hide errors from visitors: ✔

### Active Plugins (8) ###

Loco Translate: by Tim Whitlock - 2.0.17
UpdraftPlus - Backup / Restore: by UpdraftPlus.Com
David Anderson - 1:13:16

Vendidero Helper: from Vendidero - 1.1.4
WooCommerce Germanized Pro: from Vendidero - 1.8.3
WooCommerce Germanized: from Vendidero - 1.9.6
Instant Banking for WooCommerce: by Sven Wagener - 1.3.0
WooCommerce: by Automattic - 3.2.5 - 3.2.6 is available
Yoast SEO: by Team Yoast - 5.9.3

### Settings ###

API Enabled: ✔
Force SSL: ✔
Currency: EUR (€)
Currency Position: right_space
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)

Taxonomies: Product Visibility: exclude-from-catalog
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated -2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)


### WC Pages ###

Shop-Basis: # 578 - / shop /
Warenkorb: # 507 - / cart-2 /
Kasse: # 28 - / checkout-2 /
Mein Konto: # 29 - / my-account /
Geschäftsbedingungen: # 693 - / general_agreement /

### Theme ###

Name: Enfold Child
Version: 1.0
Author URL: http://www.kriesi.at
Child Theme: ✔
Parent Theme Name: enfold
Parent Theme Version: 4.2
Parent Theme Author URL: https://kriesi.at
WooCommerce Support: ✔

### Templates ###

Overrides: enfold-child / woocommerce / emails / admin-canceled-order.php
enfold-child / woocommerce / emails / admin-new-order.php
enfold-child / woocommerce / emails / customer-on-hold-order.php

1 回答

  • 3

    要强制发送“已取消”电子邮件通知,您可以尝试以下操作:

    add_action('woocommerce_order_status_changed', 'cancelled_order_email_notifications', 10, 4 );
    function cancelled_order_email_notifications( $order_id, $old_status, $new_status, $order ){
        // Only when order status is changed to 'cancelled'
        if ( $new_status != 'cancelled' ) return;
    
        // Send cancelled email notification
        WC()->mailer()->get_emails()['WC_Email_Cancelled_Order']->trigger( $order_id ); 
    }
    

    代码位于活动子主题(或活动主题)的function.php文件中 .

    经过测试和工作 .

    注意: - 此电子邮件通知仅发送给管理员 . - 将相关模板文件复制到您的子主题将无助于发送此通知 .

相关问题