Created
June 21, 2018 00:29
-
-
Save thomasplevy/d5b74f9c7781d767b98a09ef06e7f9fb to your computer and use it in GitHub Desktop.
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 // dont copy this line to your functions.php file | |
/** | |
* Customize which order statuses student can resubscribe from | |
* @param array $statuses array of order statuses | |
* default statuses: [ 'llms-pending-cancel', 'llms-pending', 'llms-on-hold' ] | |
* @return array | |
*/ | |
function my_llms_order_status_can_resubscribe_from( $statuses ) { | |
unset( $statuses['llms-pending-cancel'] ); // this would make it so "Pending Cancellation" orders cannot be resubscribed from | |
$statuses[] = 'llms-failed'; // this allows "Failed" orders to be resubscribed to | |
return $statuses; | |
} | |
add_filter( 'llms_order_status_can_resubscribe_from', 'my_llms_order_status_can_resubscribe_from' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment