Skip to content

Commit

Permalink
Merge pull request #132 from dparker1005/prefix-level-fix
Browse files Browse the repository at this point in the history
No longer pulling level from $_REQUEST
  • Loading branch information
dparker1005 authored Nov 15, 2023
2 parents e672559 + b573f29 commit 50041c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,14 @@ function pmpromc_pmpro_checkout_before_change_membership_level() {
*
* @param int $user_id of user who checked out.
*/
function pmpromc_pmpro_after_checkout( $user_id ) {
pmpromc_pmpro_after_change_membership_level( $_REQUEST['level'], $user_id );
function pmpromc_pmpro_after_checkout( $user_id, $order ) {
pmpromc_pmpro_after_change_membership_level( $order->membership_id, $user_id );
if ( empty( $_REQUEST['additional_lists'] ) ) {
$_REQUEST['additional_lists'] = array();
}
pmpromc_set_user_additional_list_meta( $user_id, $_REQUEST['additional_lists'] );
}
add_action( 'pmpro_after_checkout', 'pmpromc_pmpro_after_checkout', 15 );
add_action( 'pmpro_after_checkout', 'pmpromc_pmpro_after_checkout', 15, 2 );

function pmpromc_log( $entry ) {
$options = get_option( 'pmpromc_options' );
Expand Down

0 comments on commit 50041c2

Please sign in to comment.