woocommerce/includes/bacs/class-wc-gateway-bacs.php
을 mytheme/includes/bacs/class-wc-gateway-bacs.php
에 템플릿 파일과 같이 바꿀 수 있습니까? 이 순간에 나는 플러그인 코어에서 코드를 변경했지만 업데이트 후에는 다시 변경됩니다.Woocommerce BACS 지불 게이트웨이 계좌 정보 수정
또는 어쩌면 누군가가 function.php
후크 또는 이와 비슷한 파일에서 어떻게 해야할지 알고 있을까요? ,
/**
* Get bank details and place into a list format.
*
* @param int $order_id
*/
private function bank_details($order_id = '') {
if (empty($this->account_details)) {
return;
}
// Get order and store in $order
$order = wc_get_order($order_id);
// Get the order country and country $locale
$country = $order->billing_country;
$locale = $this->get_country_locale();
// Get sortcode label in the $locale array and use appropriate one
$sortcode = isset($locale[ $country ]['sortcode']['label']) ? $locale[ $country ]['sortcode']['label'] : __('Sort Code', 'woocommerce');
$bacs_accounts = apply_filters('woocommerce_bacs_accounts', $this->account_details);
if (! empty($bacs_accounts)) {
echo '<h2 class="wc-bacs-bank-details-heading">' . __('Our Bank Details', 'woocommerce') . '</h2>' . PHP_EOL;
foreach ($bacs_accounts as $bacs_account) {
$bacs_account = (object) $bacs_account;
if ($bacs_account->account_name || $bacs_account->bank_name) {
echo '<h3>' . wp_unslash(implode(' - ', array_filter(array($bacs_account->account_name, $bacs_account->bank_name)))) . '</h3>' . PHP_EOL;
}
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
)
), $order_id);
foreach ($account_fields as $field_key => $field) {
if (! empty($field['value'])) {
echo '<li class="' . esc_attr($field_key) . '">' . esc_attr($field['label']) . ': <strong>' . wptexturize($field['value']) . '</strong></li>' . PHP_EOL;
}
}
echo '</ul>';
}
}
}
난 정말이 도움이 필요
, 설정 해제 있다면 내 영어에 대한 워드 프레스 :
Full code example fiddle(sorry for jsfiddle)
죄송에서 활성화 첫 번째 Bacs 결제 방법 ... Google에서 "BACS를 설정 해제하는 방법"또는 "woocommerce 설정되지 않은 결제 방법"및 "woocommerce 맞춤 결제 방법"과 같은 검색어를 검색합니다. 그런 다음 class-wc-gateway-bacs.php에서 몇 가지 코드를 선택할 수 있습니다. 단지 제안입니다. – LoicTheAztec
감사합니다, 당신은 내게 올바른 길을 주셨습니다. 비슷한 기능을 가진 플러그인을 만들었지 만 다른 변수는 현재 작동 중입니다.) @LoicTheAztec – Baivaras
@LoicTheAztec Done. 정확히 설명하는 방법을 모르지만 최선을 다했습니다. – Baivaras