Skip to content

Instantly share code, notes, and snippets.

@aliaramli
Created March 11, 2020 08:54
Show Gist options
  • Save aliaramli/5bc6bff9a735ecedd401f787f43a8bec to your computer and use it in GitHub Desktop.
Save aliaramli/5bc6bff9a735ecedd401f787f43a8bec to your computer and use it in GitHub Desktop.
wcfm code snippet to display seller bank account details.
<p><?php
$vendor_id = 0;
foreach ( $order->get_items() as $item_id => $item ) {
$meta_data = $item->get_formatted_meta_data();
// Get the meta data value of vendor id from one of the order item
$vendor_id = $item->get_meta("_vendor_id");
break;
}
//get vendor data
$vendor_data = get_user_meta( $vendor_id, 'wcfmmp_profile_settings', true );
//get vendor bank account details
$bank_data = $vendor_data['payment']['bank'];
$bank_name = $bank_data['bank_name'];
$account_holder_name = $bank_data['ac_name'];
$account_number = $bank_data['ac_number'];
_e( 'Here is the seller bank account info:', 'woocommerce' ); ?></p>
<b>Bank: </b><?php _e($bank_name, 'woocommerce');?><br/>
<b>Account Number: </b><?php _e($account_number, 'woocommerce');?><br/>
<b>Account Holder Name: </b><?php _e($account_holder_name, 'woocommerce');?><br/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment