• Resolved baz74

    (@baz74)


    We would like to improve the sequence of BACS details displayed on the ‘Thank you’ page, and on the email to the customer.
    Woo displays ‘Account Number‘ before ‘Sort Code‘, but in the English speaking word the usual sequence is ‘Sort Code‘ then ‘Account Number‘.
    And we would like to ADD ‘Reference’ and the Order Number’
    (in addition to the textual instruction “Please use your Order ID as the payment reference

    We found code to requence the details here: https://wpmudev.com/forums/topic/woocommerce-reorder-bank-details/#
    but (when we try it) it displays TWICE! What’s wrong? This is our copy:

    add_filter('woocommerce_bacs_account_fields','custom_bacs_fields');
    
    function custom_bacs_fields() {
    global $wpdb;
    $account_details = get_option( 'woocommerce_bacs_accounts',
    array(
       array(
    	'account_name'   => get_option( 'account_name' ),
    	'account_number' => get_option( 'account_number' ),
    	'sort_code'      => get_option( 'sort_code' ),
    	'bank_name'      => get_option( 'bank_name' ),
             /*   Order Number    ????    */
    	'iban'           => get_option( 'iban' ),
    	'bic'            => get_option( 'bic' )
       )
    )
    );
    $account_fields = array(
    'bank_name'      => array(
    'label' => 'Bank',
    'value' => $account_details[0]['bank_name']
    ),
    
    'sort_code' => array(
    'label' => __( 'Sort Code', 'woocommerce' ),
    'value' => $account_details[0]['sort_code']
    ),
    
    'account_number' => array(
    'label' => __( 'Account Number', 'woocommerce' ),
    'value' => $account_details[0]['account_number']
    ),
    	
    /*      Order Number     ??????????
    'ref' => array(
    'label' => __( 'Ref', 'woocommerce' ),
    'value' => $order_details[0]['order_number']
    ),
    */	
    	
    'iban' => array(
    'label' => __( 'iban', 'woocommerce' ),
    'value' => $account_details[0]['iban']
    ),
    	
    'bic' => array(
    'label' => __( 'bic', 'woocommerce' ),
    'value' => $account_details[0]['bic']
    )
    	
    );
     return $account_fields;
    } 

    What should be inserted in the sections above currently: “/* Order Number ?????? */”

    And how do we insert our change into the email?

    • This topic was modified 12 months ago by baz74.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @baz74,

    For reference, these particular forums are meant for general support with the core functionality of WooCommerce itself. For development and custom coding questions, it’s best to ask for insight related to those on either the WooCommerce Advanced Facebook group or the WooCommerce Community Slack. Many of our developers hang out there and will be able to offer insights into your question. You can also seek help from the following:

    I wish I could help more, but hopefully, this gets you going in the right direction to get some further insight/information.

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

    Thread Starter baz74

    (@baz74)

    When we added our Direct Bank Transfer detail into woo>>settings, there was a blank line underneath the line we had entered. Even though blank – it generated the 2nd line.
    We deleted the blank line in settings … and the 2nd line disappeared on the Thank you page.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @baz74,

    I’m glad you were able to find a solution to your inquiry here and thanks for sharing it with the community too! ??

    Should you have further inquiries, kindly create a new topic here.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Improve BACS details displayed’ is closed to new replies.