我试图在this tutorial之后向woocommerce电子邮件添加额外的电子邮件。
基本上,我已经走到了这一步:
<?php
/**
* Plugin Name: WooCommerce Custom Expedited Order Email
* Plugin URI: https://www.skyverge.com/blog/how-to-add-a-custom-woocommerce-email/
* Description: Demo plugin for adding a custom WooCommerce email that sends admins an email when an order is received with expedited shipping
* Author: SkyVerge
* Author URI: http://www.skyverge.com
* Version: 0.1
*
* License: GNU General Public License v3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
/**
* Add a custom email to the list of emails WooCommerce should load
*
* @since 0.1
* @param array $email_classes available email classes
* @return array filtered available email classes
*/
function add_expedited_order_woocommerce_email( $email_classes ) {
// include our custom email class
require( 'includes/class-wc-expedited-order-email.php' );
// add the email class to the list of email classes that WooCommerce loads
$email_classes['WC_Expedited_Order_Email'] = new WC_Expedited_Order_Email();
return $email_classes;
}
add_filter( 'woocommerce_email_classes', 'add_expedited_order_woocommerce_email' );
所以只有前两个步骤 - 请注意,这甚至没有激活插件,当我随机检查woocommerce设置的电子邮件部分时,通常有所有标准电子邮件,只有&#34; new为了&#34;坐在那里。我不知道一个未激活的插件如何做到这一点,我不知道如何解决它。有谁知道我如何收回电子邮件?我查看了ftp,所有的php文件都在那里,它只是因为某种原因没有加载它们。