我有这种情况 - 我对其中一个woocommerce电子邮件模板进行了更改,但我确定 - 这些更改将在下一次woocommerce更新后丢失.
据我所知,我应该使用主题函数来绕过这个问题.
这是更改前的代码:
echo '<ul class="wc-bacs-bank-details order_details bacs_details">' . PHP_EOL;
// BACS account fields shown on the thanks page and in emails
$account_fields = apply_filters( 'woocommerce_bacs_account_fields', array(
'account_number'=> array(
'label' => __( 'Account Number', 'woocommerce' ),
'value' => $bacs_account->account_number
),
'sort_code' => array(
'label' => $sortcode,
'value' => $bacs_account->sort_code
),
'iban' => array(
'label' => __( 'IBAN', 'woocommerce' ),
'value' => $bacs_account->iban
),
'bic' => array(
'label' => __( 'BIC', 'woocommerce' ),
'value' => $bacs_account->bic
) …Run Code Online (Sandbox Code Playgroud)