Skip to content

Commit

Permalink
Merge pull request #9672 from awesomemotive/release/3.2.1
Browse files Browse the repository at this point in the history
Release 3.2.1
  • Loading branch information
cklosowski committed Sep 12, 2023
2 parents ee9dace + 44fa95e commit 4896dc4
Show file tree
Hide file tree
Showing 34 changed files with 701 additions and 511 deletions.
81 changes: 0 additions & 81 deletions .buildkite/pipeline.yml

This file was deleted.

61 changes: 37 additions & 24 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ module.exports = function ( grunt ) {
// Clean up build directory
clean: {
main: [ 'build/**' ],
repo: [ 'build/<%= pkg.name %>-public/**' ],
},

// Copy the plugin into the build directory
Expand Down Expand Up @@ -115,6 +116,33 @@ module.exports = function ( grunt ) {
],
dest: 'build/<%= pkg.name %>/',
},
repo: {
src: [
'**',
'assets/**',
'!assets/pro/**',
'!build/**',
'i18n/**',
'includes/**',
'!includes/blocks/pro/**',
'!includes/blocks/assets/pro/**',
'!includes/blocks/build/pro/**',
'!includes/blocks/node_modules/**',
'!includes/blocks/src/pro/**',
'languages/**',
'libraries/**',
'!node_modules/**',
'templates/**',
'vendor/**',
'src/**',
'!assets/pro/**',
'!vendor/**',
'vendor/autoload.php',
'vendor/composer/**',
'vendor/symfony/deprecation-contracts/**'
],
dest: 'build/<%= pkg.name %>-public/',
}
},

// Compress build directory into <name>.zip and <name>-<version>.zip
Expand Down Expand Up @@ -142,41 +170,26 @@ module.exports = function ( grunt ) {
},

replace: {
blocks: {
pro: {
options: {
patterns: [
{
match: /init_blocks/g,
replacement: 'init_core_blocks',
expression: true,
},
{
match: /update_required_pages/g,
replacement: 'update_core_required_pages',
expression: true,
},
{
match: /remove_action(.*);/g,
replacement: '',
expression: true,
},
{
match: /remove_filter(.*);/g,
replacement: '',
match: /Plugin Name: Easy Digital Downloads \(Pro\)/g,
replacement: 'Plugin Name: Easy Digital Downloads',
expression: true,
},
}
]
},
files: [
{
expand: true,
flatten: true,
src: [ 'includes/blocks/edd-blocks.php' ],
dest: 'includes/blocks'
src: [ 'build/easy-digital-downloads/easy-digital-downloads.php' ],
dest: 'build/easy-digital-downloads'
}
]
},
pro: {
repo: {
options: {
patterns: [
{
Expand All @@ -190,8 +203,8 @@ module.exports = function ( grunt ) {
{
expand: true,
flatten: true,
src: [ 'build/easy-digital-downloads/easy-digital-downloads.php' ],
dest: 'build/easy-digital-downloads'
src: [ 'build/easy-digital-downloads-public/easy-digital-downloads.php' ],
dest: 'build/easy-digital-downloads-public'
}
]
}
Expand Down
2 changes: 2 additions & 0 deletions assets/js/admin/downloads/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ var EDD_Download_Configuration = {
} );

if ( 'bundle' === product_type ) {
product_files.show();
edd_download_limit_wrap.hide();
} else if ( 'service' === $( this ).val() ) {
const has_files = product_files.find( '.edd_upload_field' ).toArray().some( el => !!el.value );
Expand All @@ -245,6 +246,7 @@ var EDD_Download_Configuration = {
edd_download_limit_wrap.show();
}
} else {
product_files.show();
edd_download_limit_wrap.show();
}
} );
Expand Down
2 changes: 1 addition & 1 deletion assets/js/edd-admin-downloads.js

Large diffs are not rendered by default.

22 changes: 0 additions & 22 deletions bin/.exclude

This file was deleted.

38 changes: 0 additions & 38 deletions bin/update-stripe.sh

This file was deleted.

2 changes: 1 addition & 1 deletion 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.2.0
* Version: 3.2.1
* Text Domain: easy-digital-downloads
* Domain Path: /languages
* Requires at least: 5.8
Expand Down
1 change: 0 additions & 1 deletion includes/.blocks-hash

This file was deleted.

4 changes: 3 additions & 1 deletion includes/admin/admin-bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ function edd_maybe_add_store_mode_admin_bar_menu( $wp_admin_bar ) {
),
) );

if ( ! edd_is_pro() ) {

$pass_manager = new \EDD\Admin\Pass_Manager();
if ( ! $pass_manager->has_pass() ) {
$url = edd_link_helper(
'https://easydigitaldownloads.com/lite-upgrade/',
array(
Expand Down
68 changes: 65 additions & 3 deletions includes/admin/class-edd-notices.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,21 @@ public function add_notice( $args = array() ) {
*/
public function add_notices() {

// User can view shop reports
// User can view shop reports.
if ( current_user_can( 'view_shop_reports' ) ) {
$this->add_reports_notices();
}

// User can manage the entire shop
// User can manage the entire shop.
if ( current_user_can( 'manage_shop_settings' ) ) {
$this->add_data_notices();
$this->add_settings_notices();
$this->add_order_upgrade_notice();
$this->add_stripe_notice();
$this->add_paypal_sync_notice();
}

// Generic notices
// Generic notices.
if ( ! empty( $_REQUEST['edd-message'] ) ) {
$this->add_user_action_notices( $_REQUEST['edd-message'] );
}
Expand Down Expand Up @@ -484,6 +486,66 @@ private function add_order_upgrade_notice() {
);
}

/**
* Adds a notice if the Stripe Pro gateway is outdated.
* This is due to a name change in the gateway.
*
* @since 3.2.1
* @return void
*/
private function add_stripe_notice() {
if ( ! defined( 'EDD_STRIPE_VERSION' ) || ( defined( 'EDD_STRIPE_VERSION' ) && version_compare( EDD_STRIPE_VERSION, '2.8.4', '>=' ) ) ) {
return;
}
$this->add_notice(
array(
'id' => 'edd-stripe-outdated',
'class' => 'notice-warning',
'message' => sprintf(
// translators: 1. opening link tag; 2. opening link tag; 3. closing link tag.
__( 'You are running an outdated version of the Easy Digital Downloads &mdash; Stripe Pro Payment Gateway. You may need to log into %1$syour account%3$s to download the latest version and %2$smanually upgrade%3$s it.', 'easy-digital-downloads' ),
'<a href="https://easydigitaldownloads.com/your-account/" target="_blank">',
'<a href="https://easydigitaldownloads.com/docs/how-do-i-install-an-extension/#faq" target="_blank">',
'</a>'
),
'is_dismissible' => false,
)
);
}

/**
* Adds a notice if PayPal webhooks need to synced.
*
* @since 3.2.1
* @return void
*/
private function add_paypal_sync_notice() {
if ( ! get_option( 'edd_paypal_webhook_sync_failed' ) ) {
return;
}
$url = edd_get_admin_url(
array(
'page' => 'edd-settings',
'tab' => 'gateways',
'section' => 'paypal_commerce',
)
);

$this->add_notice(
array(
'id' => 'edd-paypal-webhook-sync',
'class' => 'updated',
'message' => sprintf(
/* translators: %1$s: Opening anchor tag; %2$s: Closing anchor tag. */
__( 'New webhooks have been registered for PayPal Commerce, but we were unable to update them automatically. Please %1$ssync your webhooks manually%2$s.', 'easy-digital-downloads' ),
'<a href="' . esc_url( $url ) . '">',
'</a>'
),
'is_dismissible' => false,
)
);
}

/**
* Notices about actions that the user has taken
*
Expand Down
5 changes: 3 additions & 2 deletions includes/admin/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
* @return array $links
*/
function edd_plugin_action_links( $links = array() ) {
$edd_links = array();
$edd_links = array();
$pass_manager = new \EDD\Admin\Pass_Manager();

if ( ! edd_is_pro() ) {
if ( ! $pass_manager->has_pass() ) {

$url = edd_link_helper(
'https://easydigitaldownloads.com/lite-upgrade/',
Expand Down
Loading

0 comments on commit 4896dc4

Please sign in to comment.