i was looking for a way to add a new field to woocommerce bank account info, my theme has no child theme and i put my code in functions.php
I found the solution but it doesn't work.
function newfield_bacs_account_field( $account_fields, $order_id ) {
$account_fields['test_added' ] = array(
'label' => __( 'labelfield', 'woocommerce' ),
'value' => __( 'valuefield', 'woocommerce' ),
);
return $account_fields;
}
add_filter( 'woocommerce_bacs_account_fields', 'newfield_bacs_account_field', 10, 2);
i have tried thousands of times but still not working
throw new Error("new BACS fields");
in the same places.