Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: improve the fix
Browse files Browse the repository at this point in the history
MaferMazu committed Nov 8, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent cc4808e commit 5e99614
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -214,7 +214,8 @@ public function save_action( $post_id, $post ) {
return;
}

$enrollment_arr = array();
$enrollment_arr = array();
$enrollment_action = '';

if ( isset( $_POST['enrollment_course_id'] ) ) {
$enrollment_arr['enrollment_course_id'] = sanitize_text_field( wp_unslash( $_POST['enrollment_course_id'] ) );
@@ -267,10 +268,6 @@ public function save_action( $post_id, $post ) {
$enrollment_action = 'enrollment_sync';
}

if ( ! isset( $enrollment_action ) ) {
$enrollment_action = '';
}

$this->save_enrollment( $post, $enrollment_arr, $enrollment_action );
}

0 comments on commit 5e99614

Please sign in to comment.