Skip to content

Commit

Permalink
Merge pull request #1420 from misenhower/fix-start-course-form
Browse files Browse the repository at this point in the history
Fix the "start taking this course" button when generated from a different page
  • Loading branch information
kraftbj committed May 5, 2016
2 parents fa8d726 + 5b0f567 commit be67e3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/template-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function sensei_start_course_form( $course_id ) {
$prerequisite_complete = sensei_check_prerequisite_course( $course_id );

if ( $prerequisite_complete ) {
?><form method="POST" action="<?php echo esc_url( get_permalink() ); ?>">
?><form method="POST" action="<?php echo esc_url( get_permalink( $course_id ) ); ?>">

<input type="hidden" name="<?php echo esc_attr( 'woothemes_sensei_start_course_noonce' ); ?>" id="<?php echo esc_attr( 'woothemes_sensei_start_course_noonce' ); ?>" value="<?php echo esc_attr( wp_create_nonce( 'woothemes_sensei_start_course_noonce' ) ); ?>" />

Expand Down

0 comments on commit be67e3b

Please sign in to comment.