Skip to content

Commit

Permalink
release/4.9.0 (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerfinnell authored Apr 2, 2024
1 parent 00fad3f commit ec1eed9
Show file tree
Hide file tree
Showing 255 changed files with 2,422 additions and 1,319 deletions.
215 changes: 112 additions & 103 deletions gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,116 +1,125 @@
module.exports = function( grunt ) {
module.exports = function (grunt) {
var pkg = grunt.file.readJSON("package.json");

var pkg = grunt.file.readJSON( 'package.json' );
console.log(pkg.title + " - " + pkg.version);

console.log( pkg.title + ' - ' + pkg.version );
// Set files to include/exclude in a release.
var distFiles = [
"**",
"!bower_components/**",
"!build/**",
"!node_modules/**",
"!vendor/bin/**",
"!wordpress_org_assets/**",
"!.editorconfig",
"!.gitignore",
"!.jshintrc",
"!bower.json",
"!composer.json",
"!composer.lock",
"!contributing.md",
"!gruntfile.js",
"!package.json",
"!package-lock.json",
"!readme.md",
"!**/*~",
];

// Set files to include/exclude in a release.
var distFiles = [
'**',
'!bower_components/**',
'!build/**',
'!node_modules/**',
'!vendor/bin/**',
'!wordpress_org_assets/**',
'!.editorconfig',
'!.gitignore',
'!.jshintrc',
'!bower.json',
'!composer.json',
'!composer.lock',
'!contributing.md',
'!gruntfile.js',
'!package.json',
'!package-lock.json',
'!readme.md',
'!**/*~'
];
grunt.initConfig({
pkg: pkg,

grunt.initConfig( {
// Validates text domain.
sed: {
textDomain: {
pattern: '"simple-pay"',
replacement: '"stripe"',
recursive: true,
path: "includes/core/assets/js/dist",
},
},

pkg: pkg,
checktextdomain: {
options: {
text_domain: "stripe",
correct_domain: true,
keywords: [
"__:1,2d",
"_e:1,2d",
"_x:1,2c,3d",
"esc_html__:1,2d",
"esc_html_e:1,2d",
"esc_html_x:1,2c,3d",
"esc_attr__:1,2d",
"esc_attr_e:1,2d",
"esc_attr_x:1,2c,3d",
"_ex:1,2c,3d",
"_n:1,2,4d",
"_nx:1,2,4c,5d",
"_n_noop:1,2,3d",
"_nx_noop:1,2,3c,4d",
],
},
files: {
src: [
"includes/**/*.php",
"includes/core/assets/js/dist/**.js",
"views/**/*.php",
"src/**/*.php",
"stripe-checkout.php",
"uninstall.php",
],
expand: true,
},
},

// Validates text domain.
checktextdomain: {
options: {
text_domain: 'stripe',
correct_domain: true,
keywords: [
'__:1,2d',
'_e:1,2d',
'_x:1,2c,3d',
'esc_html__:1,2d',
'esc_html_e:1,2d',
'esc_html_x:1,2c,3d',
'esc_attr__:1,2d',
'esc_attr_e:1,2d',
'esc_attr_x:1,2c,3d',
'_ex:1,2c,3d',
'_n:1,2,4d',
'_nx:1,2,4c,5d',
'_n_noop:1,2,3d',
'_nx_noop:1,2,3c,4d'
]
},
files: {
src: [
'includes/**/*.php',
'views/**/*.php',
'src/**/*.php',
'stripe-checkout.php',
'uninstall.php'
],
expand: true
}
},
// Adds/adjusts text domains.
addtextdomain: {
options: {
textdomain: "stripe",
},
target: {
files: {
src: ["includes/**/*.php", "stripe-checkout.php", "uninstall.php"],
},
},
},

// Adds/adjusts text domains.
addtextdomain: {
options: {
textdomain: 'stripe'
},
target: {
files: {
src: [
'includes/**/*.php',
'stripe-checkout.php',
'uninstall.php'
]
}
}
},
// Wipe out build folder.
clean: {
build: ["build"],
},

// Wipe out build folder.
clean: {
build: [ 'build' ]
},
// Build the plugin zip file and place in build folder.
compress: {
main: {
options: {
mode: "zip",
archive: "./build/stripe-<%= pkg.version %>.zip",
},
expand: true,
src: distFiles,
dest: "/stripe",
},
},

// Build the plugin zip file and place in build folder.
compress: {
main: {
options: {
mode: 'zip',
archive: './build/stripe-<%= pkg.version %>.zip'
},
expand: true,
src: distFiles,
dest: '/stripe'
}
},
// Copy files to build folder.
copy: {
main: {
expand: true,
src: distFiles,
dest: "build/stripe",
},
},
});

// Copy files to build folder.
copy: {
main: {
expand: true,
src: distFiles,
dest: 'build/stripe'
}
},
} );
require("load-grunt-tasks")(grunt);

require( 'load-grunt-tasks' )( grunt );
grunt.registerTask("build", [
"checktextdomain",
"clean:build",
"copy:main",
"compress",
]);

grunt.registerTask( 'build', [ 'checktextdomain', 'clean:build', 'copy:main', 'compress' ] );

grunt.util.linefeed = '\n';
grunt.util.linefeed = "\n";
};
48 changes: 25 additions & 23 deletions includes/core/admin/class-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function enqueue_on_all_admin_pages() {
// Notices.
wp_enqueue_script(
'simpay-notices',
SIMPLE_PAY_INC_URL . 'core/assets/js/simpay-admin-notices.min.js',
SIMPLE_PAY_INC_URL . 'core/assets/js/dist/simpay-admin-notices.js',
array( 'wp-util', 'jquery' ),
SIMPLE_PAY_VERSION,
true
Expand All @@ -86,14 +86,15 @@ public function setup() {
'footer' => false,
),
'simpay-shared' => array(
'src' => SIMPLE_PAY_INC_URL . 'core/assets/js/simpay-public-shared.min.js',
'src' => SIMPLE_PAY_INC_URL . 'core/assets/js/dist/simpay-public-shared.js',
'deps' => array( 'jquery', 'simpay-accounting' ),
'ver' => SIMPLE_PAY_VERSION,
'footer' => false,
),
'simpay-admin' => array(
'src' => SIMPLE_PAY_INC_URL . 'core/assets/js/simpay-admin.min.js',
'src' => SIMPLE_PAY_INC_URL . 'core/assets/js/dist/simpay-admin.js',
'deps' => array(
'common',
'jquery',
'simpay-chosen',
'simpay-accounting',
Expand Down Expand Up @@ -181,80 +182,81 @@ public function register() {
'minAmount' => simpay_global_minimum_amount(),
'isUpe' => simpay_is_upe(),
'i18n' => array(
'dateFormat' => simpay_get_date_format(),
'mediaTitle' => esc_html__(
'dateFormat' => simpay_get_date_format(),
'mediaTitle' => esc_html__(
'Insert Media',
'stripe'
),
'mediaButtonText' => esc_html__(
'mediaButtonText' => esc_html__(
'Use Image',
'stripe'
),
'leavePageConfirm' => esc_html__(
'leavePageConfirm' => esc_html__(
'The changes you made will be lost if you navigate away from this page.',
'stripe'
),
'disconnectConfirm' => esc_html__(
'disconnectConfirm' => esc_html__(
'Disconnect',
'stripe'
),
'disconnectCancel' => esc_html__(
'disconnectCancel' => esc_html__(
'Cancel',
'stripe'
),
'addonActivate' => esc_html__(
'addonActivate' => esc_html__(
'Activate',
'stripe'
),
'addonActivated' => esc_html__(
'addonActivated' => esc_html__(
'Activated',
'stripe'
),
'addonActive' => esc_html__(
'addonActive' => esc_html__(
'Active',
'stripe'
),
'addonDeactivate' => esc_html__(
'addonDeactivate' => esc_html__(
'Deactivate',
'stripe'
),
'addonInactive' => esc_html__(
'addonInactive' => esc_html__(
'Inactive',
'stripe'
),
'addonInstall' => esc_html__(
'addonInstall' => esc_html__(
'Install Addon',
'stripe'
),
'addonError' => esc_html__(
'addonError' => esc_html__(
'Could not install the addon. Please download it from wpforms.com and install it manually.',
'stripe'
),
'pluginError' => esc_html__(
'pluginError' => esc_html__(
'Could not install the plugin automatically. Please download and install it manually.',
'stripe'
),
'pluginInstallActivate' => esc_html__(
'pluginInstallActivate' => esc_html__(
'Install and Activate',
'stripe'
),
'pluginActivate' => esc_html__(
'pluginActivate' => esc_html__(
'Activate',
'stripe'
),
'trashFormConfirm' => esc_html__(
'trashFormConfirm' => esc_html__(
'Warning: Removing a payment form will prevent active subscriptions from sending upcoming invoice and invoice receipt emails. It is recommended to leave payment forms that have accepted Live Mode payments published.',
'stripe'
),
/* translators: Minimum payment amount. */
'customAmountLabel' => esc_html__( 'starting at %s', 'stripe' ),
'recurringIntervals' => simpay_get_recurring_intervals(),
/* translators: %s: Minimum payment amount. */
'customAmountLabel' => esc_html__( 'starting at %s', 'stripe' ),
'recurringIntervals' => simpay_get_recurring_intervals(),
/* translators: %1$s Recurring amount. %2$s Recurring interval count. %3$s Recurring interval. */
'recurringIntervalDisplay' => esc_html_x(
'%1$s every %2$s %3$s',
'recurring interval',
'stripe'
),

),
)
);
Expand Down
1 change: 1 addition & 0 deletions includes/core/assets/css/admin/settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@
&.simpay-settings-subsection-payment-confirmation,
&.simpay-settings-subsection-payment-notification,
&.simpay-settings-subsection-upcoming-invoice,
&.simpay-settings-subsection-manage-subscriptions,
&.simpay-settings-subsection-invoice-confirmation {
display: none;
}
Expand Down
2 changes: 1 addition & 1 deletion includes/core/assets/css/simpay-admin.min.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => '10e0c9aefff5d3a8302d317cb61bc427');
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-url'), 'version' => '0024d0220a1e13e29b7e2cc30458d3e4');
<?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-url'), 'version' => 'af7158193a243840baf147a2c1cd6f5e');

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => 'f65ff075fab34cb49b6d582d31577036');
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-url'), 'version' => '8fb0c2ee464e3ea4e3de4e92a8502b62');
<?php return array('dependencies' => array('lodash', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-url'), 'version' => '5dce049d9407deb8d0ff4624ab58bb21');
Loading

0 comments on commit ec1eed9

Please sign in to comment.