Skip to content

Commit

Permalink
Exclude payment from checkout if plugin not active
Browse files Browse the repository at this point in the history
  • Loading branch information
sazedul-haque committed Jan 30, 2025
1 parent 4c2baa1 commit 675d8d9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions includes/tutor-general-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1448,6 +1448,13 @@ function tutor_get_all_active_payment_gateways() {
continue;
}

$name = $method['name'];
$basename = "tutor-{$name}/tutor-{$name}.php";
$is_plugin_activated = is_plugin_active( $basename );
if ( ! $is_manual && ! $is_plugin_activated ) {
continue;
}

$fields = $method['fields'];
unset( $method['fields'] );

Expand Down

0 comments on commit 675d8d9

Please sign in to comment.