Skip to content

Instantly share code, notes, and snippets.

@greenhornet79
Created September 28, 2016 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greenhornet79/418f45a20c04ea7ae51d8d83a2ed31a8 to your computer and use it in GitHub Desktop.
Save greenhornet79/418f45a20c04ea7ae51d8d83a2ed31a8 to your computer and use it in GitHub Desktop.
alter the subscription card order
<?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