Version Description
Download this release
Release Info
Developer | tareq1988 |
Plugin | WP User Frontend – Membership, Profile, Registration & Post Submission Plugin for WordPress |
Version | 3.5.12 |
Comparing to | |
See all releases |
Code changes from version 3.5.11 to 3.5.12
- languages/wp-user-frontend.pot +2 -2
- lib/gateway/paypal.php +16 -18
- readme.txt +6 -2
- wpuf.php +2 -2
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.5.
|
6 |
"Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
|
7 |
-
"POT-Creation-Date: 2021-01-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
2 |
# This file is distributed under the GPL2 or later.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WP User Frontend 3.5.12\n"
|
6 |
"Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
|
7 |
+
"POT-Creation-Date: 2021-01-13 00:46:19+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
lib/gateway/paypal.php
CHANGED
@@ -306,14 +306,15 @@ class WPUF_Paypal {
|
|
306 |
if ( isset( $_GET['action'] ) && $_GET['action'] == 'wpuf_paypal_success' ) {
|
307 |
WP_User_Frontend::log( 'paypal-payment-info', print_r( $_POST, true ) );
|
308 |
|
309 |
-
$postdata
|
310 |
-
$type
|
311 |
-
$custom
|
312 |
-
$item_number
|
313 |
-
$amount
|
314 |
-
$is_recurring
|
315 |
-
$post_id
|
316 |
-
$pack_id
|
|
|
317 |
|
318 |
$coupon_id = isset( $custom->coupon_id ) ? $custom->coupon_id : false;
|
319 |
|
@@ -327,12 +328,13 @@ class WPUF_Paypal {
|
|
327 |
return;
|
328 |
}
|
329 |
|
330 |
-
if (
|
331 |
$wpdb->update( $wpdb->prefix . 'wpuf_transaction',
|
332 |
array( 'status' => strtolower( $postdata['payment_status'] ) ),
|
333 |
array(
|
334 |
-
'transaction_id' => $
|
335 |
-
)
|
|
|
336 |
}
|
337 |
|
338 |
// check if recurring payment
|
@@ -405,14 +407,12 @@ class WPUF_Paypal {
|
|
405 |
'payer_email' => $postdata['payer_email'],
|
406 |
'payment_type' => 'Paypal',
|
407 |
'payer_address' => isset( $postdata['residence_country'] ) ? $postdata['residence_country'] : null,
|
408 |
-
'transaction_id' => $
|
409 |
'created' => current_time( 'mysql' ),
|
410 |
];
|
411 |
|
412 |
WP_User_Frontend::log( 'payment', 'inserting payment to database. ' . print_r( $data, true ) );
|
413 |
|
414 |
-
$transaction_id = wp_strip_all_tags( $postdata['txn_id'] );
|
415 |
-
|
416 |
WPUF_Payment::insert_payment( $data, $transaction_id, $is_recurring );
|
417 |
|
418 |
if ( $coupon_id ) {
|
@@ -501,11 +501,9 @@ class WPUF_Paypal {
|
|
501 |
public function transaction_exists( $trns_id ) {
|
502 |
global $wpdb;
|
503 |
|
504 |
-
|
505 |
-
return true;
|
506 |
-
}
|
507 |
|
508 |
-
return false;
|
509 |
}
|
510 |
|
511 |
}
|
306 |
if ( isset( $_GET['action'] ) && $_GET['action'] == 'wpuf_paypal_success' ) {
|
307 |
WP_User_Frontend::log( 'paypal-payment-info', print_r( $_POST, true ) );
|
308 |
|
309 |
+
$postdata = $_POST;
|
310 |
+
$type = $postdata['custom'];
|
311 |
+
$custom = json_decode( stripcslashes( $postdata['custom'] ) );
|
312 |
+
$item_number = ! empty( $postdata['item_number'] ) ? $postdata['item_number'] : 0;
|
313 |
+
$amount = $postdata['mc_gross'];
|
314 |
+
$is_recurring = false;
|
315 |
+
$post_id = $custom->type === 'post' ? $item_number : 0;
|
316 |
+
$pack_id = $custom->type === 'pack' ? $item_number : 0;
|
317 |
+
$transaction_id = isset( $postdata['txn_id'] ) ? sanitize_text_field( $postdata['txn_id'] ) : '';
|
318 |
|
319 |
$coupon_id = isset( $custom->coupon_id ) ? $custom->coupon_id : false;
|
320 |
|
328 |
return;
|
329 |
}
|
330 |
|
331 |
+
if ( $transaction_id && $this->transaction_exists( $transaction_id ) ) {
|
332 |
$wpdb->update( $wpdb->prefix . 'wpuf_transaction',
|
333 |
array( 'status' => strtolower( $postdata['payment_status'] ) ),
|
334 |
array(
|
335 |
+
'transaction_id' => $transaction_id
|
336 |
+
)
|
337 |
+
);
|
338 |
}
|
339 |
|
340 |
// check if recurring payment
|
407 |
'payer_email' => $postdata['payer_email'],
|
408 |
'payment_type' => 'Paypal',
|
409 |
'payer_address' => isset( $postdata['residence_country'] ) ? $postdata['residence_country'] : null,
|
410 |
+
'transaction_id' => $transaction_id,
|
411 |
'created' => current_time( 'mysql' ),
|
412 |
];
|
413 |
|
414 |
WP_User_Frontend::log( 'payment', 'inserting payment to database. ' . print_r( $data, true ) );
|
415 |
|
|
|
|
|
416 |
WPUF_Payment::insert_payment( $data, $transaction_id, $is_recurring );
|
417 |
|
418 |
if ( $coupon_id ) {
|
501 |
public function transaction_exists( $trns_id ) {
|
502 |
global $wpdb;
|
503 |
|
504 |
+
$query = $wpdb->prepare( "SELECT transaction_id FROM `{$wpdb->prefix}wpuf_transaction` WHERE transaction_id = %s LIMIT 0, 1", $trns_id );
|
|
|
|
|
505 |
|
506 |
+
return $wpdb->get_var( $query ) ? true : false;
|
507 |
}
|
508 |
|
509 |
}
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: Forms, registration, profile-builder, login, membership, frontend-post
|
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.6
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 3.5.
|
9 |
License: GPLv2
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -263,6 +263,10 @@ redirected to the edit page with that post id. Then you'll see the edit post for
|
|
263 |
|
264 |
== Changelog ==
|
265 |
|
|
|
|
|
|
|
|
|
266 |
= v3.5.11 (12 January, 2021) =
|
267 |
* Fix - QR and math captcha added to pro feature list
|
268 |
* Fix - Tooltip for category navigate
|
@@ -312,7 +316,7 @@ redirected to the edit page with that post id. Then you'll see the edit post for
|
|
312 |
* Fix - Post query loop for post forms
|
313 |
* Fix - Post edit could not be edited after unlocking post edit
|
314 |
* Fix - Taxes couldn't count properly when selecting different tax region
|
315 |
-
* Fix - Google map field validation doesn't work
|
316 |
* Fix - Redirect payment page after post updating
|
317 |
* Fix - Custom field value and link send as plain text when sending an email for post notification
|
318 |
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.6
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 3.5.12
|
9 |
License: GPLv2
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
263 |
|
264 |
== Changelog ==
|
265 |
|
266 |
+
= v3.5.12 (13 January, 2021) =
|
267 |
+
|
268 |
+
* Fix - Santized PayPal transaction ID for better security
|
269 |
+
|
270 |
= v3.5.11 (12 January, 2021) =
|
271 |
* Fix - QR and math captcha added to pro feature list
|
272 |
* Fix - Tooltip for category navigate
|
316 |
* Fix - Post query loop for post forms
|
317 |
* Fix - Post edit could not be edited after unlocking post edit
|
318 |
* Fix - Taxes couldn't count properly when selecting different tax region
|
319 |
+
* Fix - Google map field validation doesn't work
|
320 |
* Fix - Redirect payment page after post updating
|
321 |
* Fix - Custom field value and link send as plain text when sending an email for post notification
|
322 |
|
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: weDevs
|
7 |
-
Version: 3.5.
|
8 |
Author URI: https://wedevs.com/?utm_source=WPUF_Author_URI
|
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.5.
|
16 |
define( 'WPUF_FILE', __FILE__ );
|
17 |
define( 'WPUF_ROOT', __DIR__ );
|
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: weDevs
|
7 |
+
Version: 3.5.12
|
8 |
Author URI: https://wedevs.com/?utm_source=WPUF_Author_URI
|
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.5.12' );
|
16 |
define( 'WPUF_FILE', __FILE__ );
|
17 |
define( 'WPUF_ROOT', __DIR__ );
|
18 |
define( 'WPUF_ROOT_URI', plugins_url( '', __FILE__ ) );
|