Woocommerce - 如何编辑感谢页面中显示的银行详细信息?

问题描述 投票:0回答:1

我正在尝试在 Woocommerce 感谢页面上设计银行详细信息。我要编辑的突出显示部分显示在随附的屏幕截图中。

enter image description here

以防万一您需要上面显示的 HTML 代码:

<div class="fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column">
  <div class="fusion-separator fusion-no-medium-visibility fusion-no-large-visibility fusion-full-width-sep" style="align-self: center;margin-left: auto;margin-right: auto;margin-top:45px;margin-bottom:45px;width:100%;">
    <div class="fusion-separator-border sep-single sep-solid" style="--awb-height:20px;--awb-amount:20px;--awb-sep-color:rgba(101,106,112,0.33);border-color:rgba(101,106,112,0.33);border-top-width:1px;"></div>
  </div>
  <section class="awb-woo-order-additional-info awb-woo-order-additional-info--1">
    <section class="woocommerce-bacs-bank-details">
      <h2 class="wc-bacs-bank-details-heading fusion-responsive-typography-calculated" data-fontsize="44" style="--fontSize: 44; line-height: 1.26;" data-lineheight="55.44px">Naše bankovní spojení</h2>
      <h3 class="wc-bacs-bank-details-account-name fusion-responsive-typography-calculated" data-fontsize="28" style="--fontSize: 28; line-height: 1.32;" data-lineheight="36.96px">FIO:</h3>
      <ul class="wc-bacs-bank-details order_details bacs_details">
        <li class="bank_name">Banka: <strong>FIO banka a.s.</strong>
        </li>
        <li class="account_number">Číslo účtu: <strong>2202681982/2010</strong>
        </li>
        <li class="iban">IBAN: <strong>CZ6620100000002202681982</strong>
        </li>
        <li class="bic">BIC: <strong>FIOBCZPPXXX</strong>
        </li>
      </ul>
    </section>
    <img decoding="async" class="qrcodecz" alt="QR platba" src="https://api.paylibo.com/paylibo/generator/czech/image?accountNumber=2202681982&amp;bankCode=2010&amp;amount=11152.50&amp;currency=CZK&amp;vs=4626&amp;message=svetvramu.cz&amp;size=200">
    <h2 class="woocommerce-order-details__title fusion-responsive-typography-calculated" data-fontsize="44" style="--fontSize: 44; line-height: 1.26;" data-lineheight="55.44px"> Order extra</h2>
    <table class="woocommerce-table shop_table order_details">
      <tbody></tbody>
    </table>
  </section>
</div>

我想要做的是将二维码放在列表之前,并且两者应该在一行中(首先是二维码,其次是有关银行详细信息的文本信息)。

对于二维码生成,我在functions.php中使用自定义代码,附在下面:

add_action( 'woocommerce_thankyou', 'display_order_received_qr_code', 10, 1 );
function display_order_received_qr_code( $order_id ) { 
    $order = wc_get_order($order_id);

    printf('<img class="qrcodecz" alt="QR platba" src="%s" />', 
        add_query_arg( array(
            'accountNumber' => '2202681982',
            'bankCode'      => '2010',
            'amount'        => $order->get_total(),
            'currency'      => 'CZK',
            'vs'            => $order->get_order_number(),
            'message'       => 'svetvramu.cz',
            'size'          => 200,
        ), 'https://api.paylibo.com/paylibo/generator/czech/image' ),
    );
}

您能给我一个提示吗,编辑此详细信息的位置在哪里?我试图通过thankyou.php 文件编辑它,但我可能无法正确完成,或者我不在正确的位置。

php wordpress woocommerce checkout orders
1个回答
0
投票

您可以尝试这个插件“WooCommerce 的感谢页面定制器”

© www.soinside.com 2019 - 2024. All rights reserved.