Created
September 28, 2016 20:51
-
-
Save greenhornet79/418f45a20c04ea7ae51d8d83a2ed31a8 to your computer and use it in GitHub Desktop.
alter the subscription card order
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 | |
/* Alter subscription card order */ | |
add_filter( 'leaky_paywall_subscription_levels', 'zeen101_alter_subscription_card_order' ); | |
function zeen101_alter_subscription_card_order( $levels ) { | |
$yearly = $levels[0]; | |
$monthly = $levels[1]; | |
$corporate = $levels[2]; | |
// set the array key as the original level_id, but put the levels in the order you want | |
$sorted_levels = array( '1' => $monthly, '0' => $yearly, '2' => $corporate ); | |
return $sorted_levels; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment