This filter function enables you to define multiple Lloyds accounts on your website, allowing you to switch between accounts based on the order ID. The sample code provided below creates an array to hold the account details, including the store name and shared secret key.
Please use the following sample code as a reference and modify it as per your requirements:
add_filter( 'ag_multi_account', 'custom_multi_account' );
function custom_multi_account( $order_id ) {
// Create an array to hold the account details
$account = array();
// Here is where you can work out your logic to switch accounts based on the order ID
// It's important that the array keys match the following
$account['storename'] = 'store name here';
$account['sharedsecret'] = 'shared secret here';
// Return the array
return $account;
}Was this helpful?

Our team are on hand to provide fast, helpful and professional support.
Start exploring our fully functional demo site today.
Gain exclusive admin access to see what's possible.