Skip to content

Commit

Permalink
Merge pull request #9771 from awesomemotive/release/3.3.5.2
Browse files Browse the repository at this point in the history
Release 3.3.5.2
  • Loading branch information
cklosowski authored Nov 22, 2024
2 parents 8b7d4e3 + 9da2f1e commit 5207cb0
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 8 deletions.
4 changes: 2 additions & 2 deletions easy-digital-downloads.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: The easiest way to sell digital products with WordPress.
* Author: Easy Digital Downloads
* Author URI: https://easydigitaldownloads.com
* Version: 3.3.5.1
* Version: 3.3.5.2
* Text Domain: easy-digital-downloads
* Domain Path: /languages
* Requires at least: 6.0
Expand All @@ -27,7 +27,7 @@
* @package EDD
* @category Core
* @author Easy Digital Downloads
* @version 3.3.5.1
* @version 3.3.5.2
*/

// Exit if accessed directly.
Expand Down
2 changes: 1 addition & 1 deletion includes/class-easy-digital-downloads.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ private function setup_constants() {

// Plugin version.
if ( ! defined( 'EDD_VERSION' ) ) {
define( 'EDD_VERSION', '3.3.5.1' );
define( 'EDD_VERSION', '3.3.5.2' );
}

// Make sure CAL_GREGORIAN is defined.
Expand Down
4 changes: 2 additions & 2 deletions includes/process-purchase.php
Original file line number Diff line number Diff line change
Expand Up @@ -746,8 +746,8 @@ function edd_register_and_login_new_user( $user_data = array() ) {
'user_login' => '',
'user_pass' => '',
'user_email' => '',
'first_name' => '',
'last_name' => '',
'first_name' => isset( $user_data['user_first'] ) ? $user_data['user_first'] : '',
'last_name' => isset( $user_data['user_last'] ) ? $user_data['user_last'] : '',
'role' => get_option( 'default_role' ),
);
$user_args = wp_parse_args( $user_data, $defaults );
Expand Down
4 changes: 2 additions & 2 deletions languages/easy-digital-downloads.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the same license as the Easy Digital Downloads plugin.
msgid ""
msgstr ""
"Project-Id-Version: Easy Digital Downloads 3.3.5.1\n"
"Project-Id-Version: Easy Digital Downloads 3.3.5.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/easy-digital-downloads-public\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2024-11-14T23:08:35+00:00\n"
"POT-Creation-Date: 2024-11-22T09:18:08+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.11.0\n"

Expand Down
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Tags: ecommerce, payments, sell, digital store, stripe
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Stable Tag: 3.3.5.1
Stable Tag: 3.3.5.2
License: GPLv2 or later

The #1 eCommerce plugin to sell digital products & subscriptions. Accept credit card payments with Stripe & PayPal and start your store today.
Expand Down Expand Up @@ -237,6 +237,11 @@ Check out some of our popular posts for actionable advice for running your busin
8. Checkout Form Block - Default Theme

== Changelog ==

= 3.3.5.2 =
* Checkout: Fixed a user's first/last name not saving to their WordPress account when registering during checkout.
* Checkout: Fixed purchase data being sent to some gateways which process credit cards from form data.

= 3.3.5.1 =
* Stripe: Fixed issues with displaying and saving Stripe settings.

Expand Down
4 changes: 4 additions & 0 deletions src/Sessions/PurchaseData.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ public static function set( $valid_data, $user ) {

edd_set_purchase_session( $purchase_data );

// Send the card info and post data back to the purchase data, even though it's not stored in the session.
$purchase_data['card_info'] = $valid_data['cc_info'] ?? array();
$purchase_data['post_data'] = $_POST;

return $purchase_data;
}

Expand Down
4 changes: 4 additions & 0 deletions tests/sessions/tests-purchase-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public function test_edd_get_purchase_session_logged_in_user() {
'edd_email' => '[email protected]',
);
$purchase_session = \EDD\Sessions\PurchaseData::start( false );
unset( $purchase_session['card_info'] );
unset( $purchase_session['post_data'] );

$this->assertEquals( $user_id, $purchase_session['user_info']['id'] );
$this->assertEquals( $_POST['edd_email'], $purchase_session['user_info']['email'] );
Expand All @@ -48,6 +50,8 @@ public function test_edd_get_purchase_session_guest() {
);

$purchase_session = \EDD\Sessions\PurchaseData::start();
unset( $purchase_session['card_info'] );
unset( $purchase_session['post_data'] );

$this->assertEmpty( $purchase_session['user_info']['id'] );
$this->assertEquals( $_POST['edd_email'], $purchase_session['user_info']['email'] );
Expand Down

0 comments on commit 5207cb0

Please sign in to comment.