Skip to content

Commit

Permalink
Mollie: re-order gateway display
Browse files Browse the repository at this point in the history
  • Loading branch information
bekarice committed Feb 15, 2016
1 parent 1156b91 commit 1fadac9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
Empty file removed woocommerce-gateway-mollie/.keep
Empty file.
27 changes: 27 additions & 0 deletions woocommerce-gateway-mollie/re-order-gateway-display.php
@@ -0,0 +1,27 @@
<?php // only keep this line if needed

/**
* Re-orders the display of enabled gateways with WC Mollie
*
* @param array $gateways the available gateways
* @return array the updated gateway list
*/
function sv_wc_mollie_reorder_gateways( $gateways ) {

$gateway_order = array(
// Rearrange these payment options into the order you wish
'WC_Gateway_Mollie_iDEAL',
'WC_Gateway_Mollie_CreditCard',
'WC_Gateway_Mollie_MisterCash',
'WC_Gateway_Mollie_BankTransfer',
'WC_Gateway_Mollie_Bitcoin',
'WC_Gateway_Mollie_PayPal',
'WC_Gateway_Mollie_Paysafecard',
'WC_Gateway_Mollie_SOFORT',
'WC_Gateway_Mollie_Belfius',
);

return array_intersect( $gateway_order, $gateways );

}
add_filter( 'wc_gateway_mollie_gateways', 'sv_wc_mollie_reorder_gateways' );

0 comments on commit 1fadac9

Please sign in to comment.