Last active
August 29, 2015 14:04
-
-
Save tribulant/05e4e0ef4ca0d99e82cc to your computer and use it in GitHub Desktop.
checkout_extensions_list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function extensions_list($extensions = array()) { | |
$extensions['guestcheckout'] = array( | |
'name' => "Guest Checkout", | |
'link' => "http://domain.com", | |
'image' => plugins_url() . '/mypmethod/images/icon.png', | |
'description' => __("My Payment Method for the Shopping Cart plugin.", 'mypmethod'), | |
'slug' => 'mypmethod', | |
'plugin_name' => 'mypmethod', | |
'plugin_file' => 'mypmethod.php', | |
'settings' => '?page=link-to-settings-page', | |
); | |
$titles = array(); | |
foreach ($extensions as $extension) { | |
$titles[] = $extension['name']; | |
} | |
array_multisort($titles, SORT_ASC, $extensions); | |
return $extensions; | |
} | |
add_filter('checkout_extensions_list', 'extensions_list', 10, 1); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment