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

Version Description

Download this release

Release Info

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

Code changes from version 3.1.13 to 3.1.14

assets/js/wpuf-form-builder-components.js CHANGED
@@ -1110,11 +1110,11 @@ Vue.component('form-column_field', {
1110
  colTwoWidth = 0,
1111
  colThreeWidth = 0;
1112
 
1113
- if (columnsNumber === 3) {
1114
  colOneWidth = 100/columnsNumber;
1115
  colTwoWidth = 100/columnsNumber;
1116
  colThreeWidth = 100/columnsNumber;
1117
- } else if (columnsNumber === 2){
1118
  colOneWidth = 100/columnsNumber;
1119
  colTwoWidth = 100/columnsNumber;
1120
  colThreeWidth = 0;
1110
  colTwoWidth = 0,
1111
  colThreeWidth = 0;
1112
 
1113
+ if (columnsNumber == 3) {
1114
  colOneWidth = 100/columnsNumber;
1115
  colTwoWidth = 100/columnsNumber;
1116
  colThreeWidth = 100/columnsNumber;
1117
+ } else if (columnsNumber == 2){
1118
  colOneWidth = 100/columnsNumber;
1119
  colTwoWidth = 100/columnsNumber;
1120
  colThreeWidth = 0;
class/payment.php CHANGED
@@ -388,6 +388,13 @@ class WPUF_Payment {
388
  update_user_meta( $userdata->ID, 'wpuf_address_fields', $address_fields );
389
  }
390
 
 
 
 
 
 
 
 
391
  do_action( 'wpuf_gateway_' . $gateway, $payment_vars );
392
  }
393
  }
388
  update_user_meta( $userdata->ID, 'wpuf_address_fields', $address_fields );
389
  }
390
 
391
+ /**
392
+ * Filter: wpuf_payment_vars
393
+ *
394
+ * @since 3.1.13
395
+ */
396
+ $payment_vars = apply_filters( 'wpuf_payment_vars', $payment_vars );
397
+
398
  do_action( 'wpuf_gateway_' . $gateway, $payment_vars );
399
  }
400
  }
includes/fields/class-field-url.php CHANGED
@@ -40,7 +40,7 @@ class WPUF_Form_Field_URL extends WPUF_Form_Field_Text {
40
  <div class="wpuf-fields">
41
  <input
42
  id="<?php echo $field_settings['name'] . '_' . $form_id; ?>"
43
- type="url" class="url <?php echo ' wpuf_'.$field_settings['name'].'_'.$form_id; ?>"
44
  data-required="<?php echo $field_settings['required'] ?>"
45
  data-type="text"
46
  name="<?php echo esc_attr( $field_settings['name'] ); ?>"
40
  <div class="wpuf-fields">
41
  <input
42
  id="<?php echo $field_settings['name'] . '_' . $form_id; ?>"
43
+ type="url" pattern="^(https?://)?([a-zA-Z0-9]([a-zA-ZäöüÄÖÜ0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$" class="url <?php echo ' wpuf_'.$field_settings['name'].'_'.$form_id; ?>"
44
  data-required="<?php echo $field_settings['required'] ?>"
45
  data-type="text"
46
  name="<?php echo esc_attr( $field_settings['name'] ); ?>"
includes/free/form-element.php CHANGED
@@ -213,7 +213,7 @@ class WPUF_form_element extends WPUF_Pro_Prompt {
213
  <th><?php _e( 'Notification', 'wp-user-frontend' ); ?></th>
214
  <td>
215
  <label>
216
- <input type="hidden" name="wpuf_settings[notification][new]" value="on">
217
  <input type="checkbox" name="wpuf_settings[notification][new]" value="on"<?php checked( $new_notificaton, 'on' ); ?>>
218
  <?php _e( 'Enable post notification', 'wp-user-frontend' ); ?>
219
  </label>
213
  <th><?php _e( 'Notification', 'wp-user-frontend' ); ?></th>
214
  <td>
215
  <label>
216
+ <input type="hidden" name="wpuf_settings[notification][new]" value="off">
217
  <input type="checkbox" name="wpuf_settings[notification][new]" value="on"<?php checked( $new_notificaton, 'on' ); ?>>
218
  <?php _e( 'Enable post notification', 'wp-user-frontend' ); ?>
219
  </label>
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.13\n"
6
  "Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
7
- "POT-Creation-Date: 2019-11-18 03:17:47+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -3674,11 +3674,11 @@ msgstr ""
3674
  msgid "No Payment gateway found"
3675
  msgstr ""
3676
 
3677
- #: class/payment.php:459 lib/gateway/bank.php:109
3678
  msgid "[%s] Payment Received"
3679
  msgstr ""
3680
 
3681
- #: class/payment.php:460
3682
  msgid "New payment received at %s"
3683
  msgstr ""
3684
 
2
  # This file is distributed under the GPL2 or later.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WP User Frontend 3.1.14\n"
6
  "Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
7
+ "POT-Creation-Date: 2019-12-13 10:15:31+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
3674
  msgid "No Payment gateway found"
3675
  msgstr ""
3676
 
3677
+ #: class/payment.php:466 lib/gateway/bank.php:109
3678
  msgid "[%s] Payment Received"
3679
  msgstr ""
3680
 
3681
+ #: class/payment.php:467
3682
  msgid "New payment received at %s"
3683
  msgstr ""
3684
 
lib/gateway/paypal.php CHANGED
@@ -1,454 +1,462 @@
1
- <?php
2
-
3
- /**
4
- * WP User Frotnend Paypal gateway
5
- *
6
- * @since 0.8
7
- * @package WP User Frontend
8
- */
9
- class WPUF_Paypal {
10
-
11
- private $gateway_url;
12
- private $gateway_cancel_url;
13
- private $test_mode;
14
-
15
- public function __construct() {
16
- $this->gateway_url = 'https://www.paypal.com/webscr/?';
17
- $this->gateway_cancel_url = 'https://api-3t.paypal.com/nvp';
18
- $this->test_mode = false;
19
-
20
- add_action( 'wpuf_gateway_paypal', array( $this, 'prepare_to_send' ) );
21
- add_action( 'wpuf_options_payment', array( $this, 'payment_options' ) );
22
- add_action( 'init', array( $this, 'check_response' ) );
23
- add_action( 'wpuf_paypal_ipn_success', array( $this, 'paypal_success' ) );
24
- add_action( 'wpuf_cancel_payment_paypal', array( $this, 'handle_cancel_subscription' ) );
25
- add_action( 'wpuf_cancel_subscription_paypal', array( $this, 'handle_cancel_subscription' ) );
26
- }
27
-
28
- public function subscription_cancel( $user_id ) {
29
- $sub_meta = 'cancel';
30
- wpuf_get_user( $user_id )->subscription()->update_meta( $sub_meta );
31
- }
32
-
33
- /**
34
- * Change PayPal recurring payment status
35
- *
36
- * @param int $user_id
37
- * @param string $status
38
- * @return void
39
- */
40
- public function recurring_change_status( $user_id, $status ) {
41
- global $wp_version;
42
-
43
- $sub_info = get_user_meta( $user_id, '_wpuf_subscription_pack', true );
44
- $api_username = wpuf_get_option( 'paypal_api_username', 'wpuf_payment' );
45
- $api_password = wpuf_get_option( 'paypal_api_password', 'wpuf_payment' );
46
- $api_signature = wpuf_get_option( 'paypal_api_signature', 'wpuf_payment' );
47
- $profile_id = isset( $sub_info['profile_id'] ) ? $sub_info['profile_id'] : '';
48
- $new_status = $status;
49
- $new_status_string = $status;
50
-
51
- $this->set_mode();
52
-
53
- $args = array(
54
- 'USER' => $api_username,
55
- 'PWD' => $api_password,
56
- 'SIGNATURE' => $api_signature,
57
- 'VERSION' => '76.0',
58
- 'METHOD' => 'ManageRecurringPaymentsProfileStatus',
59
- 'PROFILEID' => $profile_id,
60
- 'ACTION' => ucfirst( $new_status ),
61
- 'NOTE' => sprintf( __( 'Subscription %s at %s', 'wp-user-frontend' ), $new_status_string, get_bloginfo( 'name' ) ),
62
- );
63
-
64
- // Send back post vars to paypal
65
- $params = array(
66
- 'body' => $args,
67
- 'sslverify' => true,
68
- 'timeout' => 30,
69
- 'user-agent' => 'WP User Frontend Pro/' . WPUF_VERSION,
70
- );
71
-
72
- $response = wp_remote_post( $this->gateway_cancel_url, $params );
73
-
74
- parse_str( $response['body'], $parsed_response );
75
-
76
- if ( strtolower( $parsed_response['ACK'] ) == 'success' ) {
77
- $this->subscription_cancel( $user_id );
78
- }
79
- }
80
-
81
- /**
82
- * Adds paypal specific options to the admin panel
83
- *
84
- * @param type $options
85
- * @return string
86
- */
87
- public function payment_options( $options ) {
88
-
89
- $options[] = array(
90
- 'name' => 'paypal_email',
91
- 'label' => __( 'PayPal Email', 'wp-user-frontend' )
92
- );
93
-
94
- $options[] = array(
95
- 'name' => 'gate_instruct_paypal',
96
- 'label' => __( 'PayPal Instruction', 'wp-user-frontend' ),
97
- 'type' => 'textarea',
98
- 'default' => "Pay via PayPal; you can pay with your credit card if you don't have a PayPal account"
99
- );
100
-
101
- $options[] = array(
102
- 'name' => 'paypal_api_username',
103
- 'label' => __( 'PayPal API username', 'wp-user-frontend' )
104
- );
105
- $options[] = array(
106
- 'name' => 'paypal_api_password',
107
- 'label' => __( 'PayPal API password', 'wp-user-frontend' )
108
- );
109
- $options[] = array(
110
- 'name' => 'paypal_api_signature',
111
- 'label' => __( 'PayPal API signature', 'wp-user-frontend' )
112
- );
113
-
114
- return $options;
115
- }
116
-
117
- /**
118
- * Prepare the payment form and send to paypal
119
- *
120
- * @since 0.8
121
- * @param array $data payment info
122
- */
123
- public function prepare_to_send( $data ) {
124
-
125
- $user_id = $data['user_info']['id'];
126
- $listener_url = add_query_arg ( 'action', 'wpuf_paypal_success', home_url( '/' ) );
127
- $redirect_page_id = wpuf_get_option( 'payment_success', 'wpuf_payment' );
128
-
129
- if ( $redirect_page_id ) {
130
- $return_url = add_query_arg( 'action', 'wpuf_paypal_success', get_permalink( $redirect_page_id ) );
131
- } else {
132
- $return_url = add_query_arg( 'action', 'wpuf_paypal_success', get_permalink( wpuf_get_option( 'subscription_page', 'wpuf_payment' ) ) );
133
- }
134
-
135
- $billing_amount = empty( $data['price'] ) ? 0 : $data['price'];
136
-
137
- if ( isset( $_POST['coupon_id'] ) && !empty( $_POST['coupon_id'] ) ) {
138
- $billing_amount = WPUF_Coupons::init()->discount( $billing_amount, $_POST['coupon_id'], $data['item_number'] );
139
-
140
- $coupon_id = $_POST['coupon_id'];
141
- } else {
142
- $coupon_id = '';
143
- }
144
-
145
- $data['subtotal'] = $billing_amount;
146
- $billing_amount = apply_filters( 'wpuf_payment_amount', $data['subtotal'] );
147
- $data['tax'] = $billing_amount - $data['subtotal'];
148
-
149
- if ( $billing_amount == 0 ) {
150
- wpuf_get_user( $user_id )->subscription()->add_pack( $data['item_number'], $profile_id = null, false,'free' );
151
- wp_redirect( $return_url );
152
- exit();
153
- }
154
-
155
-
156
- if ( $data['type'] == 'pack' && $data['custom']['recurring_pay'] == 'yes' ) {
157
-
158
- if( $data['custom']['cycle_period'] == "day")
159
- $period = "D";
160
- elseif( $data['custom']['cycle_period'] == "week")
161
- $period = "W";
162
- elseif( $data['custom']['cycle_period'] == "month")
163
- $period = "M";
164
- elseif( $data['custom']['cycle_period'] == "year")
165
- $period = "Y";
166
-
167
- if( $data['custom']['trial_duration_type'] == "day")
168
- $trial_period = "D";
169
- elseif( $data['custom']['trial_duration_type'] == "week")
170
- $trial_period = "W";
171
- elseif( $data['custom']['trial_duration_type'] == "month")
172
- $trial_period = "M";
173
- elseif( $data['custom']['trial_duration_type'] == "year")
174
- $trial_period = "Y";
175
-
176
-
177
- $paypal_args = array(
178
- 'cmd' => '_xclick-subscriptions',
179
- 'business' => wpuf_get_option('paypal_email', 'wpuf_payment'),
180
- 'a3' => $billing_amount,
181
- 'p3' => !empty( $data['custom']['billing_cycle_number'] ) ? $data['custom']['billing_cycle_number']: '0',
182
- 't3' => $period,
183
- 'item_name' => $data['custom']['post_title'],
184
- 'custom' => json_encode( array( 'billing_amount' => $billing_amount, 'type' => $data['type'], 'user_id' => $user_id, 'coupon_id' => $coupon_id, 'subtotal' => $data['subtotal'], 'tax' => $data['tax'] )),
185
- 'no_shipping' => '1',
186
- 'shipping' => '0',
187
- 'no_note' => '1',
188
- 'currency_code' => $data['currency'],
189
- 'item_number' => $data['item_number'],
190
- 'charset' => 'UTF-8',
191
- 'rm' => '2',
192
- 'return' => $return_url,
193
- 'notify_url' => $listener_url,
194
- 'src' => '1',
195
- 'sra' => '1',
196
- 'srt' => intval( $data['custom']['billing_limit'] )
197
- );
198
-
199
- if ( $data['custom']['trial_status'] == 'yes' ) {
200
- $paypal_args['p1'] = $data['custom']['trial_duration'];
201
- $paypal_args['t1'] = $trial_period;
202
- }
203
-
204
- } else {
205
-
206
- $paypal_args = array(
207
- 'cmd' => '_xclick',
208
- 'business' => wpuf_get_option('paypal_email', 'wpuf_payment'),
209
- 'amount' => $billing_amount,
210
- 'item_name' => isset( $data['custom']['post_title'] ) ? $data['custom']['post_title'] : $data['item_name'],
211
- 'no_shipping' => '1',
212
- 'shipping' => '0',
213
- 'no_note' => '1',
214
- 'currency_code' => $data['currency'],
215
- 'item_number' => $data['item_number'],
216
- 'charset' => 'UTF-8',
217
- 'rm' => '2',
218
- 'custom' => json_encode( array( 'type' => $data['type'], 'user_id' => $user_id, 'coupon_id' => $coupon_id, 'subtotal' => $data['subtotal'], 'tax' => $data['tax'] ) ),
219
- 'return' => $return_url,
220
- 'notify_url' => $listener_url,
221
- );
222
- }
223
- $this->set_mode();
224
-
225
- $paypal_url = $this->gateway_url . http_build_query( $paypal_args );
226
-
227
- wp_redirect( $paypal_url );
228
- exit;
229
- }
230
-
231
- /**
232
- * Set the payment mode to sandbox or live
233
- *
234
- * @since 0.8
235
- */
236
- public function set_mode() {
237
- if ( wpuf_get_option( 'sandbox_mode', 'wpuf_payment' ) == 'on' ) {
238
- $this->gateway_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr/?';
239
- $this->gateway_cancel_url = 'https://api-3t.sandbox.paypal.com/nvp';
240
- $this->test_mode = true;
241
- }
242
- }
243
-
244
- /**
245
- * Check for PayPal IPN Response.
246
- */
247
- public function check_response() {
248
- if ( isset( $_GET['action'] ) && $_GET['action'] == 'wpuf_paypal_success' && $this->validateIpn() ) {
249
- do_action( 'wpuf_paypal_ipn_success');
250
- }
251
- }
252
-
253
- /**
254
- * Handle the payment info sent from paypal
255
- *
256
- * @since 0.8
257
- */
258
- public function paypal_success() {
259
-
260
- $postdata = $_POST;
261
-
262
- // when subscription expire
263
- if ( isset( $postdata['txn_type'] ) && ( $postdata['txn_type'] == 'subscr_eot' ) ) {
264
- $custom = json_decode( stripcslashes( $postdata['custom'] ) );
265
- $this->subscription_cancel( $custom->user_id );
266
- return;
267
- }
268
-
269
- // when subscription cancel
270
- if ( isset( $postdata['txn_type'] ) && ( $postdata['txn_type'] == 'subscr_cancel' ) ) {
271
- $custom = json_decode( stripcslashes( $postdata['custom'] ) );
272
- $this->subscription_cancel( $custom->user_id );
273
- return;
274
- }
275
-
276
- $insert_payment = false;
277
-
278
- if ( isset( $_GET['action'] ) && $_GET['action'] == 'wpuf_paypal_success' ) {
279
-
280
- WP_User_Frontend::log( 'paypal-payment-info', print_r( $_POST, true ) );
281
-
282
- $postdata = $_POST;
283
- $type = $postdata['custom'];
284
- $item_number = $postdata['item_number'];
285
- $amount = $postdata['mc_gross'];
286
- $is_recurring = false;
287
-
288
- $custom = json_decode( stripcslashes( $postdata['custom'] ) );
289
- $coupon_id = isset( $custom->coupon_id ) ? $custom->coupon_id : false;
290
-
291
- // check if recurring payment
292
- if ( isset( $postdata['txn_type'] ) && ( $postdata['txn_type'] == 'subscr_payment' ) && ( strtolower( $postdata['payment_status'] ) == 'completed' ) ) {
293
-
294
- if ( $postdata['mc_gross'] == $custom->billing_amount ) {
295
-
296
- $insert_payment = true;
297
- $post_id = 0;
298
- $pack_id = $item_number;
299
- $is_recurring = true;
300
- $status = 'subscr_payment';
301
-
302
- WP_User_Frontend::log( 'paypal-recurring', 'got subscr_payment, should insert of pack_id: ' . $pack_id );
303
-
304
- } else {
305
- $this->subscription_cancel( $custom->user_id );
306
-
307
- WP_User_Frontend::log( 'paypal-recurring', 'got subscr_payment. billing validation failed, cancel subscription. user_id: ' . $custom->user_id );
308
- }
309
-
310
- } else if ( isset( $postdata['txn_type'] ) && ( $postdata['txn_type'] == 'web_accept' ) && ( strtolower( $postdata['payment_status'] ) == 'completed' ) ){
311
-
312
- WP_User_Frontend::log( 'paypal', 'got web_accept. type: ' . $custom->type . '. item_number: ' . $item_number );
313
-
314
- //verify payment
315
- $status = 'web_accept';
316
-
317
- switch ($custom->type ) {
318
- case 'post':
319
- $post_id = $item_number;
320
- $pack_id = 0;
321
- break;
322
-
323
- case 'pack':
324
- $post_id = 0;
325
- $pack_id = $item_number;
326
- break;
327
- }
328
-
329
- } else if (
330
- isset ( $postdata['verify_sign'] )
331
- && !empty( $postdata['verify_sign'] )
332
- && isset ( $postdata['payment_status'] )
333
- && $postdata['payment_status'] == 'Pending'
334
- && isset ( $postdata['pending_reason'] )
335
- && $postdata['pending_reason'] == 'multi_currency'
336
- && isset ( $postdata['txn_type'] )
337
- && $postdata['txn_type'] == 'web_accept'
338
- ) {
339
- //verify payment
340
- $status = 'web_accept';
341
- switch ($custom->type ) {
342
- case 'post':
343
- $post_id = $item_number;
344
- $pack_id = 0;
345
- break;
346
-
347
- case 'pack':
348
- $post_id = 0;
349
- $pack_id = $item_number;
350
- break;
351
- }
352
-
353
- } // payment type
354
-
355
- $data = array(
356
- 'user_id' => (int) $custom->user_id,
357
- 'status' => strtolower( $postdata['payment_status'] ),
358
- 'subtotal' => (float) $custom->subtotal,
359
- 'tax' => (float) $custom->tax,
360
- 'cost' => $postdata['mc_gross'],
361
- 'post_id' => isset( $post_id ) ? $post_id : '',
362
- 'pack_id' => isset( $pack_id ) ? $pack_id : '',
363
- 'payer_first_name' => $postdata['first_name'],
364
- 'payer_last_name' => $postdata['last_name'],
365
- 'payer_email' => $postdata['payer_email'],
366
- 'payment_type' => 'Paypal',
367
- 'payer_address' => isset( $postdata['residence_country'] ) ? $postdata['residence_country'] : null,
368
- 'transaction_id' => $postdata['txn_id'],
369
- 'created' => current_time( 'mysql' ),
370
- 'profile_id' => isset( $postdata['subscr_id'] ) ? $postdata['subscr_id'] : null,
371
- );
372
-
373
- WP_User_Frontend::log( 'payment', 'inserting payment to database. ' . print_r( $data, true ) );
374
-
375
- $transaction_id = wp_strip_all_tags( $postdata['txn_id'] );
376
- WPUF_Payment::insert_payment( $data, $transaction_id, $is_recurring );
377
-
378
- if ( $coupon_id ) {
379
- $pre_usage = get_post_meta( $coupon_id, '_coupon_used', true );
380
- $pre_usage = (empty( $pre_usage )) ? 0 : $pre_usage;
381
- $new_use = $pre_usage + 1;
382
-
383
- update_post_meta( $coupon_id, '_coupon_used', $new_use );
384
- }
385
-
386
- delete_user_meta( $custom->user_id, '_wpuf_user_active' );
387
- delete_user_meta( $custom->user_id, '_wpuf_activation_key' );
388
-
389
- }
390
- }
391
-
392
- /**
393
- * Handle the cancel payment / subscription
394
- *
395
- * @return void
396
- *
397
- * @since 2.4.1
398
- */
399
- public function handle_cancel_subscription( $data ) {
400
- $user_id = isset( $data['user_id'] ) ? $data['user_id'] : '';
401
- $this->recurring_change_status( $user_id, 'Cancel' );
402
- }
403
-
404
- /**
405
- * Validate the IPN notification
406
- *
407
- * @param none
408
- * @return boolean
409
- */
410
- public function validateIpn() {
411
- global $wp_version;
412
-
413
- WP_User_Frontend::log( 'paypal', 'Checking if PayPal IPN response is valid' );
414
-
415
- $this->set_mode();
416
-
417
- // Get received values from post data
418
- $validate_ipn = array( 'cmd' => '_notify-validate' );
419
- $validate_ipn += wp_unslash( $_POST );
420
-
421
- // Send back post vars to paypal
422
- $params = array(
423
- 'body' => $validate_ipn,
424
- 'timeout' => 60,
425
- 'httpversion' => '1.1',
426
- 'compress' => false,
427
- 'decompress' => false,
428
- 'user-agent' => 'WP User Frontend Pro/' . WPUF_VERSION
429
- );
430
- if ( wpuf_get_option( 'sandbox_mode', 'wpuf_payment' ) == 'on' ) {
431
- $this->gateway_url = 'https://ipnpb.sandbox.paypal.com/cgi-bin/webscr';
432
- } else {
433
- $this->gateway_url = 'https://ipnpb.paypal.com/cgi-bin/webscr';
434
- }
435
- $response = wp_safe_remote_post( $this->gateway_url, $params );
436
-
437
- WP_User_Frontend::log( 'paypal', 'IPN Request: ' . print_r( $params, true ) );
438
- WP_User_Frontend::log( 'paypal', 'IPN Response: ' . print_r( $response, true ) );
439
-
440
- // check to see if the request was valid
441
- if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 && strstr( $response['body'], 'VERIFIED' ) ) {
442
- WP_User_Frontend::log( 'paypal', 'Received valid response from PayPal' );
443
- return true;
444
- }
445
-
446
- WP_User_Frontend::log( 'paypal', 'Received invalid response from PayPal' );
447
-
448
- if ( is_wp_error( $response ) ) {
449
- WP_User_Frontend::log( 'paypal', 'Error response: ' . $response->get_error_message() );
450
- }
451
-
452
- return false;
453
- }
454
- }
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * WP User Frotnend Paypal gateway
5
+ *
6
+ * @since 0.8
7
+ * @package WP User Frontend
8
+ */
9
+ class WPUF_Paypal {
10
+
11
+ private $gateway_url;
12
+ private $gateway_cancel_url;
13
+ private $test_mode;
14
+
15
+ public function __construct() {
16
+ $this->gateway_url = 'https://www.paypal.com/webscr/?';
17
+ $this->gateway_cancel_url = 'https://api-3t.paypal.com/nvp';
18
+ $this->test_mode = false;
19
+
20
+ add_action( 'wpuf_gateway_paypal', array( $this, 'prepare_to_send' ) );
21
+ add_action( 'wpuf_options_payment', array( $this, 'payment_options' ) );
22
+ add_action( 'init', array( $this, 'check_response' ) );
23
+ add_action( 'wpuf_paypal_ipn_success', array( $this, 'paypal_success' ) );
24
+ add_action( 'wpuf_cancel_payment_paypal', array( $this, 'handle_cancel_subscription' ) );
25
+ add_action( 'wpuf_cancel_subscription_paypal', array( $this, 'handle_cancel_subscription' ) );
26
+ }
27
+
28
+ public function subscription_cancel( $user_id ) {
29
+ $sub_meta = 'cancel';
30
+ wpuf_get_user( $user_id )->subscription()->update_meta( $sub_meta );
31
+ }
32
+
33
+ /**
34
+ * Change PayPal recurring payment status
35
+ *
36
+ * @param int $user_id
37
+ * @param string $status
38
+ * @return void
39
+ */
40
+ public function recurring_change_status( $user_id, $status ) {
41
+ global $wp_version;
42
+
43
+ $sub_info = get_user_meta( $user_id, '_wpuf_subscription_pack', true );
44
+ $api_username = wpuf_get_option( 'paypal_api_username', 'wpuf_payment' );
45
+ $api_password = wpuf_get_option( 'paypal_api_password', 'wpuf_payment' );
46
+ $api_signature = wpuf_get_option( 'paypal_api_signature', 'wpuf_payment' );
47
+ $profile_id = isset( $sub_info['profile_id'] ) ? $sub_info['profile_id'] : '';
48
+ $new_status = $status;
49
+ $new_status_string = $status;
50
+
51
+ $this->set_mode();
52
+
53
+ $args = array(
54
+ 'USER' => $api_username,
55
+ 'PWD' => $api_password,
56
+ 'SIGNATURE' => $api_signature,
57
+ 'VERSION' => '76.0',
58
+ 'METHOD' => 'ManageRecurringPaymentsProfileStatus',
59
+ 'PROFILEID' => $profile_id,
60
+ 'ACTION' => ucfirst( $new_status ),
61
+ 'NOTE' => sprintf( __( 'Subscription %s at %s', 'wp-user-frontend' ), $new_status_string, get_bloginfo( 'name' ) ),
62
+ );
63
+
64
+ // Send back post vars to paypal
65
+ $params = array(
66
+ 'body' => $args,
67
+ 'sslverify' => true,
68
+ 'timeout' => 30,
69
+ 'user-agent' => 'WP User Frontend Pro/' . WPUF_VERSION,
70
+ );
71
+
72
+ $response = wp_remote_post( $this->gateway_cancel_url, $params );
73
+
74
+ parse_str( $response['body'], $parsed_response );
75
+
76
+ if ( strtolower( $parsed_response['ACK'] ) == 'success' ) {
77
+ $this->subscription_cancel( $user_id );
78
+ }
79
+ }
80
+
81
+ /**
82
+ * Adds paypal specific options to the admin panel
83
+ *
84
+ * @param type $options
85
+ * @return string
86
+ */
87
+ public function payment_options( $options ) {
88
+
89
+ $options[] = array(
90
+ 'name' => 'paypal_email',
91
+ 'label' => __( 'PayPal Email', 'wp-user-frontend' )
92
+ );
93
+
94
+ $options[] = array(
95
+ 'name' => 'gate_instruct_paypal',
96
+ 'label' => __( 'PayPal Instruction', 'wp-user-frontend' ),
97
+ 'type' => 'textarea',
98
+ 'default' => "Pay via PayPal; you can pay with your credit card if you don't have a PayPal account"
99
+ );
100
+
101
+ $options[] = array(
102
+ 'name' => 'paypal_api_username',
103
+ 'label' => __( 'PayPal API username', 'wp-user-frontend' )
104
+ );
105
+ $options[] = array(
106
+ 'name' => 'paypal_api_password',
107
+ 'label' => __( 'PayPal API password', 'wp-user-frontend' )
108
+ );
109
+ $options[] = array(
110
+ 'name' => 'paypal_api_signature',
111
+ 'label' => __( 'PayPal API signature', 'wp-user-frontend' )
112
+ );
113
+
114
+ return $options;
115
+ }
116
+
117
+ /**
118
+ * Prepare the payment form and send to paypal
119
+ *
120
+ * @since 0.8
121
+ * @param array $data payment info
122
+ */
123
+ public function prepare_to_send( $data ) {
124
+
125
+ $user_id = $data['user_info']['id'];
126
+ $listener_url = add_query_arg ( 'action', 'wpuf_paypal_success', home_url( '/' ) );
127
+ $redirect_page_id = wpuf_get_option( 'payment_success', 'wpuf_payment' );
128
+
129
+ if ( $redirect_page_id ) {
130
+ $return_url = add_query_arg( 'action', 'wpuf_paypal_success', get_permalink( $redirect_page_id ) );
131
+ } else {
132
+ $return_url = add_query_arg( 'action', 'wpuf_paypal_success', get_permalink( wpuf_get_option( 'subscription_page', 'wpuf_payment' ) ) );
133
+ }
134
+
135
+ $billing_amount = empty( $data['price'] ) ? 0 : $data['price'];
136
+
137
+ if ( isset( $_POST['coupon_id'] ) && !empty( $_POST['coupon_id'] ) ) {
138
+ $billing_amount = WPUF_Coupons::init()->discount( $billing_amount, $_POST['coupon_id'], $data['item_number'] );
139
+
140
+ $coupon_id = $_POST['coupon_id'];
141
+ } else {
142
+ $coupon_id = '';
143
+ }
144
+
145
+ $data['subtotal'] = $billing_amount;
146
+ $billing_amount = apply_filters( 'wpuf_payment_amount', $data['subtotal'] );
147
+ $data['tax'] = $billing_amount - $data['subtotal'];
148
+
149
+ if ( $billing_amount == 0 ) {
150
+ wpuf_get_user( $user_id )->subscription()->add_pack( $data['item_number'], $profile_id = null, false,'free' );
151
+ wp_redirect( $return_url );
152
+ exit();
153
+ }
154
+
155
+
156
+ if ( $data['type'] == 'pack' && $data['custom']['recurring_pay'] == 'yes' ) {
157
+
158
+ if( $data['custom']['cycle_period'] == "day")
159
+ $period = "D";
160
+ elseif( $data['custom']['cycle_period'] == "week")
161
+ $period = "W";
162
+ elseif( $data['custom']['cycle_period'] == "month")
163
+ $period = "M";
164
+ elseif( $data['custom']['cycle_period'] == "year")
165
+ $period = "Y";
166
+
167
+ if( $data['custom']['trial_duration_type'] == "day")
168
+ $trial_period = "D";
169
+ elseif( $data['custom']['trial_duration_type'] == "week")
170
+ $trial_period = "W";
171
+ elseif( $data['custom']['trial_duration_type'] == "month")
172
+ $trial_period = "M";
173
+ elseif( $data['custom']['trial_duration_type'] == "year")
174
+ $trial_period = "Y";
175
+
176
+
177
+ $paypal_args = array(
178
+ 'cmd' => '_xclick-subscriptions',
179
+ 'business' => wpuf_get_option('paypal_email', 'wpuf_payment'),
180
+ 'a3' => $billing_amount,
181
+ 'p3' => !empty( $data['custom']['billing_cycle_number'] ) ? $data['custom']['billing_cycle_number']: '0',
182
+ 't3' => $period,
183
+ 'item_name' => $data['custom']['post_title'],
184
+ 'custom' => json_encode( array( 'billing_amount' => $billing_amount, 'type' => $data['type'], 'user_id' => $user_id, 'coupon_id' => $coupon_id, 'subtotal' => $data['subtotal'], 'tax' => $data['tax'] )),
185
+ 'no_shipping' => '1',
186
+ 'shipping' => '0',
187
+ 'no_note' => '1',
188
+ 'currency_code' => $data['currency'],
189
+ 'item_number' => $data['item_number'],
190
+ 'charset' => 'UTF-8',
191
+ 'rm' => '2',
192
+ 'return' => $return_url,
193
+ 'notify_url' => $listener_url,
194
+ 'src' => '1',
195
+ 'sra' => '1',
196
+ 'srt' => intval( $data['custom']['billing_limit'] )
197
+ );
198
+
199
+ if ( $data['custom']['trial_status'] == 'yes' ) {
200
+ $paypal_args['p1'] = $data['custom']['trial_duration'];
201
+ $paypal_args['t1'] = $trial_period;
202
+ }
203
+
204
+ } else {
205
+
206
+ $paypal_args = array(
207
+ 'cmd' => '_xclick',
208
+ 'business' => wpuf_get_option('paypal_email', 'wpuf_payment'),
209
+ 'amount' => $billing_amount,
210
+ 'item_name' => isset( $data['custom']['post_title'] ) ? $data['custom']['post_title'] : $data['item_name'],
211
+ 'no_shipping' => '1',
212
+ 'shipping' => '0',
213
+ 'no_note' => '1',
214
+ 'currency_code' => $data['currency'],
215
+ 'item_number' => $data['item_number'],
216
+ 'charset' => 'UTF-8',
217
+ 'rm' => '2',
218
+ 'custom' => json_encode( array( 'type' => $data['type'], 'user_id' => $user_id, 'coupon_id' => $coupon_id, 'subtotal' => $data['subtotal'], 'tax' => $data['tax'] ) ),
219
+ 'return' => $return_url,
220
+ 'notify_url' => $listener_url,
221
+ );
222
+ }
223
+
224
+ $this->set_mode();
225
+
226
+ /**
227
+ * Filter: wpuf_paypal_args
228
+ *
229
+ * @since 3.1.13
230
+ */
231
+ $paypal_args = apply_filters( 'wpuf_paypal_args', $paypal_args );
232
+
233
+ $paypal_url = $this->gateway_url . http_build_query( $paypal_args );
234
+
235
+ wp_redirect( $paypal_url );
236
+ exit;
237
+ }
238
+
239
+ /**
240
+ * Set the payment mode to sandbox or live
241
+ *
242
+ * @since 0.8
243
+ */
244
+ public function set_mode() {
245
+ if ( wpuf_get_option( 'sandbox_mode', 'wpuf_payment' ) == 'on' ) {
246
+ $this->gateway_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr/?';
247
+ $this->gateway_cancel_url = 'https://api-3t.sandbox.paypal.com/nvp';
248
+ $this->test_mode = true;
249
+ }
250
+ }
251
+
252
+ /**
253
+ * Check for PayPal IPN Response.
254
+ */
255
+ public function check_response() {
256
+ if ( isset( $_GET['action'] ) && $_GET['action'] == 'wpuf_paypal_success' && $this->validateIpn() ) {
257
+ do_action( 'wpuf_paypal_ipn_success');
258
+ }
259
+ }
260
+
261
+ /**
262
+ * Handle the payment info sent from paypal
263
+ *
264
+ * @since 0.8
265
+ */
266
+ public function paypal_success() {
267
+
268
+ $postdata = $_POST;
269
+
270
+ // when subscription expire
271
+ if ( isset( $postdata['txn_type'] ) && ( $postdata['txn_type'] == 'subscr_eot' ) ) {
272
+ $custom = json_decode( stripcslashes( $postdata['custom'] ) );
273
+ $this->subscription_cancel( $custom->user_id );
274
+ return;
275
+ }
276
+
277
+ // when subscription cancel
278
+ if ( isset( $postdata['txn_type'] ) && ( $postdata['txn_type'] == 'subscr_cancel' ) ) {
279
+ $custom = json_decode( stripcslashes( $postdata['custom'] ) );
280
+ $this->subscription_cancel( $custom->user_id );
281
+ return;
282
+ }
283
+
284
+ $insert_payment = false;
285
+
286
+ if ( isset( $_GET['action'] ) && $_GET['action'] == 'wpuf_paypal_success' ) {
287
+
288
+ WP_User_Frontend::log( 'paypal-payment-info', print_r( $_POST, true ) );
289
+
290
+ $postdata = $_POST;
291
+ $type = $postdata['custom'];
292
+ $item_number = $postdata['item_number'];
293
+ $amount = $postdata['mc_gross'];
294
+ $is_recurring = false;
295
+
296
+ $custom = json_decode( stripcslashes( $postdata['custom'] ) );
297
+ $coupon_id = isset( $custom->coupon_id ) ? $custom->coupon_id : false;
298
+
299
+ // check if recurring payment
300
+ if ( isset( $postdata['txn_type'] ) && ( $postdata['txn_type'] == 'subscr_payment' ) && ( strtolower( $postdata['payment_status'] ) == 'completed' ) ) {
301
+
302
+ if ( $postdata['mc_gross'] == $custom->billing_amount ) {
303
+
304
+ $insert_payment = true;
305
+ $post_id = 0;
306
+ $pack_id = $item_number;
307
+ $is_recurring = true;
308
+ $status = 'subscr_payment';
309
+
310
+ WP_User_Frontend::log( 'paypal-recurring', 'got subscr_payment, should insert of pack_id: ' . $pack_id );
311
+
312
+ } else {
313
+ $this->subscription_cancel( $custom->user_id );
314
+
315
+ WP_User_Frontend::log( 'paypal-recurring', 'got subscr_payment. billing validation failed, cancel subscription. user_id: ' . $custom->user_id );
316
+ }
317
+
318
+ } else if ( isset( $postdata['txn_type'] ) && ( $postdata['txn_type'] == 'web_accept' ) && ( strtolower( $postdata['payment_status'] ) == 'completed' ) ){
319
+
320
+ WP_User_Frontend::log( 'paypal', 'got web_accept. type: ' . $custom->type . '. item_number: ' . $item_number );
321
+
322
+ //verify payment
323
+ $status = 'web_accept';
324
+
325
+ switch ($custom->type ) {
326
+ case 'post':
327
+ $post_id = $item_number;
328
+ $pack_id = 0;
329
+ break;
330
+
331
+ case 'pack':
332
+ $post_id = 0;
333
+ $pack_id = $item_number;
334
+ break;
335
+ }
336
+
337
+ } else if (
338
+ isset ( $postdata['verify_sign'] )
339
+ && !empty( $postdata['verify_sign'] )
340
+ && isset ( $postdata['payment_status'] )
341
+ && $postdata['payment_status'] == 'Pending'
342
+ && isset ( $postdata['pending_reason'] )
343
+ && $postdata['pending_reason'] == 'multi_currency'
344
+ && isset ( $postdata['txn_type'] )
345
+ && $postdata['txn_type'] == 'web_accept'
346
+ ) {
347
+ //verify payment
348
+ $status = 'web_accept';
349
+ switch ($custom->type ) {
350
+ case 'post':
351
+ $post_id = $item_number;
352
+ $pack_id = 0;
353
+ break;
354
+
355
+ case 'pack':
356
+ $post_id = 0;
357
+ $pack_id = $item_number;
358
+ break;
359
+ }
360
+
361
+ } // payment type
362
+
363
+ $data = array(
364
+ 'user_id' => (int) $custom->user_id,
365
+ 'status' => strtolower( $postdata['payment_status'] ),
366
+ 'subtotal' => (float) $custom->subtotal,
367
+ 'tax' => (float) $custom->tax,
368
+ 'cost' => $postdata['mc_gross'],
369
+ 'post_id' => isset( $post_id ) ? $post_id : '',
370
+ 'pack_id' => isset( $pack_id ) ? $pack_id : '',
371
+ 'payer_first_name' => $postdata['first_name'],
372
+ 'payer_last_name' => $postdata['last_name'],
373
+ 'payer_email' => $postdata['payer_email'],
374
+ 'payment_type' => 'Paypal',
375
+ 'payer_address' => isset( $postdata['residence_country'] ) ? $postdata['residence_country'] : null,
376
+ 'transaction_id' => $postdata['txn_id'],
377
+ 'created' => current_time( 'mysql' ),
378
+ 'profile_id' => isset( $postdata['subscr_id'] ) ? $postdata['subscr_id'] : null,
379
+ );
380
+
381
+ WP_User_Frontend::log( 'payment', 'inserting payment to database. ' . print_r( $data, true ) );
382
+
383
+ $transaction_id = wp_strip_all_tags( $postdata['txn_id'] );
384
+ WPUF_Payment::insert_payment( $data, $transaction_id, $is_recurring );
385
+
386
+ if ( $coupon_id ) {
387
+ $pre_usage = get_post_meta( $coupon_id, '_coupon_used', true );
388
+ $pre_usage = (empty( $pre_usage )) ? 0 : $pre_usage;
389
+ $new_use = $pre_usage + 1;
390
+
391
+ update_post_meta( $coupon_id, '_coupon_used', $new_use );
392
+ }
393
+
394
+ delete_user_meta( $custom->user_id, '_wpuf_user_active' );
395
+ delete_user_meta( $custom->user_id, '_wpuf_activation_key' );
396
+
397
+ }
398
+ }
399
+
400
+ /**
401
+ * Handle the cancel payment / subscription
402
+ *
403
+ * @return void
404
+ *
405
+ * @since 2.4.1
406
+ */
407
+ public function handle_cancel_subscription( $data ) {
408
+ $user_id = isset( $data['user_id'] ) ? $data['user_id'] : '';
409
+ $this->recurring_change_status( $user_id, 'Cancel' );
410
+ }
411
+
412
+ /**
413
+ * Validate the IPN notification
414
+ *
415
+ * @param none
416
+ * @return boolean
417
+ */
418
+ public function validateIpn() {
419
+ global $wp_version;
420
+
421
+ WP_User_Frontend::log( 'paypal', 'Checking if PayPal IPN response is valid' );
422
+
423
+ $this->set_mode();
424
+
425
+ // Get received values from post data
426
+ $validate_ipn = array( 'cmd' => '_notify-validate' );
427
+ $validate_ipn += wp_unslash( $_POST );
428
+
429
+ // Send back post vars to paypal
430
+ $params = array(
431
+ 'body' => $validate_ipn,
432
+ 'timeout' => 60,
433
+ 'httpversion' => '1.1',
434
+ 'compress' => false,
435
+ 'decompress' => false,
436
+ 'user-agent' => 'WP User Frontend Pro/' . WPUF_VERSION
437
+ );
438
+ if ( wpuf_get_option( 'sandbox_mode', 'wpuf_payment' ) == 'on' ) {
439
+ $this->gateway_url = 'https://ipnpb.sandbox.paypal.com/cgi-bin/webscr';
440
+ } else {
441
+ $this->gateway_url = 'https://ipnpb.paypal.com/cgi-bin/webscr';
442
+ }
443
+ $response = wp_safe_remote_post( $this->gateway_url, $params );
444
+
445
+ WP_User_Frontend::log( 'paypal', 'IPN Request: ' . print_r( $params, true ) );
446
+ WP_User_Frontend::log( 'paypal', 'IPN Response: ' . print_r( $response, true ) );
447
+
448
+ // check to see if the request was valid
449
+ if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 && strstr( $response['body'], 'VERIFIED' ) ) {
450
+ WP_User_Frontend::log( 'paypal', 'Received valid response from PayPal' );
451
+ return true;
452
+ }
453
+
454
+ WP_User_Frontend::log( 'paypal', 'Received invalid response from PayPal' );
455
+
456
+ if ( is_wp_error( $response ) ) {
457
+ WP_User_Frontend::log( 'paypal', 'Error response: ' . $response->get_error_message() );
458
+ }
459
+
460
+ return false;
461
+ }
462
+ }
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: tareq1988, nizamuddinbabu, sk.shaikat, rabbii, itowhid06, wedevs
3
  Donate link: https://tareq.co/donate/
4
  Tags: Forms, registration, profile-builder, login, membership
5
  Requires at least: 4.0
6
- Tested up to: 5.3
7
  Requires PHP: 5.6
8
- Stable tag: 3.1.13
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -257,6 +257,14 @@ redirected to the edit page with that post id. Then you'll see the edit post for
257
 
258
  == Changelog ==
259
 
 
 
 
 
 
 
 
 
260
  = v3.1.13 (18 November, 2019) =
261
 
262
  * **New:** Added Arabic translations.
3
  Donate link: https://tareq.co/donate/
4
  Tags: Forms, registration, profile-builder, login, membership
5
  Requires at least: 4.0
6
+ Tested up to: 5.3.1
7
  Requires PHP: 5.6
8
+ Stable tag: 3.1.14
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
257
 
258
  == Changelog ==
259
 
260
+ = v3.1.14 (13 December, 2019) =
261
+
262
+ * **Fix:** Fixed a warning while in block editor
263
+ * **Fix:** Add better URL validation
264
+ * **New:** Added two filters on transaction
265
+ * **Fix:** Notification Checkbox not working
266
+ * **Fix:** Fixed some Column field issues
267
+
268
  = v3.1.13 (18 November, 2019) =
269
 
270
  * **New:** Added Arabic translations.
wpuf-functions.php CHANGED
@@ -3098,14 +3098,17 @@ function wpuf_settings_multiselect( $args ) {
3098
  /**
3099
  * Filters custom avatar url
3100
  *
3101
- * @param array $args
 
 
 
3102
  */
3103
  function wpuf_get_custom_avatar( $args, $id_or_email ) {
3104
  $user_id = $id_or_email;
3105
 
3106
  if ( $id_or_email instanceof WP_Comment ){
3107
  $user_id = $id_or_email->user_id;
3108
- } elseif ( is_email( $id_or_email ) ) {
3109
  $user_id = email_exists( $id_or_email );
3110
  }
3111
 
3098
  /**
3099
  * Filters custom avatar url
3100
  *
3101
+ * @param $args
3102
+ * @param $id_or_email
3103
+ *
3104
+ * @return mixed
3105
  */
3106
  function wpuf_get_custom_avatar( $args, $id_or_email ) {
3107
  $user_id = $id_or_email;
3108
 
3109
  if ( $id_or_email instanceof WP_Comment ){
3110
  $user_id = $id_or_email->user_id;
3111
+ } elseif ( is_string( $id_or_email ) && is_email( $id_or_email ) ) {
3112
  $user_id = email_exists( $id_or_email );
3113
  }
3114
 
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.13
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.13' );
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.14
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.14' );
16
  define( 'WPUF_FILE', __FILE__ );
17
  define( 'WPUF_ROOT', dirname( __FILE__ ) );
18
  define( 'WPUF_ROOT_URI', plugins_url( '', __FILE__ ) );