PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.9
4.4.9.1 4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 All 141 releases
← All changes | assets/src/js/frontend/course-builder/builder-question/builder-edit-question.js +4 -12 4.3.7 → 4.4.9 View file →
@@ -195,14 +195,10 @@
195 195
196 196 // Reset form state before potential redirect.
197 197 document.dispatchEvent( new CustomEvent( 'lp-course-builder-saved' ) );
198 198
199 - if ( data?.question_id_new ) {
200 - const currentUrl = window.location.href;
201 - window.location.href = currentUrl.replace(
202 - /post-new\/?/,
203 - `${ data.question_id_new }/`
204 - );
199 + if ( data?.redirect_url ) {
200 + window.location.href = data.redirect_url;
205 201 }
206 202
207 203 if ( data?.status ) {
208 204 const elStatus = document.querySelector(
@@ -1046,14 +1042,10 @@
1046 1042
1047 1043 // Reset form state before potential redirect.
1048 1044 document.dispatchEvent( new CustomEvent( 'lp-course-builder-saved' ) );
1049 1045
1050 - if ( data?.question_id_new ) {
1051 - const currentUrl = window.location.href;
1052 - window.location.href = currentUrl.replace(
1053 - /post-new\/?/,
1054 - `${ data.question_id_new }/`
1055 - );
1046 + if ( data?.redirect_url ) {
1047 + window.location.href = data.redirect_url;
1056 1048 }
1057 1049
1058 1050 if ( data?.status ) {
1059 1051 const elStatus = document.querySelector(