Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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