WP User Frontend – Membership, Profile, Registration & Post Submission Plugin for WordPress - Version 3.1.3

Version Description

Download this release

Release Info

Developer rabbii
Plugin Icon 128x128 WP User Frontend – Membership, Profile, Registration & Post Submission Plugin for WordPress
Version 3.1.3
Comparing to
See all releases

Code changes from version 3.1.2 to 3.1.3

assets/js/wpuf-form-builder-components.js CHANGED
@@ -780,13 +780,22 @@ Vue.component('form-checkbox_field', {
780
  /**
781
  * Field template: Column Field
782
  */
 
 
 
 
 
 
 
 
 
 
 
 
783
  Vue.component('form-column_field', {
784
  template: '#tmpl-wpuf-form-column_field',
785
 
786
- mixins: [
787
- wpuf_mixins.form_field_mixin,
788
- window.wpuf_forms_mixin_builder_stage
789
- ],
790
 
791
  data() {
792
  return{
780
  /**
781
  * Field template: Column Field
782
  */
783
+ const mixins = [
784
+ wpuf_mixins.form_field_mixin
785
+ ];
786
+
787
+ if (window.wpuf_forms_mixin_builder_stage) {
788
+ mixins.push(window.wpuf_forms_mixin_builder_stage);
789
+ }
790
+
791
+ if (window.weforms_mixin_builder_stage) {
792
+ mixins.push(window.weforms_mixin_builder_stage);
793
+ }
794
+
795
  Vue.component('form-column_field', {
796
  template: '#tmpl-wpuf-form-column_field',
797
 
798
+ mixins: mixins,
 
 
 
799
 
800
  data() {
801
  return{
class/payment.php CHANGED
@@ -215,7 +215,7 @@ class WPUF_Payment {
215
  $current_user = wpuf_get_user();
216
 
217
  $current_pack = $current_user->subscription()->current_pack();
218
- if ( $force_pack && is_wp_error( $current_pack ) && $fallback_enabled ) {
219
  $post_cost = $fallback_cost;
220
  $billing_amount = apply_filters( 'wpuf_payment_amount', $fallback_cost );
221
  } else {
215
  $current_user = wpuf_get_user();
216
 
217
  $current_pack = $current_user->subscription()->current_pack();
218
+ if ( $force_pack && !is_wp_error( $current_pack ) && $fallback_enabled ) {
219
  $post_cost = $fallback_cost;
220
  $billing_amount = apply_filters( 'wpuf_payment_amount', $fallback_cost );
221
  } else {
class/subscription.php CHANGED
@@ -450,7 +450,8 @@ class WPUF_Subscription {
450
  $current_pack = $current_user->subscription()->current_pack();
451
  $has_post = $current_user->subscription()->has_post_count( $form_settings['post_type'] );
452
 
453
- if ( $payment_options && $force_pack && is_wp_error( $current_pack ) && $fallback_cost && !$has_post ) {
 
454
  $postdata['post_status'] = 'pending';
455
  }
456
 
@@ -495,9 +496,8 @@ class WPUF_Subscription {
495
 
496
  $old_status = $post->post_status;
497
  wp_transition_post_status( $post_status, $old_status, $post );
498
- // wp_update_post( array( 'ID' => $post_id , 'post_status' => $post_status) );
499
 
500
- // decrease the post count, if not umlimited
501
  $wpuf_post_status = get_post_meta( $post_id, 'wpuf_post_status', true );
502
 
503
  if ( $wpuf_post_status != 'new_draft' ) {
@@ -506,11 +506,12 @@ class WPUF_Subscription {
506
  $this->update_user_subscription_meta( $userdata->ID, $sub_info );
507
  }
508
  }
 
509
  //meta added to make post have flag if post is published
510
  update_post_meta( $post_id, 'wpuf_post_status', 'published' );
511
 
512
 
513
- } elseif ( !$force_pack && ( $pay_per_post || ( $fallback_cost && !$has_post ) ) ) {
514
  //there is some error and it needs payment
515
  //add a uniqid to track the post easily
516
  $order_id = uniqid( rand( 10, 1000 ), false );
450
  $current_pack = $current_user->subscription()->current_pack();
451
  $has_post = $current_user->subscription()->has_post_count( $form_settings['post_type'] );
452
 
453
+
454
+ if ( $payment_options && $force_pack && !is_wp_error( $current_pack ) && $fallback_cost && !$has_post ) {
455
  $postdata['post_status'] = 'pending';
456
  }
457
 
496
 
497
  $old_status = $post->post_status;
498
  wp_transition_post_status( $post_status, $old_status, $post );
 
499
 
500
+ // decrease the post count, if not unlimited
501
  $wpuf_post_status = get_post_meta( $post_id, 'wpuf_post_status', true );
502
 
503
  if ( $wpuf_post_status != 'new_draft' ) {
506
  $this->update_user_subscription_meta( $userdata->ID, $sub_info );
507
  }
508
  }
509
+
510
  //meta added to make post have flag if post is published
511
  update_post_meta( $post_id, 'wpuf_post_status', 'published' );
512
 
513
 
514
+ } elseif ( $force_pack && $fallback_cost && !$has_post ) {
515
  //there is some error and it needs payment
516
  //add a uniqid to track the post easily
517
  $order_id = uniqid( rand( 10, 1000 ), false );
includes/countries-formated.php CHANGED
@@ -74,7 +74,7 @@ $countries = array(
74
  'code' => 'BH',
75
  ),
76
  array(
77
- 'name' => 'Bangladesh',
78
  'code' => 'BD',
79
  ),
80
  array(
74
  'code' => 'BH',
75
  ),
76
  array(
77
+ 'name' => __('Bangladesh', 'wp-user-frontend'),
78
  'code' => 'BD',
79
  ),
80
  array(
includes/fields/class-field-checkbox.php CHANGED
@@ -33,7 +33,12 @@ class WPUF_Form_Field_Checkbox extends WPUF_Field_Contract {
33
  } elseif ( is_array( $value ) ) {
34
  $selected = $value;
35
  } else {
36
- $selected = explode( "|", $value );
 
 
 
 
 
37
  }
38
  } else {
39
 
@@ -45,7 +50,7 @@ class WPUF_Form_Field_Checkbox extends WPUF_Field_Contract {
45
 
46
  ?>
47
 
48
- <div class="wpuf-fields" data-required="<?php echo $field_settings['required'] ?>" data-type="checkbox">
49
 
50
  <?php
51
  if ( $field_settings['options'] && count( $field_settings['options'] ) > 0 ) {
33
  } elseif ( is_array( $value ) ) {
34
  $selected = $value;
35
  } else {
36
+ $selected = array();
37
+ $selected_options = explode( "|", $value );
38
+
39
+ foreach ($selected_options as $option) {
40
+ array_push($selected, trim($option));
41
+ }
42
  }
43
  } else {
44
 
50
 
51
  ?>
52
 
53
+ <div class="wpuf-fields" data-required="<?php echo $field_settings['required'] ?>" data-type="radio">
54
 
55
  <?php
56
  if ( $field_settings['options'] && count( $field_settings['options'] ) > 0 ) {
languages/wp-user-frontend.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the GPL2 or later.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WP User Frontend 3.1.2\n"
6
  "Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
7
- "POT-Creation-Date: 2019-04-01 11:49:50+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -142,7 +142,7 @@ msgstr ""
142
 
143
  #: admin/class-admin-subscription.php:216
144
  #: admin/class-admin-subscription.php:570 class/frontend-account.php:244
145
- #: class/subscription.php:866 includes/class-user-subscription.php:307
146
  #: templates/subscriptions/pack-details.php:25
147
  msgid "Free"
148
  msgstr ""
@@ -156,7 +156,7 @@ msgstr ""
156
  #: includes/fields/class-abstract-fields.php:344
157
  #: includes/fields/class-abstract-fields.php:358
158
  #: includes/fields/class-abstract-fields.php:426
159
- #: includes/fields/class-field-checkbox.php:90
160
  #: includes/fields/class-field-radio.php:89 includes/free/form-element.php:477
161
  #: wpuf.php:706
162
  msgid "Yes"
@@ -171,7 +171,7 @@ msgstr ""
171
  #: includes/fields/class-abstract-fields.php:345
172
  #: includes/fields/class-abstract-fields.php:359
173
  #: includes/fields/class-abstract-fields.php:427
174
- #: includes/fields/class-field-checkbox.php:91
175
  #: includes/fields/class-field-radio.php:90 includes/free/form-element.php:478
176
  #: wpuf.php:707
177
  msgid "No"
@@ -304,7 +304,7 @@ msgstr ""
304
 
305
  #: admin/class-admin-subscription.php:754
306
  #: admin/form-builder/class-wpuf-admin-form-builder.php:265
307
- #: class/payment.php:199 class/subscription.php:779
308
  #: includes/class-list-table-subscribers.php:128
309
  #: lib/class-wedevs-insights.php:667 templates/dashboard/subscription.php:61
310
  msgid "Cancel"
@@ -581,7 +581,7 @@ msgid "This field must contain at least one choice"
581
  msgstr ""
582
 
583
  #: admin/form-builder/class-wpuf-admin-form-builder.php:268
584
- #: includes/fields/class-field-checkbox.php:119
585
  #: includes/fields/class-field-dropdown.php:101
586
  #: includes/fields/class-field-multidropdown.php:93
587
  #: includes/fields/class-field-radio.php:117
@@ -3843,93 +3843,93 @@ msgstr ""
3843
  msgid "Parent Subscription"
3844
  msgstr ""
3845
 
3846
- #: class/subscription.php:747
3847
  msgid "Payment is complete"
3848
  msgstr ""
3849
 
3850
- #: class/subscription.php:747
3851
  msgid "Congratulations, your payment has been completed!"
3852
  msgstr ""
3853
 
3854
- #: class/subscription.php:751 class/subscription.php:755
3855
  msgid "Please buy a subscription pack to post"
3856
  msgstr ""
3857
 
3858
- #: class/subscription.php:769
3859
  msgid "<p><i>You have a subscription pack activated. </i></p>"
3860
  msgstr ""
3861
 
3862
- #: class/subscription.php:770
3863
  msgid "<p><i>Pack name: %s </i></p>"
3864
  msgstr ""
3865
 
3866
- #: class/subscription.php:772
3867
  msgid "<p><i>To cancel the pack, press the following cancel button</i></p>"
3868
  msgstr ""
3869
 
3870
- #: class/subscription.php:816
3871
  msgid "Day"
3872
  msgid_plural "Days"
3873
  msgstr[0] ""
3874
  msgstr[1] ""
3875
 
3876
- #: class/subscription.php:817
3877
  msgid "Week"
3878
  msgid_plural "Weeks"
3879
  msgstr[0] ""
3880
  msgstr[1] ""
3881
 
3882
- #: class/subscription.php:818
3883
  msgid "Month"
3884
  msgid_plural "Months"
3885
  msgstr[0] ""
3886
  msgstr[1] ""
3887
 
3888
- #: class/subscription.php:819
3889
  msgid "Year"
3890
  msgid_plural "Years"
3891
  msgstr[0] ""
3892
  msgstr[1] ""
3893
 
3894
- #: class/subscription.php:841
3895
  msgid "One time payment"
3896
  msgstr ""
3897
 
3898
- #: class/subscription.php:848
3899
  msgid "Every"
3900
  msgstr ""
3901
 
3902
- #: class/subscription.php:849
3903
  msgid "for"
3904
  msgstr ""
3905
 
3906
- #: class/subscription.php:849
3907
  msgid "installments"
3908
  msgstr ""
3909
 
3910
- #: class/subscription.php:855
3911
  msgid "Trial available for first %s %s"
3912
  msgstr ""
3913
 
3914
- #: class/subscription.php:859
3915
  msgid "Buy Now"
3916
  msgstr ""
3917
 
3918
- #: class/subscription.php:863
3919
  msgid "Sign Up"
3920
  msgstr ""
3921
 
3922
- #: class/subscription.php:926
3923
  msgid "There is a <strong>%s</strong> charge to add a new post."
3924
  msgstr ""
3925
 
3926
- #: class/subscription.php:943
3927
  msgid ""
3928
  "Your Subscription pack exhausted. There is a <strong>%s</strong> charge to "
3929
  "add a new post."
3930
  msgstr ""
3931
 
3932
- #: class/subscription.php:988
3933
  msgid "You must <a href=\"%s\">purchase a pack</a> before posting"
3934
  msgstr ""
3935
 
@@ -4720,6 +4720,10 @@ msgstr ""
4720
  msgid "Dismiss this notice."
4721
  msgstr ""
4722
 
 
 
 
 
4723
  #: includes/fields/class-abstract-fields.php:267
4724
  msgid ""
4725
  "Check this option to mark the field required. A form will not submit unless "
@@ -4783,13 +4787,13 @@ msgid "Select Yes if you want to hide the field label in single post."
4783
  msgstr ""
4784
 
4785
  #: includes/fields/class-abstract-fields.php:423
4786
- #: includes/fields/class-field-checkbox.php:87
4787
  #: includes/fields/class-field-radio.php:86
4788
  msgid "Show in inline list"
4789
  msgstr ""
4790
 
4791
  #: includes/fields/class-abstract-fields.php:433
4792
- #: includes/fields/class-field-checkbox.php:97
4793
  #: includes/fields/class-field-radio.php:96
4794
  msgid "Show this option in an inline list"
4795
  msgstr ""
2
  # This file is distributed under the GPL2 or later.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WP User Frontend 3.1.3\n"
6
  "Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
7
+ "POT-Creation-Date: 2019-04-15 17:54:24+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
142
 
143
  #: admin/class-admin-subscription.php:216
144
  #: admin/class-admin-subscription.php:570 class/frontend-account.php:244
145
+ #: class/subscription.php:867 includes/class-user-subscription.php:307
146
  #: templates/subscriptions/pack-details.php:25
147
  msgid "Free"
148
  msgstr ""
156
  #: includes/fields/class-abstract-fields.php:344
157
  #: includes/fields/class-abstract-fields.php:358
158
  #: includes/fields/class-abstract-fields.php:426
159
+ #: includes/fields/class-field-checkbox.php:95
160
  #: includes/fields/class-field-radio.php:89 includes/free/form-element.php:477
161
  #: wpuf.php:706
162
  msgid "Yes"
171
  #: includes/fields/class-abstract-fields.php:345
172
  #: includes/fields/class-abstract-fields.php:359
173
  #: includes/fields/class-abstract-fields.php:427
174
+ #: includes/fields/class-field-checkbox.php:96
175
  #: includes/fields/class-field-radio.php:90 includes/free/form-element.php:478
176
  #: wpuf.php:707
177
  msgid "No"
304
 
305
  #: admin/class-admin-subscription.php:754
306
  #: admin/form-builder/class-wpuf-admin-form-builder.php:265
307
+ #: class/payment.php:199 class/subscription.php:780
308
  #: includes/class-list-table-subscribers.php:128
309
  #: lib/class-wedevs-insights.php:667 templates/dashboard/subscription.php:61
310
  msgid "Cancel"
581
  msgstr ""
582
 
583
  #: admin/form-builder/class-wpuf-admin-form-builder.php:268
584
+ #: includes/fields/class-field-checkbox.php:124
585
  #: includes/fields/class-field-dropdown.php:101
586
  #: includes/fields/class-field-multidropdown.php:93
587
  #: includes/fields/class-field-radio.php:117
3843
  msgid "Parent Subscription"
3844
  msgstr ""
3845
 
3846
+ #: class/subscription.php:748
3847
  msgid "Payment is complete"
3848
  msgstr ""
3849
 
3850
+ #: class/subscription.php:748
3851
  msgid "Congratulations, your payment has been completed!"
3852
  msgstr ""
3853
 
3854
+ #: class/subscription.php:752 class/subscription.php:756
3855
  msgid "Please buy a subscription pack to post"
3856
  msgstr ""
3857
 
3858
+ #: class/subscription.php:770
3859
  msgid "<p><i>You have a subscription pack activated. </i></p>"
3860
  msgstr ""
3861
 
3862
+ #: class/subscription.php:771
3863
  msgid "<p><i>Pack name: %s </i></p>"
3864
  msgstr ""
3865
 
3866
+ #: class/subscription.php:773
3867
  msgid "<p><i>To cancel the pack, press the following cancel button</i></p>"
3868
  msgstr ""
3869
 
3870
+ #: class/subscription.php:817
3871
  msgid "Day"
3872
  msgid_plural "Days"
3873
  msgstr[0] ""
3874
  msgstr[1] ""
3875
 
3876
+ #: class/subscription.php:818
3877
  msgid "Week"
3878
  msgid_plural "Weeks"
3879
  msgstr[0] ""
3880
  msgstr[1] ""
3881
 
3882
+ #: class/subscription.php:819
3883
  msgid "Month"
3884
  msgid_plural "Months"
3885
  msgstr[0] ""
3886
  msgstr[1] ""
3887
 
3888
+ #: class/subscription.php:820
3889
  msgid "Year"
3890
  msgid_plural "Years"
3891
  msgstr[0] ""
3892
  msgstr[1] ""
3893
 
3894
+ #: class/subscription.php:842
3895
  msgid "One time payment"
3896
  msgstr ""
3897
 
3898
+ #: class/subscription.php:849
3899
  msgid "Every"
3900
  msgstr ""
3901
 
3902
+ #: class/subscription.php:850
3903
  msgid "for"
3904
  msgstr ""
3905
 
3906
+ #: class/subscription.php:850
3907
  msgid "installments"
3908
  msgstr ""
3909
 
3910
+ #: class/subscription.php:856
3911
  msgid "Trial available for first %s %s"
3912
  msgstr ""
3913
 
3914
+ #: class/subscription.php:860
3915
  msgid "Buy Now"
3916
  msgstr ""
3917
 
3918
+ #: class/subscription.php:864
3919
  msgid "Sign Up"
3920
  msgstr ""
3921
 
3922
+ #: class/subscription.php:927
3923
  msgid "There is a <strong>%s</strong> charge to add a new post."
3924
  msgstr ""
3925
 
3926
+ #: class/subscription.php:944
3927
  msgid ""
3928
  "Your Subscription pack exhausted. There is a <strong>%s</strong> charge to "
3929
  "add a new post."
3930
  msgstr ""
3931
 
3932
+ #: class/subscription.php:989
3933
  msgid "You must <a href=\"%s\">purchase a pack</a> before posting"
3934
  msgstr ""
3935
 
4720
  msgid "Dismiss this notice."
4721
  msgstr ""
4722
 
4723
+ #: includes/countries-formated.php:77
4724
+ msgid "Bangladesh"
4725
+ msgstr ""
4726
+
4727
  #: includes/fields/class-abstract-fields.php:267
4728
  msgid ""
4729
  "Check this option to mark the field required. A form will not submit unless "
4787
  msgstr ""
4788
 
4789
  #: includes/fields/class-abstract-fields.php:423
4790
+ #: includes/fields/class-field-checkbox.php:92
4791
  #: includes/fields/class-field-radio.php:86
4792
  msgid "Show in inline list"
4793
  msgstr ""
4794
 
4795
  #: includes/fields/class-abstract-fields.php:433
4796
+ #: includes/fields/class-field-checkbox.php:102
4797
  #: includes/fields/class-field-radio.php:96
4798
  msgid "Show this option in an inline list"
4799
  msgstr ""
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: Forms, registration, profile-builder, login, membership
5
  Requires at least: 4.0
6
  Tested up to: 5.1.1
7
  Requires PHP: 5.4
8
- Stable tag: 3.1.2
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -257,6 +257,12 @@ redirected to the edit page with that post id. Then you'll see the edit post for
257
 
258
  == Changelog ==
259
 
 
 
 
 
 
 
260
  = v3.1.2 (01 April, 2019) =
261
 
262
  * **Feature:** Added column field: Now, creating multi-column in a single row is super easy with WPUF Column field. Just drag the column field in the builder area, configure columns number, column space and add any fields you want inside that Column field.
5
  Requires at least: 4.0
6
  Tested up to: 5.1.1
7
  Requires PHP: 5.4
8
+ Stable tag: 3.1.3
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
257
 
258
  == Changelog ==
259
 
260
+ = v3.1.3 (15 April, 2019) =
261
+
262
+ * **Fix:** Required option of checkbox field was not validating on the frontend.
263
+ * **Fix:** Select mulitple options in checkbox field doesn't save the data.
264
+ * **Fix:** Fallback pay per post was not respecting the payment procedure & fallback cost was not correct on the payment page.
265
+
266
  = v3.1.2 (01 April, 2019) =
267
 
268
  * **Feature:** Added column field: Now, creating multi-column in a single row is super easy with WPUF Column field. Just drag the column field in the builder area, configure columns number, column space and add any fields you want inside that Column field.
templates/dashboard.php CHANGED
@@ -243,7 +243,7 @@
243
  $show_edit = false;
244
  }
245
 
246
- if ( $post->post_status =='draft' && ( !empty( $payment_status ) && $payment_status != 'completed' ) ) {
247
  $show_edit = false;
248
  }
249
 
243
  $show_edit = false;
244
  }
245
 
246
+ if ( ($post->post_status =='draft' || $post->post_status =='pending') && ( !empty( $payment_status ) && $payment_status != 'completed' ) ) {
247
  $show_edit = false;
248
  }
249
 
templates/dashboard/posts.php CHANGED
@@ -152,7 +152,7 @@ $post_type_obj = get_post_type_object( $post_type );
152
  $show_edit = false;
153
  }
154
 
155
- if ( $post->post_status =='draft' && ( !empty( $payment_status ) && $payment_status != 'completed' ) ) {
156
  $show_edit = false;
157
  }
158
 
152
  $show_edit = false;
153
  }
154
 
155
+ if ( ($post->post_status =='draft' || $post->post_status =='pending') && ( !empty( $payment_status ) && $payment_status != 'completed' ) ) {
156
  $show_edit = false;
157
  }
158
 
wpuf.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP User Frontend
4
  Plugin URI: https://wordpress.org/plugins/wp-user-frontend/
5
  Description: Create, edit, delete, manages your post, pages or custom post types from frontend. Create registration forms, frontend profile and more...
6
  Author: Tareq Hasan
7
- Version: 3.1.2
8
  Author URI: https://tareq.co
9
  License: GPL2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -12,7 +12,7 @@ Text Domain: wp-user-frontend
12
  Domain Path: /languages
13
  */
14
 
15
- define( 'WPUF_VERSION', '3.1.2' );
16
  define( 'WPUF_FILE', __FILE__ );
17
  define( 'WPUF_ROOT', dirname( __FILE__ ) );
18
  define( 'WPUF_ROOT_URI', plugins_url( '', __FILE__ ) );
4
  Plugin URI: https://wordpress.org/plugins/wp-user-frontend/
5
  Description: Create, edit, delete, manages your post, pages or custom post types from frontend. Create registration forms, frontend profile and more...
6
  Author: Tareq Hasan
7
+ Version: 3.1.3
8
  Author URI: https://tareq.co
9
  License: GPL2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
  Domain Path: /languages
13
  */
14
 
15
+ define( 'WPUF_VERSION', '3.1.3' );
16
  define( 'WPUF_FILE', __FILE__ );
17
  define( 'WPUF_ROOT', dirname( __FILE__ ) );
18
  define( 'WPUF_ROOT_URI', plugins_url( '', __FILE__ ) );