Merge pull request #32116 from woocommerce/merge/woocommerce-beta-tester

Merge WooCommerce Beta Tester Plugin
This commit is contained in:
Christopher Allford 2022-03-18 10:30:54 -07:00 committed by GitHub
commit 8efe01fe8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
42 changed files with 5101 additions and 67 deletions

View File

@ -0,0 +1,17 @@
.distignore
.editorconfig
.gitignore
.travis.yml
.git/
.wordpress-org/
composer.json
composer.lock
package-lock.json
package.json
phpcs.xml
# build files
woocommerce-beta-tester.zip
node_modules/
build/
bin/

View File

@ -0,0 +1,24 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
tab_width = 4
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true
[*.txt]
trim_trailing_whitespace = false
[*.{md,json,yml}]
trim_trailing_whitespace = false
indent_style = space
indent_size = 2

View File

@ -0,0 +1 @@
*.min.js

View File

@ -0,0 +1,25 @@
{
"root": true,
"env": {
"browser": true,
"node": true
},
"globals": {
"wp": true,
"es6": true
},
"rules": {
"camelcase": 0,
"indent": 0,
"max-len": [
2,
{
"code": 140
}
],
"no-console": 1
},
"parserOptions": {
"ecmaVersion": 6
}
}

View File

@ -0,0 +1,15 @@
# Contributing ✨
Your help will be greatly appreciated :)
WooCommerce is licensed under the GPLv3+, and all contributions to the project will be released under the same license. You maintain copyright over any contribution you make, and by submitting a pull request, you are agreeing to release that contribution under the GPLv3+ license.
## Coding Guidelines and Development 🛠
- Ensure you stick to the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/)
- Whenever possible please fix pre-existing code standards errors in the files that you change. It is ok to skip that for larger files or complex fixes.
- Ensure you use LF line endings in your code editor. Use [EditorConfig](http://editorconfig.org/) if your editor supports it so that indentation, line endings and other settings are auto configured.
- When committing, reference your issue number (#1234) and include a note about the fix.
- Push the changes to your fork and submit a pull request on the trunk branch of the repository.
- Make sure to write good and detailed commit messages (see [this post](https://chris.beams.io/posts/git-commit/) for more on this) and follow all the applicable sections of the pull request template.
- Please avoid modifying the changelog directly or updating the .pot files. These will be updated by the team.

View File

@ -0,0 +1,7 @@
<!-- This form is for other issue types specific to WooCommerce Beta Tester Plugin. This is not a support portal. -->
**Prerequisites (mark completed items with an [x]):**
- [ ] I have checked that my issue type is not listed here https://github.com/woocommerce/woocommerce-beta-tester/issues/new/choose
- [ ] My issue is not a security issue, bug report, or enhancement (Please use the link above if it is).
**Issue Description:**

View File

@ -0,0 +1,56 @@
name: 🐞 Bug Report
description: Report a bug if something isn't working as expected in WooCommerce Beta Tester Plugin.
body:
- type: markdown
attributes:
value: |
### Thanks for contributing!
Please provide us with the information requested in this bug report.
Without these details, we won't be able to fully evaluate this issue.
Bug reports lacking detail, or for any other reason than to report a bug, may be closed without action.
Make sure to look through the [existing `bug` issues](https://github.com/woocommerce/woocommerce-beta-tester/issues?q=is%3Aissue+is%3Aopen+label%3Abug) to see whether your bug has already been submitted.
Feel free to contribute to any existing issues.
- type: checkboxes
id: prerequisites
attributes:
label: Prerequisites
description: Please confirm these before submitting the issue.
options:
- label: I have carried out troubleshooting steps and I believe I have found a bug.
- label: I have searched for similar bugs in both open and closed issues and cannot find a duplicate.
validations:
required: true
- type: textarea
id: summary
attributes:
label: Describe the bug
description: |
A clear and concise description of what the bug is and what actually happens. Please be as descriptive as possible.
Please also include any error logs or output.
If applicable you can attach screenshot(s) or recording(s) directly by dragging & dropping.
validations:
required: true
- type: textarea
id: environment
attributes:
label: WordPress Environment
description: |
Please share the [WooCommerce System Status Report](https://woocommerce.com/document/understanding-the-woocommerce-system-status-report/) of your site to help us evaluate the issue.
placeholder: |
The System Status Report is found in your WordPress admin under **WooCommerce > Status**.
Please select “Get system report”, then “Copy for support”, and then paste it here.
- type: checkboxes
id: isolating
attributes:
label: Isolating the problem
description: |
Please try testing your site for theme and plugins conflict.
To do that deactivate all plugins except for WooCommerce and WooCommerce Beta Tester and switch to a default WordPress theme or [Storefront](https://en-gb.wordpress.org/themes/storefront/). Then test again.
If the issue is resolved with the default theme and all plugins deactivated, it means that one of your plugins or a theme is causing the issue.
You will then need to enable it one by one and test every time you do that in order to figure out which plugin is causing the issue.
options:
- label: I have deactivated other plugins and confirmed this bug occurs when only WooCommerce and WooCommerce Beta Tester plugins are active.
- label: This bug happens with a default WordPress theme active, or [Storefront](https://woocommerce.com/storefront/).
- label: I can reproduce this bug consistently using the steps above.

View File

@ -0,0 +1,30 @@
name: ✨ Enhancement Request
description: If you have an idea to improve WooCommerce Beta Tester Plugin or need something for development please let us know or submit a Pull Request!
title: "[Enhancement]: "
body:
- type: markdown
attributes:
value: |
### Thanks for contributing!
Please provide us with the information requested in this form.
Make sure to look through [existing `enhancement` issues](https://github.com/woocommerce/woocommerce-beta-tester/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) to see whether your idea is already being discussed.
Feel free to contribute to any existing issues.
- type: textarea
id: summary
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: alternative
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
id: context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.

View File

@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: 🔒 Security issue
url: https://hackerone.com/automattic/
about: For security reasons, please report all security issues via HackerOne. Also, if the issue is valid, a bug bounty will be paid out to you. Please disclose responsibly and not via GitHub (which allows for exploiting issues in the wild before the patch is released).

View File

@ -0,0 +1,37 @@
### All Submissions:
* [ ] Have you followed the [Contributing guidelines](https://github.com/woocommerce/woocommerce-beta-tester/blob/trunk/.github/CONTRIBUTING.md)?
* [ ] Does your code follow the [WordPress' coding standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/)?
* [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/woocommerce/woocommerce-beta-tester/pulls) for the same update/change?
<!-- Mark completed items with an [x] -->
<!-- You can erase any parts of this template not applicable to your Pull Request. -->
### Changes proposed in this Pull Request:
<!-- Describe the changes made to this Pull Request and the reason for such changes. -->
Closes # .
### How to test the changes in this Pull Request:
1.
2.
3.
### Other information:
* [ ] Have you added an explanation of what your changes do and why you'd like us to include them?
* [ ] Have you written new tests for your changes, as applicable?
* [ ] Have you successfully run tests with your changes locally?
<!-- Mark completed items with an [x] -->
### Changelog entry
> Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.
### FOR PR REVIEWER ONLY:
* [ ] I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

View File

@ -0,0 +1,19 @@
# Operating System files
.DS_Store
Thumbs.db
# IDE files
.idea
.vscode/
project.xml
project.properties
.project
.settings*
*.sublime-project
*.sublime-workspace
.sublimelinterrc
vendor/
node_modules/
build/
woocommerce-beta-tester.zip

View File

@ -0,0 +1,19 @@
language: php
before_script:
- |
# Remove Xdebug for a huge performance increase:
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
phpenv config-rm xdebug.ini
else
echo "xdebug.ini does not exist"
fi
- composer install
script:
- ./vendor/bin/phpcs -s -n -p *
# Specifies that Travis should create branch builds only for master.
branches:
only:
- master

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -0,0 +1,3 @@
.plugins_page_wc-beta-tester-version-picker .wc-backbone-modal-main .wc-backbone-modal-header h1 {
margin: 0 35px 0 0;
}

View File

@ -0,0 +1,44 @@
/**
* Handles version information modal.
*
* @package WooCommerceBetaTester\JS
*/
jQuery(function( $ ) {
/**
* Version information
*/
var wc_beta_tester_version_information = {
/**
* Initialize Version Information click
*/
init: function() {
$( '#wp-admin-bar-show-version-info' )
.on( 'click', this.showModal );
},
/**
* Handler for showing/hiding version information modal
*/
showModal: function( event ) {
event.preventDefault();
// Prevent multiple modals.
if ( 0 < $( '.wc-backbone-modal-beta-tester-version-info' ).length ) {
return;
}
$( this ).WCBackboneModal({
template: 'wc-beta-tester-version-info',
variable: {
version: wc_beta_tester_version_info_params.version,
description: wc_beta_tester_version_info_params.description,
},
});
}
};
wc_beta_tester_version_information.init();
});

View File

@ -0,0 +1 @@
jQuery(function(i){({init:function(){i("#wp-admin-bar-show-version-info").on("click",this.showModal)},showModal:function(e){e.preventDefault(),0<i(".wc-backbone-modal-beta-tester-version-info").length||i(this).WCBackboneModal({template:"wc-beta-tester-version-info",variable:{version:wc_beta_tester_version_info_params.version,description:wc_beta_tester_version_info_params.description}})}}).init()});

View File

@ -0,0 +1,63 @@
/**
* Handles the version picker form.
*
* @package WooCommerceBetaTester\JS
*/
jQuery(function( $ ) {
/**
* Version picker
*/
var wc_beta_tester_version_picker = {
/**
* Initialize Version Information click
*/
init: function() {
instance = this;
instance.new_version = undefined;
$( '#wcbt-modal-version-switch-confirm' )
.on( 'click', this.showConfirmVersionSwitchModal );
$( 'input[type=radio][name=wcbt_switch_to_version]' ).change( function() {
if ( $( this ).is( ':checked' ) ) {
instance.new_version = $( this ).val();
}
} ).trigger( 'change' );
},
/**
* Handler for showing/hiding version switch modal
*/
showConfirmVersionSwitchModal: function( event ) {
event.preventDefault();
if ( ! instance.new_version ) {
alert( wc_beta_tester_version_picker_params.i18n_pick_version );
} else {
$( this ).WCBackboneModal({
template: 'wcbt-version-switch-confirm',
variable: {
new_version: instance.new_version,
},
});
$( '#wcbt-submit-version-switch' )
.on( 'click', instance.submitSwitchVersionForm );
}
},
/**
* Submit form to switch version of WooCommerce.
*/
submitSwitchVersionForm: function( event ) {
event.preventDefault();
$( 'form[name=wcbt-select-version]' ).get( 0 ).submit();
},
};
wc_beta_tester_version_picker.init();
});

View File

@ -0,0 +1 @@
jQuery(function(n){({init:function(){instance=this,instance.new_version=void 0,n("#wcbt-modal-version-switch-confirm").on("click",this.showConfirmVersionSwitchModal),n("input[type=radio][name=wcbt_switch_to_version]").change(function(){n(this).is(":checked")&&(instance.new_version=n(this).val())}).trigger("change")},showConfirmVersionSwitchModal:function(i){i.preventDefault(),instance.new_version?(n(this).WCBackboneModal({template:"wcbt-version-switch-confirm",variable:{new_version:instance.new_version}}),n("#wcbt-submit-version-switch").on("click",instance.submitSwitchVersionForm)):alert(wc_beta_tester_version_picker_params.i18n_pick_version)},submitSwitchVersionForm:function(i){i.preventDefault(),n("form[name=wcbt-select-version]").get(0).submit()}}).init()});

View File

@ -0,0 +1,28 @@
#!/bin/sh
PLUGIN_SLUG="woocommerce-beta-tester"
PROJECT_PATH=$(pwd)
BUILD_PATH="${PROJECT_PATH}/build"
DEST_PATH="$BUILD_PATH/$PLUGIN_SLUG"
echo "Generating build directory..."
rm -rf "$BUILD_PATH"
mkdir -p "$DEST_PATH"
echo "Installing PHP and JS dependencies..."
npm install
echo "Running JS Build..."
npm run uglify
echo "Syncing files..."
rsync -rc --exclude-from="$PROJECT_PATH/.distignore" "$PROJECT_PATH/" "$DEST_PATH/" --delete --delete-excluded
echo "Generating zip file..."
cd "$BUILD_PATH" || exit
zip -q -r "${PLUGIN_SLUG}.zip" "$PLUGIN_SLUG/"
cd "$PROJECT_PATH" || exit
mv "$BUILD_PATH/${PLUGIN_SLUG}.zip" "$PROJECT_PATH"
echo "${PLUGIN_SLUG}.zip file generated!"
echo "Build done!"

View File

@ -0,0 +1,11 @@
== Changelog ==
2021-12-17 - version 2.0.5
- Fix: make WC version comparison case insensitive
2021-09-29 - version 2.0.4
- Dev: Bump tested to version
- Fix: enqueue logic for css/js assets
2021-09-22 - version 2.0.3
- Fix: Bump version to release version including admin.css.

View File

@ -0,0 +1,43 @@
{
"name": "woocommerce/woocommerce-beta-tester",
"description": "Run the beta versions of WooCommerce.",
"homepage": "https://woocommerce.com/",
"type": "wordpress-plugin",
"license": "GPL-3.0-or-later",
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"composer/installers": "~1.7"
},
"require-dev": {
"phpunit/phpunit": "6.5.14",
"woocommerce/woocommerce-sniffs": "^0.1.2"
},
"scripts": {
"test": [
"phpunit"
],
"phpcs": [
"phpcs -s -p"
],
"phpcs-pre-commit": [
"phpcs -s -p -n"
],
"phpcbf": [
"phpcbf -p"
]
},
"extra": {
"scripts-description": {
"test": "Run unit tests",
"phpcs": "Analyze code against the WordPress coding standards with PHP_CodeSniffer",
"phpcbf": "Fix coding standards warnings/errors automatically with PHP Code Beautifier"
}
},
"config": {
"allow-plugins": {
"composer/installers": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,65 @@
<?php
/**
* Beta Tester Admin Assets class
*
* @package WC_Beta_Tester
*/
defined( 'ABSPATH' ) || exit;
/**
* WC_Beta_Tester_Admin_Assets Class.
*/
class WC_Beta_Tester_Admin_Assets {
/**
* Hook in tabs.
*/
public function __construct() {
add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
}
/**
* Enqueue scripts.
*/
public function admin_scripts() {
$screen = get_current_screen();
$screen_id = $screen ? $screen->id : '';
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
$version = WC_VERSION;
// Need admin styles for the modal.
wp_register_style( 'wc-beta-tester-admin', WC_Beta_Tester::instance()->plugin_url() . '/assets/css/admin.css', array( 'woocommerce_admin_styles' ) );
// Register scripts.
wp_register_script( 'wc-beta-tester-version-info', WC_Beta_Tester::instance()->plugin_url() . '/assets/js/version-information' . $suffix . '.js', array( 'wc-backbone-modal' ), WC_BETA_TESTER_VERSION );
wp_register_script( 'wc-beta-tester-version-picker', WC_Beta_Tester::instance()->plugin_url() . '/assets/js/version-picker' . $suffix . '.js', array( 'wc-backbone-modal' ), WC_BETA_TESTER_VERSION );
wp_localize_script(
'wc-beta-tester-version-info',
'wc_beta_tester_version_info_params',
array(
'version' => $version,
/* translators: %s: Release version number */
'description' => sprintf( __( 'Release of version %s', 'woocommerce-beta-tester' ), $version ),
)
);
wp_localize_script(
'wc-beta-tester-version-picker',
'wc_beta_tester_version_picker_params',
array(
'i18n_pick_version' => __( 'Please pick a WooCommerce version.', 'woocommerce-beta-tester' ),
)
);
if ( in_array( $screen_id, array( 'plugins_page_wc-beta-tester', 'plugins_page_wc-beta-tester-version-picker' ) ) ) {
wp_enqueue_style( 'wc-beta-tester-admin' );
wp_enqueue_script( 'wc-beta-tester-version-info' );
wp_enqueue_script( 'wc-beta-tester-version-picker' );
}
}
}
return new WC_Beta_Tester_Admin_Assets();

View File

@ -0,0 +1,379 @@
<?php
/**
* Beta Tester Admin Menus class
*
* @package WC_Beta_Tester
*/
defined( 'ABSPATH' ) || exit;
/**
* WC_Beta_Tester_Admin_Menus Main Class.
*/
class WC_Beta_Tester_Admin_Menus {
/**
* Constructor
*/
public function __construct() {
if ( class_exists( 'WC_Admin_Status' ) ) {
add_action( 'admin_bar_menu', array( $this, 'admin_bar_menus' ), 50 );
}
add_action( 'admin_footer', array( $this, 'version_information_template' ) );
add_action( 'admin_head', array( $this, 'hide_from_menus' ) );
}
/**
* Get issue template from GitHub.
*
* @return string
*/
protected function get_ticket_template() {
ob_start();
?>
**Describe the bug**
A clear and concise description of what the bug is. Please be as descriptive as possible; issues lacking detail, or for any other reason than to report a bug, may be closed without action.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Isolating the problem (mark completed items with an [x]):**
- [ ] I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
- [ ] This bug happens with a default WordPress theme active, or [Storefront](https://woocommerce.com/storefront/).
- [ ] I can reproduce this bug consistently using the steps above.
**WordPress Environment**
<details>
```
Copy and paste the system status report from **WooCommerce > System Status** in WordPress admin.
```
</details>
<?php
$bug_tpl = ob_get_clean();
return $bug_tpl;
}
/**
* Get info about the current theme for SSR.
*
* @param string $theme Current theme.
* @return string
*/
private function get_theme_ssr_info( $theme ) {
$theme_info = __( "\n\n### Theme ###\n\n", 'woocommerce-beta-tester' );
$version = $theme['version'];
if ( version_compare( $theme['version'], $theme['version_latest'], '<' ) ) {
/* translators: 1: latest version */
$version .= sprintf( __( ' - %s is available', 'woocommerce-beta-tester' ), esc_html( $theme['version_latest'] ) );
}
$child_theme = $theme['is_child_theme'] ? __( 'Yes', 'woocommerce-beta-tester' ) : __( 'No - If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme.', 'woocommerce-beta-tester' );
if ( $theme['is_child_theme'] ) {
$parent_version = $theme['parent_version'];
if ( version_compare( $theme['parent_version'], $theme['parent_version_latest'], '<' ) ) {
/* translators: 1: latest version */
$parent_version .= sprintf( __( ' - %s is available', 'woocommerce-beta-tester' ), esc_html( $theme['parent_version_latest'] ) );
}
$child_theme .= sprintf(
__( "Parent theme name: %1\$s\nParent theme version: %2\$s\nParent theme author URL: %3\$s\n", 'woocommerce-beta-tester' ),
$theme['parent_name'],
$parent_version,
$theme['parent_author_url']
);
}
$theme_info .= sprintf(
__( "Name: %1\$s\nVersion: %2\$s\nAuthor URL: %3\$s\nChild Theme: %4\$s\nWooCommerce Support: %5\$s", 'woocommerce-beta-tester' ),
$theme['name'],
$version,
esc_html( $theme['author_url'] ),
$child_theme,
! $theme['has_woocommerce_support'] ? __( 'Not declared', 'woocommerce-beta-tester' ) : __( 'Yes', 'woocommerce-beta-tester' )
);
return $theme_info;
}
/**
* Get info about the current plugins for SSR.
*
* @param array $active_plugins List of active plugins.
* @param array $untested_plugins List of untested plugins.
* @return string
*/
private function get_plugins_ssr_info( $active_plugins, $untested_plugins ) {
$plugins_info = __( "\n\n### Plugins ###\n\n", 'woocommerce-beta-tester' );
foreach ( $active_plugins as $plugin ) {
if ( ! empty( $plugin['name'] ) ) {
// Link the plugin name to the plugin url if available.
$plugin_name = esc_html( $plugin['name'] );
$version_string = '';
$network_string = '';
if ( strstr( $plugin['url'], 'woothemes.com' ) || strstr( $plugin['url'], 'woocommerce.com' ) ) {
if ( ! empty( $plugin['version_latest'] ) && version_compare( $plugin['version_latest'], $plugin['version'], '>' ) ) {
/* translators: %s: plugin latest version */
$version_string = sprintf( esc_html__( '%s is available', 'woocommerce-beta-tester' ), $plugin['version_latest'] );
}
if ( false !== (bool) $plugin['network_activated'] ) {
$network_string = __( 'Network enabled', 'woocommerce-beta-tester' );
}
}
$untested_string = '';
if ( array_key_exists( $plugin['plugin'], $untested_plugins ) ) {
$untested_string = __( 'Not tested with the active version of WooCommerce', 'woocommerce-beta-tester' );
}
$plugins_info .= sprintf( __( "%1\$s: by %2\$s - %3\$s - %4\$s\n", 'woocommerce-beta-tester' ), $plugin_name, $plugin['author_name'], $plugin['version'], $version_string . $untested_string . $network_string );
}
}
return $plugins_info;
}
/**
* Constructs a WC System Status Report.
*
* @return string
*/
protected function construct_ssr() {
if ( version_compare( WC()->version, '3.6', '<' ) ) {
return '';
}
$transient_name = 'wc-beta-tester-ssr';
$ssr = get_transient( $transient_name );
if ( false === $ssr ) {
// When running WC 3.6 or greater it is necessary to manually load the REST API classes.
if ( ! did_action( 'rest_api_init' ) ) {
WC()->api->rest_api_includes();
}
if ( ! class_exists( 'WC_REST_System_Status_Controller' ) ) {
return '';
}
// Get SSR.
$api = new WC_REST_System_Status_Controller();
$schema = $api->get_item_schema();
$mappings = $api->get_item_mappings();
$response = array();
foreach ( $mappings as $section => $values ) {
foreach ( $values as $key => $value ) {
if ( isset( $schema['properties'][ $section ]['properties'][ $key ]['type'] ) ) {
settype( $values[ $key ], $schema['properties'][ $section ]['properties'][ $key ]['type'] );
}
}
settype( $values, $schema['properties'][ $section ]['type'] );
$response[ $section ] = $values;
}
$ssr = '';
foreach ( $response['environment'] as $key => $value ) {
$index = $key;
if ( 'external_object_cache' === $index ) {
$ssr .= sprintf( "%s: %s\n", 'External object cache', wc_bool_to_string( $value ) );
continue;
}
if ( is_bool( $value ) ) {
$value = wc_bool_to_string( $value );
}
$ssr .= sprintf( "%s: %s\n", $schema['properties']['environment']['properties'][ $index ]['description'], $value );
}
$active_plugins = $api->get_active_plugins();
$plugin_updates = new WC_Plugin_Updates();
$untested_plugins = $plugin_updates->get_untested_plugins( WC()->version, 'minor' );
$ssr .= $this->get_plugins_ssr_info( $active_plugins, $untested_plugins );
$theme = $api->get_theme_info();
$ssr .= $this->get_theme_ssr_info( $theme );
set_transient( $transient_name, $ssr, DAY_IN_SECONDS );
}
return $ssr;
}
/**
* Get URL for creating a GitHub ticket.
*
* @return string
*/
protected function get_github_ticket_url() {
$bug_tpl = $this->get_ticket_template();
$ssr = $this->construct_ssr();
$body = str_replace( 'Copy and paste the system status report from **WooCommerce > System Status** in WordPress admin.', $ssr, $bug_tpl );
$body = str_replace( '```', '', $body ); // Remove since this break how is displayed.
$wc_plugin_data = get_plugin_data( WC_PLUGIN_FILE );
if ( isset( $wc_plugin_data['Version'] ) ) {
$version = $wc_plugin_data['Version'];
} else {
$version = '-';
}
return add_query_arg(
array(
'body' => rawurlencode( $body ),
/* translators: %s: woocommerce version */
'title' => rawurlencode( sprintf( __( '[WC Beta Tester] Bug report for version "%s"', 'woocommerce-beta-tester' ), $version ) ),
),
'https://github.com/woocommerce/woocommerce/issues/new'
);
}
/**
* Add the "Visit Store" link in admin bar main menu.
*
* @param WP_Admin_Bar $wp_admin_bar Admin bar instance.
*/
public function admin_bar_menus( $wp_admin_bar ) {
if ( ! is_admin() || ! is_user_logged_in() ) {
return;
}
// Show only when the user is a member of this site, or they're a super admin.
if ( ! is_user_member_of_blog() && ! is_super_admin() ) {
return;
}
// Add the beta tester root node.
$wp_admin_bar->add_node(
array(
'parent' => 0,
'id' => 'wc-beta-tester',
'title' => __( 'WC Beta Tester', 'woocommerce-beta-tester' ),
)
);
$settings = WC_Beta_Tester::get_settings();
switch ( $settings->channel ) {
case 'beta':
$current_channel = __( 'Beta', 'woocommerce-beta-tester' );
break;
case 'rc':
$current_channel = __( 'Release Candidate', 'woocommerce-beta-tester' );
break;
default:
$current_channel = __( 'Stable', 'woocommerce-beta-tester' );
break;
}
$nodes = array(
array(
'parent' => 'wc-beta-tester',
'id' => 'update-channel',
/* translators: %s: current channel */
'title' => sprintf( __( 'Channel: %s', 'woocommerce-beta-tester' ), $current_channel ),
'href' => admin_url( 'plugins.php?page=wc-beta-tester' ),
),
array(
'parent' => 'wc-beta-tester',
'id' => 'import-export-settings',
'title' => __( 'Import/Export Settings', 'woocommerce-beta-tester' ),
'href' => admin_url( 'admin.php?page=wc-beta-tester-settings' ),
),
array(
'parent' => 'wc-beta-tester',
'id' => 'show-version-info',
/* translators: %s: current version */
'title' => sprintf( __( 'Release %s information', 'woocommerce-beta-tester' ), WC_VERSION ),
'href' => '#',
),
array(
'parent' => 'wc-beta-tester',
'id' => 'switch-version',
'title' => __( 'Switch versions', 'woocommerce-beta-tester' ),
'href' => admin_url( 'plugins.php?page=wc-beta-tester-version-picker' ),
),
array(
'parent' => 'wc-beta-tester',
'id' => 'submit-gh-ticket',
'title' => __( 'Submit bug report', 'woocommerce-beta-tester' ),
'href' => '#',
'meta' => array(
// We can't simply use the href here since WP core calls esc_url on it which strips some parts.
'onclick' => 'javascript:window.open( "' . esc_js( $this->get_github_ticket_url() ) . '" );',
),
),
);
foreach ( $nodes as $node ) {
$wp_admin_bar->add_node( $node );
}
}
/**
* Hide menu items from view so the pages exist, but the menu items do not.
*/
public function hide_from_menus() {
global $submenu;
$items_to_remove = array( 'wc-beta-tester-settings', 'wc-beta-tester-version-picker', 'wc-beta-tester' );
if ( isset( $submenu['plugins.php'] ) ) {
foreach ( $submenu['plugins.php'] as $key => $menu ) {
if ( in_array( $menu[2], $items_to_remove ) ) {
unset( $submenu['plugins.php'][ $key ] );
}
}
}
}
/**
* Template for version information.
*/
public function version_information_template() {
?>
<script type="text/template" id="tmpl-wc-beta-tester-version-info">
<div class="wc-backbone-modal wc-backbone-modal-beta-tester-version-info">
<div class="wc-backbone-modal-content">
<section class="wc-backbone-modal-main" role="main">
<header class="wc-backbone-modal-header">
<h1>
<?php
/* translators: %s: version number */
echo esc_html( sprintf( __( 'Release %s information', 'woocommerce-beta-tester' ), '{{ data.version }}' ) );
?>
</h1>
<button class="modal-close modal-close-link dashicons dashicons-no-alt">
<span class="screen-reader-text"><?php esc_html_e( 'Close modal panel', 'woocommerce-beta-tester' ); ?></span>
</button>
</header>
<article>
<?php do_action( 'woocommerce_admin_version_information_start' ); ?>
{{ data.description }}
<?php do_action( 'woocommerce_admin_version_information_end' ); ?>
</article>
<footer>
<a target="_blank" href="https://github.com/woocommerce/woocommerce/releases/tag/{{ data.version }}"><?php esc_html_e( 'Read more on GitHub', 'woocommerce-beta-tester' ); ?></a>
</footer>
</section>
</div>
</div>
<div class="wc-backbone-modal-backdrop modal-close"></div>
</script>
<?php
}
}
return new WC_Beta_Tester_Admin_Menus();

View File

@ -0,0 +1,21 @@
<?php
/**
* Admin notices
*
* @package WC_Beta_Tester\Admin
*/
defined( 'ABSPATH' ) || exit;
/**
* Admin notices class.
*/
class WC_Beta_Tester_Admin_Notices {
/**
* WooCommerce not installed notice.
*/
public function woocoommerce_not_installed() {
include_once dirname( __FILE__ ) . '/views/html-admin-missing-woocommerce.php';
}
}

View File

@ -0,0 +1,161 @@
<?php
/**
* Beta Tester plugin settings class
*
* @package WC_Beta_Tester
*/
defined( 'ABSPATH' ) || exit;
/**
* Settings Class.
*/
class WC_Beta_Tester_Settings {
/**
* Constructor
*/
public function __construct() {
add_action( 'admin_init', array( $this, 'settings_init' ) );
add_action( 'admin_menu', array( $this, 'add_to_menus' ) );
}
/**
* Initialise settings
*/
public function settings_init() {
register_setting( 'wc-beta-tester', 'wc_beta_tester_options' );
add_settings_section(
'wc-beta-tester-update',
__( 'Settings', 'woocommerce-beta-tester' ),
array( $this, 'update_section_html' ),
'wc-beta-tester'
);
add_settings_field(
'wc-beta-tester-channel',
__( 'Release Channel', 'woocommerce-beta-tester' ),
array( $this, 'version_select_html' ),
'wc-beta-tester',
'wc-beta-tester-update',
array(
'label_for' => 'channel',
)
);
add_settings_field(
'wc-beta-tester-auto-update',
__( 'Automatic Updates', 'woocommerce-beta-tester' ),
array( $this, 'automatic_update_checkbox_html' ),
'wc-beta-tester',
'wc-beta-tester-update',
array(
'label_for' => 'auto_update',
)
);
}
/**
* Update section HTML output.
*
* @param array $args Arguments.
*/
public function update_section_html( $args ) {
?>
<p id="<?php echo esc_attr( $args['id'] ); ?>"><?php esc_html_e( 'The following settings allow you to choose which WooCommerce updates to receive on this site, including beta and RC versions not quite ready for production deployment.', 'woocommerce-beta-tester' ); ?></p>
<?php
}
/**
* Version select markup output.
*
* @param array $args Arguments.
*/
public function version_select_html( $args ) {
$settings = WC_Beta_Tester::get_settings();
$channels = array(
'beta' => array(
'name' => __( 'Beta Releases', 'woocommerce-beta-tester' ),
'description' => __( 'Beta releases contain experimental functionality for testing purposes only. This channel will also include RC and stable releases if more current.', 'woocommerce-beta-tester' ),
),
'rc' => array(
'name' => __( 'Release Candidates', 'woocommerce-beta-tester' ),
'description' => __( 'Release candidates are released to ensure any critical problems have not gone undetected. This channel will also include stable releases if more current.', 'woocommerce-beta-tester' ),
),
'stable' => array(
'name' => __( 'Stable Releases', 'woocommerce-beta-tester' ),
'description' => __( 'This is the default behavior in WordPress.', 'woocommerce-beta-tester' ),
),
);
echo '<fieldset><legend class="screen-reader-text"><span>' . esc_html__( 'Update Channel', 'woocommerce-beta-tester' ) . '</span></legend>';
foreach ( $channels as $channel_id => $channel ) {
?>
<label>
<input type="radio" id="<?php echo esc_attr( $args['label_for'] ); ?>" name="wc_beta_tester_options[<?php echo esc_attr( $args['label_for'] ); ?>]" value="<?php echo esc_attr( $channel_id ); ?>" <?php checked( $settings->{ $args['label_for'] }, $channel_id ); ?> />
<?php echo esc_html( $channel['name'] ); ?>
<p class="description">
<?php echo esc_html( $channel['description'] ); ?>
</p>
</label>
<br>
<?php
}
echo '</fieldset>';
}
/**
* Auto updates checkbox markup output.
*
* @param array $args Arguments.
*/
public function automatic_update_checkbox_html( $args ) {
$settings = WC_Beta_Tester::get_settings();
?>
<label for="<?php echo esc_attr( $args['label_for'] ); ?>">
<input type="checkbox" id="<?php echo esc_attr( $args['label_for'] ); ?>" name="wc_beta_tester_options[<?php echo esc_attr( $args['label_for'] ); ?>]" value="1" <?php checked( $settings->{ $args['label_for'] }, true ); ?> />
<?php echo esc_html__( 'If enabled, WooCommerce will update to the latest release in the background. Use with caution; we do not recommend using this on production stores!', 'woocommerce-beta-tester' ); ?>
</label>
<?php
}
/**
* Add options page to menu
*/
public function add_to_menus() {
add_submenu_page( 'plugins.php', __( 'WooCommerce Beta Tester', 'woocommerce-beta-tester' ), __( 'WC Beta Tester', 'woocommerce-beta-tester' ), 'install_plugins', 'wc-beta-tester', array( $this, 'settings_page_html' ) );
}
/**
* Output settings HTML
*/
public function settings_page_html() {
if ( ! current_user_can( 'install_plugins' ) ) {
return;
}
if ( isset( $_GET['settings-updated'] ) ) { // WPCS: input var.
add_settings_error( 'wc-beta-tester-messages', 'wc-beta-tester-message', __( 'Settings Saved', 'woocommerce-beta-tester' ), 'updated' );
}
// show error/update messages.
settings_errors( 'wc-beta-tester-messages' );
?>
<div class="wrap">
<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>
<form action="options.php" method="post">
<?php
settings_fields( 'wc-beta-tester' );
do_settings_sections( 'wc-beta-tester' );
submit_button();
?>
</form>
</div>
<?php
}
}
new WC_Beta_Tester_Settings();

View File

@ -0,0 +1,213 @@
<?php
/**
* Beta Tester settings export class
*
* @package WC_Beta_Tester
*/
defined( 'ABSPATH' ) || exit;
/**
* WC_Beta_Tester_Settings_Export Main Class.
*/
class WC_Beta_Tester_Import_Export {
/**
* @var string WordPress ajax hook
*/
protected const AJAX_HOOK = 'wc_beta_tester_export_settings';
/**
* @var string WordPress nonce action
*/
protected const NONCE_ACTION = 'wc-beta-tester-import-settings';
/**
* @var string WordPress import action
*/
protected const IMPORT_ACTION = 'wc-beta-tester-import';
/**
* @var string WordPress import capability
*/
protected const IMPORT_CAP = 'install_plugins';
/**
* @var string WordPress import file name
*/
protected const IMPORT_FILENAME = 'woocommerce-settings-json';
/**
* @var array Import status message
*/
protected $message;
/**
* Class constructor.
*/
public function __construct() {
$this->add_hooks();
}
/**
* Hook into WordPress.
*/
public function add_hooks() {
add_action( 'admin_menu', array( $this, 'add_to_menu' ), 55 );
add_action( 'wp_ajax_' . static::AJAX_HOOK, array( $this, 'export_settings' ) );
}
/**
* Add options page to menu
*/
public function add_to_menu() {
add_submenu_page( 'plugins.php', __( 'WC Beta Tester Import/Export', 'woocommerce-beta-tester' ), __( 'WC Import/Export', 'woocommerce-beta-tester' ), static::IMPORT_CAP, 'wc-beta-tester-settings', array( $this, 'settings_page_html' ) );
}
/**
* Output settings HTML
*/
public function settings_page_html() {
if ( ! current_user_can( static::IMPORT_CAP ) ) {
return;
}
$export_url = wp_nonce_url( admin_url( 'admin-ajax.php?action=wc_beta_tester_export_settings' ), static::NONCE_ACTION );
$this->maybe_import_settings();
// show error/update messages.
if ( ! empty( $this->message ) ) {
?>
<div class="notice <?php
echo ! empty( $this->message['type'] ) ? esc_attr( $this->message['type'] ) : '';
?>"><?php echo esc_html( $this->message['message'] ); ?></div>
<?php
}
?>
<div class="wrap">
<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>
<p><?php esc_html_e( 'Export your WooCommerce Settings. The export file should not contain any fields that identify your site or reveal secrets (eg. API keys).', 'woocommerce-beta-tester' ); ?></p>
<a href="<?php echo esc_url( $export_url ) ?>" class="button-primary"><?php
/* translators Export WooCommerce settings button text. */
esc_html_e( 'Export WooCommerce Settings', 'woocommerce-beta-tester' );
?></a>
<hr />
<form method="POST" enctype="multipart/form-data">
<?php wp_nonce_field( static::NONCE_ACTION ); ?>
<input type="hidden" name="action" value="<?php echo static::IMPORT_ACTION; ?>" />
<p><?php esc_html_e( 'Import WooCommerce Settings exported with this tool. Some settings like store address, payment gateways, etc. will need to be configured manually.', 'woocommerce-beta-tester' ); ?></p>
<button type="submit" class="button-primary"><?php
/* translators Import WooCommerce settings button text. */
esc_html_e( 'Import WooCommerce Settings', 'woocommerce-beta-tester' );
?></button>
<input type="file" name="<?php echo static::IMPORT_FILENAME; ?>" />
</form>
</div>
<?php
}
/**
* Export settings in json format.
*/
public function export_settings() {
if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], static::NONCE_ACTION ) ) {
header( 'HTTP/1.1 403 Forbidden' );
exit;
}
$filename = sprintf( 'woocommerce-settings-%s.json', gmdate( 'Ymdgi' ) );
wc_set_time_limit( 0 );
wc_nocache_headers();
header( 'Content-Type: text/csv; charset=utf-8' );
header( 'Content-Disposition: attachment; filename=' . $filename );
header( 'Pragma: no-cache' );
header( 'Expires: 0' );
echo wp_json_encode( $this->get_settings() );
exit;
}
/**
* Import settings in json format if submitted.
*/
public function maybe_import_settings() {
if ( empty( $_POST ) || empty( $_POST['action'] ) || $_POST['action'] !== static::IMPORT_ACTION ) {
return;
}
if ( ! wp_verify_nonce( $_POST['_wpnonce'], static::NONCE_ACTION ) ) {
$this->add_message( __( 'Invalid submission', 'woocommerce-beta-tester' ) );
return;
}
if ( empty( $_FILES[ static::IMPORT_FILENAME ] ) ) {
$this->add_message( __( 'No file uploaded.', 'woocommerce-beta-tester' ) );
return;
}
$tmp_file = $_FILES[ static::IMPORT_FILENAME ]['tmp_name'];
if ( empty( $tmp_file ) ) {
$this->add_message( __( 'No file uploaded.', 'woocommerce-beta-tester' ) );
return;
}
if ( ! is_readable( $tmp_file ) ) {
$this->add_message( __( 'File could not be read.', 'woocommerce-beta-tester' ) );
return;
}
$maybe_json = file_get_contents( $tmp_file );
$settings = json_decode( $maybe_json, true );
if ( $settings !== null ) {
foreach ( $this->get_setting_list() as $option_name ) {
if ( ! isset( $settings[ $option_name ] ) ) {
continue;
}
$setting = maybe_unserialize( $settings[ $option_name ] );
if ( is_null( $setting ) ) {
delete_option( $option_name );
} else {
update_option( $option_name, $setting );
}
}
$this->add_message( __( 'Settings Imported', 'woocommerce-beta-tester' ), 'updated' );
} else {
$this->add_message( __( 'File did not contain well formed JSON.', 'woocommerce-beta-tester' ) );
}
}
/**
* Get an array of the WooCommerce related settings.
*/
protected function get_settings() {
$settings = array();
if ( current_user_can( 'manage_woocommerce' ) ) {
foreach ( $this->get_setting_list() as $option_name ) {
$setting = get_option( $option_name );
if ( false === $setting ) {
$setting = null;
}
$settings[ $option_name ] = is_string( $setting ) ? $setting : serialize( $setting );
}
}
return $settings;
}
/**
* Add a settings import status message.
*
* @param string $message Message string.
* @param string $type Message type. Optional. Default 'error'.
*/
protected function add_message( $message, $type = 'error' ) {
$this->message = array(
'message' => $message,
'type' => $type
);
}
/**
* Get the WooCommerce settings list keys.
*/
private function get_setting_list() {
require_once( dirname(__FILE__ ) . '/wc-beta-tester-settings-list.php');
return wc_beta_tester_setting_list();
}
}

View File

@ -0,0 +1,74 @@
<?php
/**
* WooCommerce Beta Tester Plugin Upgrader
*
* Class that extends the WP Core Plugin_Upgrader found in core to do version switch.
*
* @package WC_Beta_Tester
*/
defined( 'ABSPATH' ) || exit;
if ( ! class_exists( 'Plugin_Upgrader' ) ) {
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
}
/**
* Class WC_Beta_Tester_Plugin_Upgrader
*/
class WC_Beta_Tester_Plugin_Upgrader extends Plugin_Upgrader {
/**
* Switch plugin version.
*
* @param string $plugin Plugin we're switching.
* @param array $args Args.
*
* @return array|bool|\WP_Error
*/
public function switch_version( $plugin, $args = array() ) {
$defaults = array(
'clear_update_cache' => true,
);
$parsed_args = wp_parse_args( $args, $defaults );
$this->init();
$this->upgrade_strings();
$plugin_version = $this->skin->options['version'];
$download_url = WC_Beta_Tester::instance()->get_download_url( $plugin_version );
add_filter( 'upgrader_pre_install', array( $this, 'deactivate_plugin_before_upgrade' ), 10, 2 );
add_filter( 'upgrader_clear_destination', array( $this, 'delete_old_plugin' ), 10, 4 );
$this->run(
array(
'package' => $download_url,
'destination' => WP_PLUGIN_DIR,
'clear_destination' => true,
'clear_working' => true,
'hook_extra' => array(
'plugin' => $plugin,
'type' => 'plugin',
'action' => 'update',
),
)
);
// Cleanup our hooks, in case something else does a upgrade on this connection.
remove_filter( 'upgrader_pre_install', array( $this, 'deactivate_plugin_before_upgrade' ) );
remove_filter( 'upgrader_clear_destination', array( $this, 'delete_old_plugin' ) );
if ( ! $this->result || is_wp_error( $this->result ) ) {
return $this->result;
}
// Force refresh of plugin update information.
wp_clean_plugins_cache( $parsed_args['clear_update_cache'] );
return true;
}
}

View File

@ -0,0 +1,238 @@
<?php
/**
* Beta Tester plugin Version Picker class
*
* @package WC_Beta_Tester
*/
defined( 'ABSPATH' ) || exit;
/**
* Settings Class.
*/
class WC_Beta_Tester_Version_Picker {
/**
* Currently installed version of WooCommerce plugin.
*
* @var string
*/
protected $current_version = '';
/**
* Constructor
*/
public function __construct() {
add_action( 'admin_menu', array( $this, 'add_to_menus' ) );
add_action( 'admin_init', array( $this, 'handle_version_switch' ) );
}
/**
* Handler for the version switch button.
*
* @throws Exception On update error.
*/
public function handle_version_switch() {
if ( ! isset( $_GET['wcbt_switch_to_version'], $_GET['_wpnonce'] ) ) { // WPCS: Input var ok.
return;
}
if ( ! wp_verify_nonce( wp_unslash( $_GET['_wpnonce'] ), 'wcbt_switch_version_nonce' ) ) { // WPCS: Input var ok, sanitization ok.
wp_die( esc_html__( 'Action failed. Please refresh the page and retry.', 'woocommerce-beta-tester' ) );
}
$version = isset( $_GET['wcbt_switch_to_version'] ) ? sanitize_text_field( wp_unslash( $_GET['wcbt_switch_to_version'] ) ) : ''; // WPCS: Input var ok, sanitization ok.
if ( empty( $version ) ) {
return;
}
try {
include dirname( __FILE__ ) . '/class-wc-beta-tester-plugin-upgrader.php';
$plugin_name = 'woocommerce';
$plugin = 'woocommerce/woocommerce.php';
$skin_args = array(
'type' => 'web',
'url' => 'plugins.php?page=wc-beta-tester-version-picker',
'title' => 'Version switch result',
'plugin' => $plugin_name,
'version' => $version,
'nonce' => wp_unslash( $_GET['_wpnonce'] ), // WPCS: Input var ok, sanitization ok.
);
$skin = new Automatic_Upgrader_Skin( $skin_args );
$upgrader = new WC_Beta_Tester_Plugin_Upgrader( $skin );
$result = $upgrader->switch_version( $plugin );
// Try to reactivate.
activate_plugin( $plugin, '', is_network_admin(), true );
if ( is_wp_error( $skin->result ) ) {
throw new Exception( $skin->result->get_error_message() );
} elseif ( false === $result ) {
throw new Exception( __( 'Update failed', 'woocommerce-beta-tester' ) );
}
wp_safe_redirect( admin_url( 'plugins.php?page=wc-beta-tester-version-picker&switched=' . rawurlencode( $version ) ) );
exit;
} catch ( Exception $e ) {
if ( class_exists( 'WC_Admin_Notices' ) ) {
WC_Admin_Notices::add_custom_notice(
$plugin . '_update_error',
sprintf(
// translators: 1: plugin name, 2: error message.
__( '%1$s could not be updated (%2$s).', 'woocommerce-beta-tester' ),
$plugin,
$e->getMessage()
)
);
wp_safe_redirect( admin_url( 'plugins.php?page=wc-beta-tester-version-picker' ) );
exit;
} else {
wp_die( esc_html( $e->getMessage() ) );
}
}
}
/**
* Add options page to menu.
*
* @return void
*/
public function add_to_menus() {
add_submenu_page(
'plugins.php',
__( 'WooCommerce Version Switch', 'woocommerce-beta-tester' ),
__( 'WooCommerce Version Switch', 'woocommerce-beta-tester' ),
'install_plugins',
'wc-beta-tester-version-picker',
array( $this, 'select_versions_form_html' )
);
}
/**
* Return HTML code representation of list of WooCommerce versions for the selected channel.
*
* @param string $channel Filter versions by channel: all|beta|rc|stable.
* @return string
*/
public function get_versions_html( $channel ) {
$tags = WC_Beta_Tester::instance()->get_tags( $channel );
if ( ! $tags ) {
return '';
}
usort( $tags, 'version_compare' );
$tags = array_reverse( $tags );
$versions_html = '';
if ( ! empty( $_GET['switched'] ) ) { // WPCS: input var ok, CSRF ok.
/* translators: %s: WooCoomerce version */
$versions_html .= '<div class="notice notice-success"><p>' . sprintf( esc_html__( 'Successfully switched version to %s.', 'woocommerce-beta-tester' ), esc_html( sanitize_text_field( wp_unslash( $_GET['switched'] ) ) ) ) . '</p></div>'; // WPCS: input var ok, CSRF ok.
}
$versions_html .= '<ul class="wcbt-version-list">';
$plugin_data = WC_Beta_Tester::instance()->get_plugin_data();
$this->current_version = $plugin_data['Version'];
// Loop through versions and output in a radio list.
foreach ( $tags as $tag_version ) {
$versions_html .= '<li class="wcbt-version-li">';
$versions_html .= '<label><input type="radio" ' . checked( strtolower($tag_version), strtolower($this->current_version), false ) . ' value="' . esc_attr( $tag_version ) . '" name="wcbt_switch_to_version">' . $tag_version;
// Is this the current version?
if ( strcasecmp($tag_version, $this->current_version) === 0 ) {
$versions_html .= '<span class="wcbt-current-version"><strong>' . esc_html__( '&nbsp;Installed Version', 'woocommerce-beta-tester' ) . '</strong></span>';
}
$versions_html .= '</label>';
$versions_html .= '</li>';
}
$versions_html .= '</ul>';
return $versions_html;
}
/**
* Echo HTML form to switch WooCommerce versions, filtered for the selected channel.
*/
public function select_versions_form_html() {
if ( ! current_user_can( 'install_plugins' ) ) {
return;
}
$settings = WC_Beta_Tester::get_settings();
$channel = $settings->channel;
?>
<div class="wrap">
<div class="wcbt-content-wrap">
<h1><?php esc_html_e( 'Available WooCommerce Releases', 'woocommerce-beta-tester' ); ?></h1>
<form name="wcbt-select-version" class="wcbt-select-version-form" action="<?php echo esc_attr( admin_url( '/tools.php' ) ); ?>">
<div class="wcbt-versions-wrap">
<?php echo $this->get_versions_html( $channel ); // WPCS: XSS ok. ?>
</div>
<div class="wcbt-submit-wrap">
<a href="#wcbt-modal-version-switch-confirm" class="button-primary" id="wcbt-modal-version-switch-confirm"><?php esc_html_e( 'Switch version', 'woocommerce-beta-tester' ); ?></a>
</div>
<?php wp_nonce_field( 'wcbt_switch_version_nonce' ); ?>
<input type="hidden" name="noheader" value="1">
<input type="hidden" name="page" value="wc-beta-tester-version-picker">
<script type="text/template" id="tmpl-wcbt-version-switch-confirm">
<div class="wc-backbone-modal wc-backbone-modal-beta-tester-version-info">
<div class="wc-backbone-modal-content">
<section class="wc-backbone-modal-main" role="main">
<header class="wc-backbone-modal-header">
<h1>
<?php
esc_html_e( 'Are you sure you want to switch the version of WooCommerce plugin?', 'woocommerce-beta-tester' );
?>
</h1>
<button class="modal-close modal-close-link dashicons dashicons-no-alt">
<span class="screen-reader-text"><?php esc_html_e( 'Close modal panel', 'woocommerce-beta-tester' ); ?></span>
</button>
</header>
<article>
<table class="wcbt-widefat widefat">
<tbody>
<tr class="alternate">
<td class="row-title">
<label for="tablecell"><?php esc_html_e( 'Installed Version:', 'woocommerce-beta-tester' ); ?></label>
</td>
<td><span class="wcbt-installed-version"><?php echo esc_html( $this->current_version ); ?></span></td>
</tr>
<tr>
<td class="row-title">
<label for="tablecell"><?php esc_html_e( 'New Version:', 'woocommerce-beta-tester' ); ?></label>
</td>
<td><span class="wcbt-new-version">{{ data.new_version }}</span></td>
</tr>
</tbody>
</table>
<p class="wcbt-notice"><?php esc_html_e( 'Notice: We strongly recommend you perform the test on a staging site and create a complete backup of your WordPress files and database prior to performing a version switch. We are not responsible for any misuse, deletions, white screens, fatal errors, or any other issue arising from using this plugin.', 'woocommerce-beta-tester' ); ?></p>
</article>
<footer>
<input type="submit" value="<?php esc_attr_e( 'Switch version', 'woocommerce-beta-tester' ); ?>" class="button-primary wcbt-go" id="wcbt-submit-version-switch"/>&nbsp;
<a href="#" class="modal-close modal-close-link"><?php esc_attr_e( 'Cancel', 'woocommerce-beta-tester' ); ?></a>
</footer>
</section>
</div>
</div>
<div class="wc-backbone-modal-backdrop modal-close"></div>
</script>
</form>
</div>
</div>
<?php
}
}
new WC_Beta_Tester_Version_Picker();

View File

@ -0,0 +1,468 @@
<?php
/**
* Beta Tester plugin main class
*
* @package WC_Beta_Tester
*/
defined( 'ABSPATH' ) || exit;
/**
* WC_Beta_Tester Main Class.
*/
class WC_Beta_Tester {
/**
* Config
*
* @var array
*/
private $plugin_config;
/**
* Plugin instance.
*
* @var WC_Beta_Tester
*/
protected static $_instance = null;
/**
* Main Instance.
*/
public static function instance() {
self::$_instance = is_null( self::$_instance ) ? new self() : self::$_instance;
return self::$_instance;
}
/**
* Ran on activation to flush update cache
*/
public static function activate() {
delete_site_transient( 'update_plugins' );
delete_site_transient( 'woocommerce_latest_tag' );
}
/**
* Get plugin settings.
*
* @return object
*/
public static function get_settings() {
$settings = (object) wp_parse_args(
get_option( 'wc_beta_tester_options', array() ),
array(
'channel' => 'beta',
'auto_update' => false,
)
);
$settings->channel = $settings->channel;
$settings->auto_update = (bool) $settings->auto_update;
return $settings;
}
/**
* Get the plugin url.
*
* @return string
*/
public function plugin_url() {
return untrailingslashit( plugins_url( '/', WC_BETA_TESTER_FILE ) );
}
/**
* Constructor
*/
public function __construct() {
$this->plugin_name = plugin_basename( WC_BETA_TESTER_FILE );
$this->plugin_config = array(
'plugin_file' => 'woocommerce/woocommerce.php',
'slug' => 'woocommerce',
'proper_folder_name' => 'woocommerce',
'api_url' => 'https://api.wordpress.org/plugins/info/1.0/woocommerce.json',
'repo_url' => 'https://wordpress.org/plugins/woocommerce/',
);
add_filter( "plugin_action_links_{$this->plugin_name}", array( $this, 'plugin_action_links' ), 10, 1 );
add_filter( 'auto_update_plugin', array( $this, 'auto_update_woocommerce' ), 100, 2 );
if ( 'stable' !== $this->get_settings()->channel ) {
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'api_check' ) );
add_filter( 'plugins_api_result', array( $this, 'plugins_api_result' ), 10, 3 );
add_filter( 'upgrader_source_selection', array( $this, 'upgrader_source_selection' ), 10, 3 );
}
$this->includes();
}
/**
* Include any classes we need within admin.
*/
public function includes() {
include_once dirname( __FILE__ ) . '/class-wc-beta-tester-admin-menus.php';
include_once dirname( __FILE__ ) . '/class-wc-beta-tester-admin-assets.php';
}
/**
* Check whether or not the transients need to be overruled and API needs to be called for every single page load
*
* @return bool overrule or not
*/
public function overrule_transients() {
return defined( 'WC_BETA_TESTER_FORCE_UPDATE' ) && WC_BETA_TESTER_FORCE_UPDATE;
}
/**
* Checks if a given version is a pre-release.
*
* @param string $version Version to compare.
* @return bool
*/
public function is_prerelease( $version ) {
return preg_match( '/(.*)?-(beta|rc)(.*)/', $version );
}
/**
* Get New Version from WPorg
*
* @since 1.0
* @return int $version the version number
*/
public function get_latest_channel_release() {
$tagged_version = get_site_transient( md5( $this->plugin_config['slug'] ) . '_latest_tag' );
if ( $this->overrule_transients() || empty( $tagged_version ) ) {
$data = $this->get_wporg_data();
$latest_version = $data->version;
$versions = (array) $data->versions;
$channel = $this->get_settings()->channel;
foreach ( $versions as $version => $download_url ) {
if ( 'trunk' === $version ) {
continue;
}
switch ( $channel ) {
case 'stable':
if ( $this->is_in_stable_channel( $version ) ) {
$tagged_version = $version;
}
break;
case 'rc':
if ( $this->is_in_rc_channel( $version ) ) {
$tagged_version = $version;
}
break;
case 'beta':
if ( $this->is_in_beta_channel( $version ) ) {
$tagged_version = $version;
}
break;
}
}
// Refresh every 6 hours.
if ( ! empty( $tagged_version ) ) {
set_site_transient( md5( $this->plugin_config['slug'] ) . '_latest_tag', $tagged_version, HOUR_IN_SECONDS * 6 );
}
}
return $tagged_version;
}
/**
* Get Data from .org API.
*
* @since 1.0
* @return array $wporg_data The data.
*/
public function get_wporg_data() {
if ( ! empty( $this->wporg_data ) ) {
return $this->wporg_data;
}
$wporg_data = get_site_transient( md5( $this->plugin_config['slug'] ) . '_wporg_data' );
if ( $this->overrule_transients() || ( ! isset( $wporg_data ) || ! $wporg_data || '' === $wporg_data ) ) {
$wporg_data = wp_remote_get( $this->plugin_config['api_url'] );
if ( is_wp_error( $wporg_data ) ) {
return false;
}
$wporg_data = json_decode( $wporg_data['body'] );
// Refresh every 6 hours.
set_site_transient( md5( $this->plugin_config['slug'] ) . '_wporg_data', $wporg_data, HOUR_IN_SECONDS * 6 );
}
// Store the data in this class instance for future calls.
$this->wporg_data = $wporg_data;
return $wporg_data;
}
/**
* Get plugin download URL.
*
* @since 1.0
* @param string $version The version.
* @return string
*/
public function get_download_url( $version ) {
$data = $this->get_wporg_data();
if ( empty( $data->versions->$version ) ) {
return false;
}
return $data->versions->$version;
}
/**
* Get Plugin data.
*
* @since 1.0
* @return object $data The data.
*/
public function get_plugin_data() {
return get_plugin_data( WP_PLUGIN_DIR . '/' . $this->plugin_config['plugin_file'] );
}
/**
* Hook into the plugin update check and connect to WPorg.
*
* @since 1.0
* @param object $transient The plugin data transient.
* @return object $transient Updated plugin data transient.
*/
public function api_check( $transient ) {
// Clear our transient.
delete_site_transient( md5( $this->plugin_config['slug'] ) . '_latest_tag' );
// Get version data.
$plugin_data = $this->get_plugin_data();
$version = $plugin_data['Version'];
$new_version = $this->get_latest_channel_release();
// check the version and decide if it's new.
$update = version_compare( $new_version, $version, '>' );
if ( ! $update ) {
return $transient;
}
// Populate response data.
if ( ! isset( $transient->response['woocommerce/woocommerce.php'] ) ) {
$transient->response['woocommerce/woocommerce.php'] = (object) $this->plugin_config;
}
$transient->response['woocommerce/woocommerce.php']->new_version = $new_version;
$transient->response['woocommerce/woocommerce.php']->zip_url = $this->get_download_url( $new_version );
$transient->response['woocommerce/woocommerce.php']->package = $this->get_download_url( $new_version );
return $transient;
}
/**
* Filters the Plugin Installation API response results.
*
* @param object|WP_Error $response Response object or WP_Error.
* @param string $action The type of information being requested from the Plugin Installation API.
* @param object $args Plugin API arguments.
* @return object
*/
public function plugins_api_result( $response, $action, $args ) {
// Check if this call API is for the right plugin.
if ( ! isset( $response->slug ) || $response->slug !== $this->plugin_config['slug'] ) {
return $response;
}
$new_version = $this->get_latest_channel_release();
if ( version_compare( $response->version, $new_version, '=' ) ) {
return $response;
}
if ( $this->is_beta_version( $new_version ) ) {
$warning = __( '<h1><span>&#9888;</span>This is a beta release<span>&#9888;</span></h1>', 'woocommerce-beta-tester' );
}
if ( $this->is_rc_version( $new_version ) ) {
$warning = __( '<h1><span>&#9888;</span>This is a pre-release version<span>&#9888;</span></h1>', 'woocommerce-beta-tester' );
}
// If we are returning a different version than the stable tag on .org, manipulate the returned data.
$response->version = $new_version;
$response->download_link = $this->get_download_url( $new_version );
$response->sections['changelog'] = sprintf(
'<p><a target="_blank" href="%s">' . __( 'Read the changelog and find out more about the release on GitHub.', 'woocommerce-beta-tester' ) . '</a></p>',
'https://github.com/woocommerce/woocommerce/blob/' . $response->version . '/readme.txt'
);
foreach ( $response->sections as $key => $section ) {
$response->sections[ $key ] = $warning . $section;
}
return $response;
}
/**
* Rename the downloaded zip
*
* @param string $source File source location.
* @param string $remote_source Remote file source location.
* @param WP_Upgrader $upgrader WordPress Upgrader instance.
* @return string
*/
public function upgrader_source_selection( $source, $remote_source, $upgrader ) {
global $wp_filesystem;
if ( strstr( $source, '/woocommerce-woocommerce-' ) ) {
$corrected_source = trailingslashit( $remote_source ) . trailingslashit( $this->plugin_config['proper_folder_name'] );
if ( $wp_filesystem->move( $source, $corrected_source, true ) ) {
return $corrected_source;
} else {
return new WP_Error();
}
}
return $source;
}
/**
* Enable auto updates for WooCommerce.
*
* @param bool $update Should this autoupdate.
* @param object $plugin Plugin being checked.
* @return bool
*/
public function auto_update_woocommerce( $update, $plugin ) {
if ( true === $this->get_settings()->auto_update && 'woocommerce' === $plugin->slug ) {
return true;
} else {
return $update;
}
}
/**
* Return true if version string is a beta version.
*
* @param string $version_str Version string.
* @return bool
*/
protected static function is_beta_version( $version_str ) {
return strpos( $version_str, 'beta' ) !== false;
}
/**
* Return true if version string is a Release Candidate.
*
* @param string $version_str Version string.
* @return bool
*/
protected static function is_rc_version( $version_str ) {
return strpos( $version_str, 'rc' ) !== false;
}
/**
* Return true if version string is a stable version.
*
* @param string $version_str Version string.
* @return bool
*/
protected static function is_stable_version( $version_str ) {
return ! self::is_beta_version( $version_str ) && ! self::is_rc_version( $version_str );
}
/**
* Return true if release's version string belongs to beta channel, i.e.
* if it's beta, rc or stable release.
*
* @param string $version_str Version string of the release.
* @return bool
*/
protected static function is_in_beta_channel( $version_str ) {
return self::is_beta_version( $version_str ) || self::is_rc_version( $version_str ) || self::is_stable_version( $version_str );
}
/**
* Return true if release's version string belongs to release candidate channel, i.e.
* if it's rc or stable release.
*
* @param string $version_str Version string of the release.
* @return bool
*/
protected static function is_in_rc_channel( $version_str ) {
return self::is_rc_version( $version_str ) || self::is_stable_version( $version_str );
}
/**
* Return true if release's version string belongs to stable channel, i.e.
* if it's stable release and not a beta or rc.
*
* @param string $version_str Version string of the release.
* @return bool
*/
protected static function is_in_stable_channel( $version_str ) {
return self::is_stable_version( $version_str );
}
/**
* Return available versions from wp.org tags belonging to selected channel.
*
* @param string $channel Filter versions by channel: all|beta|rc|stable.
* @return array(string)
*/
public function get_tags( $channel = 'all' ) {
$data = $this->get_wporg_data();
$releases = (array) $data->versions;
unset( $releases['trunk'] );
$releases = array_keys( $releases );
foreach ( $releases as $index => $version ) {
if ( version_compare( $version, '3.6', '<' ) ) {
unset( $releases[ $index ] );
}
}
if ( 'beta' === $channel ) {
$releases = array_filter( $releases, array( __CLASS__, 'is_in_beta_channel' ) );
} elseif ( 'rc' === $channel ) {
$releases = array_filter( $releases, array( __CLASS__, 'is_in_rc_channel' ) );
} elseif ( 'stable' === $channel ) {
$releases = array_filter( $releases, array( __CLASS__, 'is_in_stable_channel' ) );
}
return $releases;
}
/**
* Show action links on the plugin screen.
*
* @param mixed $links Plugin Action links.
* @return array
*/
public function plugin_action_links( $links ) {
$action_links = array(
'switch-version' => sprintf(
'<a href="%s">%s</a>',
esc_url( admin_url( 'plugins.php?page=wc-beta-tester-version-picker' ) ),
esc_html__( 'Switch versions', 'woocommerce-beta-tester' )
),
'settings' => sprintf(
'<a href="%s">%s</a>',
esc_url( admin_url( 'plugins.php?page=wc-beta-tester' ) ),
esc_html__( 'Settings', 'woocommerce-beta-tester' )
),
);
return array_merge( $action_links, $links );
}
}

View File

@ -0,0 +1,47 @@
<?php
/**
* Missing WooCommerce notice.
*
* @package WC_Beta_Tester\Admin\Views
*/
defined( 'ABSPATH' ) || exit;
?>
<div class="notice notice-error">
<p>
<?php
// Translators: %s Plugin name.
echo sprintf( esc_html__( '%s requires WooCommerce to be installed and activated in order to serve updates.', 'woocommerce-beta-tester' ), '<strong>' . esc_html__( 'WooCommerce Beta Tester', 'woocommerce-beta-tester' ) . '</strong>' );
?>
</p>
<?php if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) && current_user_can( 'activate_plugin', 'woocommerce/woocommerce.php' ) ) : ?>
<p>
<?php
$installed_plugins = get_plugins();
if ( isset( $installed_plugins['woocommerce/woocommerce.php'] ) ) :
?>
<a href="<?php echo esc_url( wp_nonce_url( self_admin_url( 'plugins.php?action=activate&plugin=woocommerce/woocommerce.php&plugin_status=active' ), 'activate-plugin_woocommerce/woocommerce.php' ) ); ?>" class="button button-primary"><?php esc_html_e( 'Activate WooCommerce', 'woocommerce-beta-tester' ); ?></a>
<?php endif; ?>
<?php if ( current_user_can( 'deactivate_plugin', 'woocommerce-beta-tester/woocommerce-beta-tester.php' ) ) : ?>
<a href="<?php echo esc_url( wp_nonce_url( 'plugins.php?action=deactivate&plugin=woocommerce-beta-tester/woocommerce-beta-tester.php&plugin_status=inactive', 'deactivate-plugin_woocommerce-beta-tester/woocommerce-beta-tester.php' ) ); ?>" class="button button-secondary"><?php esc_html_e( 'Turn off Beta Tester plugin', 'woocommerce-beta-tester' ); ?></a>
<?php endif; ?>
</p>
<?php else : ?>
<?php
if ( current_user_can( 'install_plugins' ) ) {
$url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=woocommerce' ), 'install-plugin_woocommerce' );
} else {
$url = 'http://wordpress.org/plugins/woocommerce/';
}
?>
<p>
<a href="<?php echo esc_url( $url ); ?>" class="button button-primary"><?php esc_html_e( 'Install WooCommerce', 'woocommerce-beta-tester' ); ?></a>
<?php if ( current_user_can( 'deactivate_plugin', 'woocommerce-beta-tester/woocommerce-beta-tester.php' ) ) : ?>
<a href="<?php echo esc_url( wp_nonce_url( 'plugins.php?action=deactivate&plugin=woocommerce-beta-tester/woocommerce-beta-tester.php&plugin_status=inactive', 'deactivate-plugin_woocommerce-beta-tester/woocommerce-beta-tester.php' ) ); ?>" class="button button-secondary"><?php esc_html_e( 'Turn off Beta Tester plugin', 'woocommerce-beta-tester' ); ?></a>
<?php endif; ?>
</p>
<?php endif; ?>
</div>

View File

@ -0,0 +1,128 @@
<?php
/**
* List of settings to be exported.
*/
function wc_beta_tester_setting_list() {
$settings_list = array(
'date_format',
'gmt_offset',
'permalink_structure',
'posts_per_page',
'shop_catalog_image_size',
'shop_single_image_size',
'time_format',
'timezone_string',
'woocommerce_all_except_countries',
'woocommerce_allowed_countries',
'woocommerce_api_enabled',
'woocommerce_calc_discounts_sequentially',
'woocommerce_calc_shipping',
'woocommerce_calc_taxes',
'woocommerce_cart_redirect_after_add',
'woocommerce_catalog_columns',
'woocommerce_catalog_rows',
'woocommerce_category_archive_display',
'woocommerce_checkout_address_2_field',
'woocommerce_checkout_company_field',
'woocommerce_checkout_highlight_required_fields',
'woocommerce_checkout_order_received_endpoint',
'woocommerce_checkout_pay_endpoint',
'woocommerce_checkout_phone_field',
'woocommerce_currency',
'woocommerce_currency_pos',
'woocommerce_db_version',
'woocommerce_default_catalog_orderby',
'woocommerce_default_country',
'woocommerce_default_customer_address',
'woocommerce_delete_inactive_accounts',
'woocommerce_dimension_unit',
'woocommerce_downloads_add_hash_to_filename',
'woocommerce_downloads_grant_access_after_payment',
'woocommerce_downloads_require_login',
'woocommerce_enable_ajax_add_to_cart',
'woocommerce_enable_coupons',
'woocommerce_enable_guest_checkout',
'woocommerce_enable_myaccount_registration',
'woocommerce_enable_order_comments',
'woocommerce_enable_review_rating',
'woocommerce_enable_reviews',
'woocommerce_enable_shipping_calc',
'woocommerce_enable_signup_and_login_from_checkout',
'woocommerce_erasure_request_removes_download_data',
'woocommerce_erasure_request_removes_order_data',
'woocommerce_file_download_method',
'woocommerce_force_ssl_checkout',
'woocommerce_hide_out_of_stock_items',
'woocommerce_hide_products_when_showing_subcategories',
'woocommerce_hold_stock_minutes',
'woocommerce_local_tax_rates',
'woocommerce_logout_endpoint',
'woocommerce_manage_stock',
'woocommerce_myaccount_add_payment_method_endpoint',
'woocommerce_myaccount_delete_payment_method_endpoint',
'woocommerce_myaccount_downloads_endpoint',
'woocommerce_myaccount_edit_account_endpoint',
'woocommerce_myaccount_edit_address_endpoint',
'woocommerce_myaccount_lost_password_endpoint',
'woocommerce_myaccount_orders_endpoint',
'woocommerce_myaccount_payment_methods_endpoint',
'woocommerce_myaccount_set_default_payment_method_endpoint',
'woocommerce_myaccount_view_order_endpoint',
'woocommerce_new_order_settings',
'woocommerce_notify_low_stock',
'woocommerce_notify_low_stock_amount',
'woocommerce_notify_no_stock',
'woocommerce_notify_no_stock_amount',
'woocommerce_permalinks',
'woocommerce_placeholder_image',
'woocommerce_prepend_category_to_products',
'woocommerce_prepend_shop_page_to_products',
'woocommerce_prepend_shop_page_to_urls',
'woocommerce_price_decimal_sep',
'woocommerce_price_display_suffix',
'woocommerce_price_num_decimals',
'woocommerce_price_thousand_sep',
'woocommerce_prices_include_tax',
'woocommerce_product_category_slug',
'woocommerce_product_slug',
'woocommerce_product_tag_slug',
'woocommerce_product_type',
'woocommerce_registration_generate_password',
'woocommerce_registration_generate_username',
'woocommerce_review_rating_required',
'woocommerce_ship_to_billing',
'woocommerce_ship_to_billing_address_only',
'woocommerce_ship_to_countries',
'woocommerce_ship_to_destination',
'woocommerce_shipping_cost_requires_address',
'woocommerce_shipping_debug_mode',
'woocommerce_shipping_tax_class',
'woocommerce_shop_page_display',
'woocommerce_shop_show_subcategories',
'woocommerce_show_marketplace_suggestions',
'woocommerce_show_subcategories',
'woocommerce_single_image_width',
'woocommerce_specific_allowed_countries',
'woocommerce_specific_ship_to_countries',
'woocommerce_stock_format',
'woocommerce_tax_based_on',
'woocommerce_tax_classes',
'woocommerce_tax_display_cart',
'woocommerce_tax_display_shop',
'woocommerce_tax_rates',
'woocommerce_tax_round_at_subtotal',
'woocommerce_tax_total_display',
'woocommerce_thumbnail_cropping',
'woocommerce_thumbnail_cropping_custom_height',
'woocommerce_thumbnail_cropping_custom_width',
'woocommerce_thumbnail_image_width',
'woocommerce_trash_cancelled_orders',
'woocommerce_trash_failed_orders',
'woocommerce_trash_pending_orders',
'woocommerce_unforce_ssl_checkout',
'woocommerce_version',
'woocommerce_weight_unit'
);
return apply_filters( 'wc_beta_tester_setting_list', $settings_list );
}

View File

@ -0,0 +1,59 @@
{
"name": "woocommerce-beta-tester",
"description": "Setting up the local beta tester scripts.",
"license": "GPL-2.0",
"repository": {
"type": "git",
"url": "git://github.com/woocommerce/woocommerce-beta-tester.git"
},
"title": "WooCommerce Beta Tester",
"version": "2.0.5",
"homepage": "http://github.com/woocommerce/woocommerce-beta-tester",
"devDependencies": {
"eslint": "5.16.0",
"husky": "1.3.1",
"lint-staged": "8.1.5",
"uglify-js": "^3.5.3"
},
"assets": {
"js": {
"min": "assets/js/*.min.js",
"js": "assets/js/*.js"
}
},
"scripts": {
"build": "./bin/build-zip.sh",
"build:dev": "npm run lint:js && npm run uglify",
"preuglify": "rm -f $npm_package_assets_js_min",
"uglify": "for f in $npm_package_assets_js_js; do file=${f%.js}; node_modules/.bin/uglifyjs $f -c -m > $file.min.js; done",
"lint:js": "eslint assets/js --ext=js"
},
"engines": {
"node": ">=10.15.0",
"npm": ">=6.4.1"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"linters": {
"*.php": [
"php -d display_errors=1 -l",
"composer run-script phpcs-pre-commit"
],
"*.js": [
"eslint --fix",
"git add"
]
},
"ignore": [
"*.min.js"
]
},
"woorelease": {
"svn_reauth": "true",
"wp_org_slug": "woocommerce-beta-tester"
}
}

View File

@ -0,0 +1,51 @@
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards">
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
<description>WooCommerce dev PHP_CodeSniffer ruleset.</description>
<!-- Exclude paths -->
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- Configs -->
<config name="minimum_supported_wp_version" value="4.7" />
<config name="testVersion" value="5.2-"/>
<!-- Rules -->
<rule ref="WooCommerce-Core" />
<rule ref="PHPCompatibility">
<exclude name="PHPCompatibility.PHP.NewFunctions.hash_equalsFound" />
<exclude name="PHPCompatibility.PHP.NewInterfaces.jsonserializableFound" />
<exclude name="PHPCompatibility.PHP.NewKeywords.t_namespaceFound" />
<exclude-pattern>tests/</exclude-pattern>
</rule>
<rule ref="WordPress">
<exclude name="WordPress.VIP.DirectDatabaseQuery.NoCaching" />
<exclude name="WordPress.VIP.DirectDatabaseQuery.DirectQuery" />
<exclude name="WordPress.VIP.DirectDatabaseQuery.SchemaChange" />
<exclude name="WordPress.VIP.FileSystemWritesDisallow.file_ops_fwrite" />
<exclude name="WordPress.VIP.OrderByRand" />
<exclude name="WordPress.VIP.RestrictedFunctions" />
<exclude name="WordPress.VIP.RestrictedVariables.user_meta__wpdb__usermeta" />
<exclude name="WordPress.VIP.PostsPerPage.posts_per_page_posts_per_page" />
<exclude name="WordPress.VIP.RestrictedVariables.cache_constraints___COOKIE" />
</rule>
<rule ref="WordPress.VIP.ValidatedSanitizedInput">
<properties>
<property name="customSanitizingFunctions" type="array" value="wc_clean,wc_sanitize_tooltip,wc_format_decimal,wc_stock_amount,wc_sanitize_permalink,wc_sanitize_textarea" />
</properties>
</rule>
<rule ref="WordPress.XSS.EscapeOutput">
<properties>
<property name="customEscapingFunctions" type="array" value="wc_help_tip,wc_sanitize_tooltip" />
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="woocommerce-beta-tester" />
</properties>
</rule>
</ruleset>

View File

@ -0,0 +1,41 @@
{
"root": "plugins/woocommerce-beta-tester/",
"sourceRoot": "plugins/woocommerce-beta-tester",
"projectType": "application",
"targets": {
"changelog": {
"executor": "./tools/executors/changelogger:changelog",
"options": {
"action": "add",
"cwd": "plugins/woocommerce-beta-tester"
}
},
"composer-install": {
"executor": "@nrwl/workspace:run-commands",
"options": {
"command": "composer install",
"cwd": "plugins/woocommerce-beta-tester"
}
},
"composer-install-no-dev": {
"executor": "@nrwl/workspace:run-commands",
"options": {
"command": "composer install --no-dev",
"cwd": "plugins/woocommerce-beta-tester"
}
},
"composer-dump-autoload": {
"executor": "@nrwl/workspace:run-commands",
"options": {
"command": "composer dump-autoload",
"cwd": "plugins/woocommerce-beta-tester"
}
},
"lint-js": {
"executor": "@nrwl/workspace:run-script",
"options": {
"script": "lint:js"
}
}
}
}

View File

@ -0,0 +1,95 @@
=== WooCommerce Beta Tester ===
Contributors: automattic, bor0, claudiosanches, claudiulodro, kloon, mikejolley, peterfabian1000, rodrigosprimo, wpmuguru
Tags: woocommerce, woo commerce, beta, beta tester, bleeding edge, testing
Requires at least: 4.7
Tested up to: 5.6
Stable tag: 2.0.5
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Easily update to prerelease versions of WooCommerce for testing and development purposes.
== Description ==
**WooCommerce Beta Tester** allows you to try out new versions of WooCommerce before they are officially released.
**Use with caution, not on production sites. Beta releases may not be stable.**
After activation, you'll be able to choose an update channel:
1. Beta - Update to beta releases, RC, or stable, depending on what is newest.
2. Release Candidate - Update to RC releases or stable, depending on what is newest.
3. Stable - No beta updates. Default WordPress behavior.
These will surface pre-releases via automatic updates in WordPress. Updates will replace your installed version of WooCommerce.
**Note**, this will not check for updates on every admin page load unless you explicitly tell it to. You can do this by clicking the "Check Again" button from the WordPress updates screen or you can set the `WC_BETA_TESTER_FORCE_UPDATE` to true in your `wp-config.php` file.
== Frequently Asked Questions ==
= Does this allow me to install multiple versions of WooCommerce at the same time?
No; updates will replace your currently installed version of WooCommerce. You can switch to any version from this plugin via the interface however.
= Where do updates come from? =
Updates are downloaded from the WordPress.org SVN repository where we tag prerelease versions specifically for this purpose.
= Does this rollback my data? =
This plugin does not rollback or update data on your store automatically.
Database updates are manually ran like after regular updates. If you downgrade, data will not be modified. We don't recommend using this in production.
= Where can I report bugs or contribute to WooCommerce Beta Tester? =
Bugs can be reported to the [WooCommerce Beta Tester GitHub issue tracker](https://github.com/woocommerce/woocommerce-beta-tester).
= Where can I report bugs or contribute to WooCommerce? =
Join in on our [GitHub repository](https://github.com/woocommerce/woocommerce/).
See our [contributing guidelines here](https://github.com/woocommerce/woocommerce/blob/master/.github/CONTRIBUTING.md).
== Changelog ==
= 2.0.5 - 2021-12-17 =
* Fix: make WC version comparison case insensitive
= 2.0.4 - 2021-09-29 =
* Dev: Bump tested to version
* Fix: enqueue logic for css/js assets
= 2.0.3 - 2021-09-22 =
* Fix: Bump version to release version including admin.css.
= 2.0.2 =
* Fix notice for undefined `item`
* Fix auto_update_plugin filter reference
* Fix including SSR in bug report
* Fix style in version modal header
* Add check for WooCommerce installed in default location
= 2.0.1 =
* Changes to make this plugin compatible with the upcoming WooCommerce 3.6
= 2.0.0 =
* Enhancement - Re-built to pull updates from the WordPress.org repository rather than GitHub.
* Enhancement - Channel selection; choose to receive RC or beta versions.
* Enhancement - Admin bar item shows version information, and offers shortcuts to functionality.
* Enhancement - Shortcut to log GitHub issues.
* Enhancement - Version switcher; choose which release or prerelease to switch to.
* Enhancement - Setting to enable auto-updates.
= 1.0.3 =
* Fix repo URLs and directory renaming.
= 1.0.2 =
* Updated API URL.
= 1.0.1 =
* Switched to releases API to get latest release, rather than tag which are not chronological.
= 1.0 =
* First release.

View File

@ -0,0 +1,66 @@
<?php
/**
* Plugin Name: WooCommerce Beta Tester
* Plugin URI: https://github.com/woocommerce/woocommerce-beta-tester
* Description: Run bleeding edge versions of WooCommerce. This will replace your installed version of WooCommerce with the latest tagged release - use with caution, and not on production sites.
* Version: 2.0.5
* Author: WooCommerce
* Author URI: http://woocommerce.com/
* Requires at least: 4.4
* Tested up to: 5.8
* WC requires at least: 3.6.0
* WC tested up to: 5.7.0
* Text Domain: woocommerce-beta-tester
*
* @package WC_Beta_Tester
*/
defined( 'ABSPATH' ) || exit;
// Define WC_BETA_TESTER_FILE.
if ( ! defined( 'WC_BETA_TESTER_FILE' ) ) {
define( 'WC_BETA_TESTER_FILE', __FILE__ );
}
if ( ! defined( 'WC_BETA_TESTER_VERSION' ) ) {
define( 'WC_BETA_TESTER_VERSION', '2.0.2' );
}
/**
* Load text domain before all other code.
*
* @since 2.0.0
*/
function _wc_beta_tester_load_textdomain() {
load_plugin_textdomain( 'woocommerce-beta-tester', false, basename( dirname( __FILE__ ) ) . '/languages' );
}
add_action( 'plugins_loaded', '_wc_beta_tester_load_textdomain' );
/**
* Boostrap plugin.
*/
function _wc_beta_tester_bootstrap() {
// Check if WooCommerce is enabled.
if ( ! class_exists( 'WooCommerce' ) ) {
include dirname( __FILE__ ) . '/includes/class-wc-beta-tester-admin-notices.php';
$notices = new WC_Beta_Tester_Admin_Notices();
add_action( 'admin_notices', array( $notices, 'woocoommerce_not_installed' ) );
} elseif ( ! class_exists( 'WC_Beta_Tester' ) ) {
include dirname( __FILE__ ) . '/includes/class-wc-beta-tester.php';
// Settings.
include dirname( __FILE__ ) . '/includes/class-wc-beta-tester-channel.php';
include dirname( __FILE__ ) . '/includes/class-wc-beta-tester-import-export.php';
new WC_Beta_Tester_Import_Export();
// Tools.
include dirname( __FILE__ ) . '/includes/class-wc-beta-tester-version-picker.php';
register_activation_hook( __FILE__, array( 'WC_Beta_Tester', 'activate' ) );
add_action( 'admin_init', array( 'WC_Beta_Tester', 'instance' ) );
}
}
add_action( 'plugins_loaded', '_wc_beta_tester_bootstrap' );

View File

@ -331,6 +331,18 @@ importers:
webpack-cli: 3.3.12_webpack@4.44.2
wp-textdomain: 1.0.1
plugins/woocommerce-beta-tester:
specifiers:
eslint: 5.16.0
husky: 1.3.1
lint-staged: 8.1.5
uglify-js: ^3.5.3
devDependencies:
eslint: 5.16.0
husky: 1.3.1
lint-staged: 8.1.5
uglify-js: 3.14.5
plugins/woocommerce/legacy:
specifiers:
'@wordpress/stylelint-config': 19.1.0
@ -4105,6 +4117,12 @@ packages:
regenerator-runtime: 0.13.9
dev: true
/@babel/runtime/7.0.0:
resolution: {integrity: sha512-7hGhzlcmg01CvH1EHdSPVXYX1aJ8KCEyz6I9xYIi/asDtzBPMyMhVibhM/K6g/5qnKBwjZtp10bNZIEFTRW1MA==}
dependencies:
regenerator-runtime: 0.12.1
dev: true
/@babel/runtime/7.15.4:
resolution: {integrity: sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==}
engines: {node: '>=6.9.0'}
@ -4277,7 +4295,7 @@ packages:
dependencies:
'@emotion/memoize': 0.7.5
'@emotion/sheet': 1.1.0
'@emotion/utils': 1.0.0
'@emotion/utils': 1.1.0
'@emotion/weak-memoize': 0.2.5
stylis: 4.0.13
@ -4315,7 +4333,7 @@ packages:
'@emotion/cache': 11.7.1
'@emotion/serialize': 1.0.2
'@emotion/sheet': 1.1.0
'@emotion/utils': 1.0.0
'@emotion/utils': 1.1.0
/@emotion/hash/0.8.0:
resolution: {integrity: sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==}
@ -4349,7 +4367,7 @@ packages:
optional: true
dependencies:
'@babel/core': 7.16.12
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@emotion/babel-plugin': 11.7.2_@babel+core@7.16.12
'@emotion/cache': 11.7.1
'@emotion/serialize': 1.0.2
@ -4422,7 +4440,7 @@ packages:
optional: true
dependencies:
'@babel/core': 7.16.12
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@emotion/babel-plugin': 11.7.2_@babel+core@7.16.12
'@emotion/is-prop-valid': 1.1.2
'@emotion/react': 11.8.2_b9efcf956de4c007b13ac83790eebad0
@ -8315,7 +8333,7 @@ packages:
engines: {node: '>=12'}
dependencies:
'@babel/code-frame': 7.16.7
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@types/aria-query': 4.2.2
aria-query: 5.0.0
chalk: 4.1.2
@ -8749,7 +8767,7 @@ packages:
/@types/react-test-renderer/17.0.1:
resolution: {integrity: sha512-3Fi2O6Zzq/f3QR9dRnlnHso9bMl7weKCviFmfF6B4LS1Uat6Hkm15k0ZAQuDz+UBq6B3+g+NM6IT2nr5QgPzCw==}
dependencies:
'@types/react': 16.14.21
'@types/react': 17.0.40
dev: true
/@types/react/16.14.21:
@ -8870,7 +8888,7 @@ packages:
/@types/wordpress__blocks/9.1.1:
resolution: {integrity: sha512-E4tMCascyIeTeBn3olJXRDESXQWsRsCVSnuaeIrznIR5wjJbUDSQBZF/GeFLjfIraHLGV2I5++r11GcPcXp0Ig==}
dependencies:
'@types/react': 16.14.21
'@types/react': 17.0.40
'@types/wordpress__components': 19.3.0
'@types/wordpress__data': 4.6.10
'@wordpress/element': 3.2.0
@ -8882,7 +8900,7 @@ packages:
/@types/wordpress__components/19.3.0:
resolution: {integrity: sha512-3LT89kmkFGfiymt36fnnTWelg2oea/UIkXmpRyYMTZe3Wt4GOTWrnmI8l6SpMQ1UKWNaqUXa6WZ6g/i9dGrhZQ==}
dependencies:
'@types/react': 16.14.21
'@types/react': 17.0.40
'@types/tinycolor2': 1.4.3
'@types/wordpress__notices': 3.3.0
'@types/wordpress__rich-text': 3.4.6
@ -10097,7 +10115,7 @@ packages:
resolution: {integrity: sha512-SjeLO8x/Y/QAcKBrvyJiu8KVAPckRLNwuFfgX7zCGM8vBfg+Depj94Hp55ARLjq0oXHg7EWKxSdzNkvmTz8AIA==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@wordpress/dom-ready': 3.4.1
'@wordpress/i18n': 4.4.1
@ -10113,7 +10131,7 @@ packages:
resolution: {integrity: sha512-6RHPgwLC+gg8geRsCAXgBW27X4NbV31IHH1rQR0LWecQutTfIrcW/RE2nJtX86X/ayFkBpM//9TflJ57r5o3lQ==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@wordpress/i18n': 4.4.1
'@wordpress/url': 3.5.1
dev: true
@ -10205,7 +10223,7 @@ packages:
resolution: {integrity: sha512-rGm7nXaxnsXStIu9v9IjbUOKtE9UzkvgYiJMX5SyVyzAGLOo2Aq759+JNRDLRR0RDkS6igH/G7qBXS6xSgLFgA==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
/@wordpress/block-editor/8.3.1_b9efcf956de4c007b13ac83790eebad0:
resolution: {integrity: sha512-fRnMS5hR30bZ5AlVD6pCvtjs0br50p+KdD3TLezS0RwoABXIAO3C45r4vgo4FveNgAIs33GvBTwt4eDWL9ipQA==}
@ -10260,7 +10278,7 @@ packages:
resolution: {integrity: sha512-0KGj9pG6rmZlOWtu0wbPNvCesGD9vj4k8+HiKbkYFu/GHSg10mfinTLZ638tByPLM6Q5OY3G3fNXGairGNpnSw==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
/@wordpress/blocks/11.1.5:
resolution: {integrity: sha512-r4xNTQPpUqJ7vqsJqH4D5+GeRQVOLF+9dkeNxkKQnJSFZ5y6POd28d0gMsOcTdGtAzXN6sak104DaKry2SWQNA==}
@ -10296,7 +10314,7 @@ packages:
peerDependencies:
react: ^17.0.0
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@wordpress/autop': 3.4.1
'@wordpress/blob': 3.4.1
'@wordpress/block-serialization-default-parser': 4.4.1
@ -10334,7 +10352,7 @@ packages:
peerDependencies:
reakit-utils: ^0.15.1
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@emotion/cache': 11.7.1
'@emotion/css': 11.7.1_@babel+core@7.16.12
'@emotion/react': 11.8.2_b9efcf956de4c007b13ac83790eebad0
@ -10343,17 +10361,17 @@ packages:
'@wordpress/a11y': 3.4.1
'@wordpress/compose': 4.2.0
'@wordpress/date': 4.4.1
'@wordpress/deprecated': 3.2.3
'@wordpress/dom': 3.2.7
'@wordpress/deprecated': 3.4.1
'@wordpress/dom': 3.4.1
'@wordpress/element': 3.2.0
'@wordpress/hooks': 3.2.2
'@wordpress/i18n': 4.2.4
'@wordpress/hooks': 3.4.1
'@wordpress/i18n': 4.4.1
'@wordpress/icons': 4.1.0
'@wordpress/is-shallow-equal': 4.2.1
'@wordpress/is-shallow-equal': 4.4.1
'@wordpress/keycodes': 3.4.1
'@wordpress/primitives': 2.2.0
'@wordpress/rich-text': 4.2.0
'@wordpress/warning': 2.2.2
'@wordpress/warning': 2.4.1
classnames: 2.3.1
dom-scroll-into-view: 1.2.1
downshift: 6.1.7
@ -10437,7 +10455,7 @@ packages:
react: ^17.0.0
react-dom: ^17.0.0
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@emotion/cache': 11.7.1
'@emotion/css': 11.7.1_@babel+core@7.16.12
'@emotion/react': 11.8.2_b9efcf956de4c007b13ac83790eebad0
@ -10484,7 +10502,7 @@ packages:
resolution: {integrity: sha512-8CJ4wzTXT9ZP+uIvN1d2cPBv06ZmhUh+UKzSf7v1o7T28SaYRcoZbsvDD2dnXbS2ZwWPIYAD9waNLWjCBq/izA==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@types/lodash': 4.14.149
'@types/mousetrap': 1.6.9
'@wordpress/deprecated': 3.4.1
@ -10508,7 +10526,7 @@ packages:
peerDependencies:
react: ^17.0.0
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@types/lodash': 4.14.178
'@types/mousetrap': 1.6.9
'@wordpress/deprecated': 3.4.1
@ -10564,7 +10582,7 @@ packages:
peerDependencies:
react: ^17.0.0
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@wordpress/compose': 5.2.1
'@wordpress/deprecated': 3.4.1
'@wordpress/element': 4.2.1
@ -10582,7 +10600,7 @@ packages:
resolution: {integrity: sha512-G2qcMB+EekBLIMO0YTEvhSfhTDAGM94WGe696DG4EevlBmMmgTSCATR8IvlD2+rta5Ut8qPJ1w2i0cy4AwslJA==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
moment: 2.29.1
moment-timezone: 0.5.34
@ -10611,7 +10629,7 @@ packages:
/@wordpress/deprecated/2.12.3:
resolution: {integrity: sha512-qr+yDfTQfI3M4h6oY6IeHWwoHr4jxbILjSlV+Ht6Jjto9Owap6OuzSqR13Ev4xqIoG4C7b5B3gZXVfwVDae1zg==}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@wordpress/hooks': 2.12.3
dev: true
@ -10626,7 +10644,7 @@ packages:
resolution: {integrity: sha512-OOxSsDykVSixNm3gfGqehQlUZaxw98/MewyWe/BwDoFsNOeDV4WcU8/3600SkucNDVsuhzVkdQv1GXvfm5+Ahw==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@wordpress/hooks': 3.4.1
/@wordpress/dom-ready/3.4.1:
@ -10646,7 +10664,7 @@ packages:
resolution: {integrity: sha512-fySHKew0GEIXC4HsIlHyszivV9qAQZcD+oHWn3N0MjaUYKvBRfh6jeBOQwbeBGR/32U+TX8Bqa/qAmDb8bMsyA==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
lodash: 4.17.21
/@wordpress/e2e-test-utils/3.0.0_jest@24.9.0+puppeteer@2.1.1:
@ -10656,7 +10674,7 @@ packages:
jest: '>=24'
puppeteer: '>=1.19.0'
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@wordpress/keycodes': 2.19.3
'@wordpress/url': 2.22.2
jest: 24.9.0
@ -10724,10 +10742,10 @@ packages:
resolution: {integrity: sha512-YXJhtBF8FnFYwA9X6Dvs4k6yJf5wy1lhU04VNJVzoUDwCt/pK747RGePIPDdUWVd3X/TlyNH2yLRtcCyOC/SzQ==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@types/react': 16.14.21
'@types/react-dom': 16.9.14
'@wordpress/escape-html': 2.2.3
'@wordpress/escape-html': 2.4.1
lodash: 4.17.21
react: 17.0.2
react-dom: 17.0.2_react@17.0.2
@ -10748,7 +10766,7 @@ packages:
resolution: {integrity: sha512-y/khi37c+PORfvhLdNJzvz9VM2Ip0b2i+AaP8R20h1hEpxAmIJsHA/GUNj8IdVkrgqCQh2Ejs9DFc2ldFrTJww==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@types/react': 17.0.40
'@types/react-dom': 17.0.13
'@wordpress/escape-html': 2.4.1
@ -10780,7 +10798,7 @@ packages:
resolution: {integrity: sha512-nYIwT8WzHfAzjjwHLiwDQWrzn4/gUNr5zud465XQszM2cAItN2wnC26/ovSpPomDGkvjcG0YltgnSqc1T62olA==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
/@wordpress/escape-html/2.4.1:
resolution: {integrity: sha512-iom52wT6VqUQUytnSvsOSJp3J/amKC55bTp4AQjGIhM6uLzpWD32n9ZDl8ntuNsck+v5llxehq9XKJZBZiCR+g==}
@ -10932,13 +10950,13 @@ packages:
resolution: {integrity: sha512-MlFWyu2ttJhmzDFBVWPRwZwIMqQdHFZTjFWFWm50NlzUzIJ3gEtNA95mHNtav1Fone24N+I2YkaYMNb6PEPTyA==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
/@wordpress/hooks/3.4.1:
resolution: {integrity: sha512-+RODEvxNsx3KW5nvk4KbnYMNFYvWA4Fduf784Ht7PJoL2L3z63Wm2blRh7a21hDEFHGPgWkne0f3Fgr/dqalHA==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
/@wordpress/html-entities/3.2.3:
resolution: {integrity: sha512-406VUz8CuKgKGrW/wjRB877soSqGhGDwK4sSuNoIC1FvpfniZ0ijpqfsdhJOOynWdz+RYN1wAsfogBpzuREJOg==}
@ -10950,14 +10968,14 @@ packages:
resolution: {integrity: sha512-wSuwgONTefnhCB9B7mKS+e8islHuCkprfDc+FhqVAa6r5RbVBGvaHUJs8embgdtww7MwBRMnskNf/buQ8Jr02A==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
dev: true
/@wordpress/i18n/3.20.0:
resolution: {integrity: sha512-SIoOJFB4UrrYAScS4H91CYCLW9dX3Ghv8pBKc/yHGculb1AdGr6gRMlmJxZV62Cn3CZ4Ga86c+FfR+GiBu0JPg==}
hasBin: true
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@wordpress/hooks': 2.12.3
gettext-parser: 1.4.0
lodash: 4.17.21
@ -10983,7 +11001,7 @@ packages:
engines: {node: '>=12'}
hasBin: true
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@wordpress/hooks': 3.4.1
gettext-parser: 1.4.0
lodash: 4.17.21
@ -10995,7 +11013,7 @@ packages:
resolution: {integrity: sha512-1FpEjT9kJbr0cWbgdgIwd2DoeerWijcVx3qCZ/WMFKNElBH9lfZLuWPI1hpX102HGWFcEi3VlbVpdBGeCeYQWg==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@wordpress/element': 3.2.0
'@wordpress/primitives': 2.2.0
dev: false
@ -11012,7 +11030,7 @@ packages:
resolution: {integrity: sha512-+K0yWNSMR6d/Q/Zlixw6I7/s8UIeMFuJUET3LhprMGLO3K+t+o/8xqfgXAMf4GiVkc0YV+kXOuCsMMXFFwzi+A==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@wordpress/element': 4.2.1
'@wordpress/primitives': 3.2.1
@ -11026,7 +11044,7 @@ packages:
resolution: {integrity: sha512-NlcqqrukKe4zT5fCs3O5FVYwqmHhtqM//KqWs7xfIaoz9B07oKZQNZqOrU72mgz7mgRliQumTQHzFM76RO0hZQ==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
/@wordpress/jest-console/4.1.1_jest@25.5.4:
resolution: {integrity: sha512-f/DwduxU6k53tULurpCox4TKzp877+IWTHRUxE91+FOXS+2OsnhUPKfMiMEex4nu81a54EArwekPVKxaq4swbA==}
@ -11034,7 +11052,7 @@ packages:
peerDependencies:
jest: '>=26'
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
jest: 25.5.4
jest-matcher-utils: 26.6.2
lodash: 4.17.21
@ -11046,7 +11064,7 @@ packages:
peerDependencies:
jest: '>=26'
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
jest: 26.6.3
jest-matcher-utils: 26.6.2
lodash: 4.17.21
@ -11096,7 +11114,7 @@ packages:
peerDependencies:
react: ^17.0.0
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@wordpress/data': 6.4.1
'@wordpress/element': 4.2.1
'@wordpress/keycodes': 3.4.1
@ -11107,7 +11125,7 @@ packages:
/@wordpress/keycodes/2.19.3:
resolution: {integrity: sha512-8rNdmP5M1ifTgLIL0dt/N1uTGsq/Rx1ydCXy+gg24WdxBRhyu5sudNVCtascVXo26aIfOH9OJRdqRZZTEORhog==}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@wordpress/i18n': 3.20.0
lodash: 4.17.21
@ -11115,7 +11133,7 @@ packages:
resolution: {integrity: sha512-z/pIY0JtLVCxMClKZFnSbhumDbTDf69F4vHYLESNRdAJktqPRRzKsSeg69tJKI+00QzVakKWAvoyyyjopmxoCQ==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@wordpress/i18n': 4.4.1
lodash: 4.17.21
@ -11137,7 +11155,7 @@ packages:
peerDependencies:
react: ^17.0.0
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@wordpress/a11y': 3.4.1
'@wordpress/data': 6.4.1
lodash: 4.17.21
@ -11191,7 +11209,7 @@ packages:
resolution: {integrity: sha512-WupgR+tt6fKGZE1UKy2gz3wDdpRL9MWQbVuetXv/7TPAz2ofOS2fZIsXNrl4D0HkA82gYh8w8s2TXK0XNyAAow==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@wordpress/element': 3.2.0
classnames: 2.3.1
dev: false
@ -11200,7 +11218,7 @@ packages:
resolution: {integrity: sha512-dOrQQudydRw4szT60t+5b9jwMwxB4LMxNRlkbyGqqNwjv11Vq52FT9rVeLs0CvlqklluCyZu5KnUp/dELxIYJw==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@wordpress/element': 4.2.1
classnames: 2.3.1
@ -11238,7 +11256,7 @@ packages:
resolution: {integrity: sha512-e+wfrkKtZIcFZJZLxkrikiXbxlr6nuGg+V94uKMLrzJEWdw7w/8l3dNhWHRGPkldXIEGrF/mV40ibjUa2p3Sfg==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@wordpress/compose': 4.2.0
'@wordpress/data': 5.2.0
'@wordpress/dom': 3.4.1
@ -11261,7 +11279,7 @@ packages:
peerDependencies:
react: ^17.0.0
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@wordpress/a11y': 3.4.1
'@wordpress/compose': 5.2.1
'@wordpress/data': 6.4.1
@ -11371,7 +11389,7 @@ packages:
resolution: {integrity: sha512-j1NSFjDlUxCQrr/nlkQXWHw+dL2uaA5w0E3qGyZfg/uDqNNpprnohhXxaFCaL3t5Af10PInlJ3NQ1dGTOUtPvQ==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
lodash: 4.17.21
memize: 1.1.0
@ -11379,7 +11397,7 @@ packages:
resolution: {integrity: sha512-9QAAxS3ZGbkaVfEDPIqyFDeeeNgAOHCdE0EdZBseAjSB7synWbKQYcuxA82G7PSgtlLrL7S2xfIRZMAE/zshFQ==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
lodash: 4.17.21
dev: true
@ -11411,14 +11429,14 @@ packages:
resolution: {integrity: sha512-er233ftX41KXg/2LloUfVAfN8iba8Wuvxy5h6mF1Edi67jroc5p1r/Nv0jjgwVPJF9XrPBVbL6wtJYSvjyxZwA==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
lodash: 4.17.21
dev: true
/@wordpress/url/2.22.2:
resolution: {integrity: sha512-aqpYKQXzyzkCOm+GzZRYlLb+wh58g0cwR1PaKAl0UXaBS4mdS+X6biMriylb4P8CVC/RR7CSw5XI20JC24KDwQ==}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
lodash: 4.17.21
react-native-url-polyfill: 1.3.0
transitivePeerDependencies:
@ -11428,7 +11446,7 @@ packages:
resolution: {integrity: sha512-m4gjNdOkwaZ9NOVk/lYtpW4GoxHU0ZSv6WX3pFYRDSPdI1eX45uA8RrhPBYuj/e/XPUBiS+FXDilR0uvqqz9FA==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
lodash: 4.17.21
/@wordpress/warning/2.2.2:
@ -11451,7 +11469,7 @@ packages:
resolution: {integrity: sha512-5LAadql0zHekU6SvDT9GPKhkCeX9sSu3nFJZ24WdW55ckfPH/D69zqfEdvdR1aOPOWN7J1cUnsczdjrfiSLX0Q==}
engines: {node: '>=12'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
lodash: 4.17.21
dev: true
@ -11849,7 +11867,7 @@ packages:
resolution: {integrity: sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==}
engines: {node: '>=6.0'}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
'@babel/runtime-corejs3': 7.16.3
dev: true
@ -14349,7 +14367,7 @@ packages:
engines: {node: '>=4'}
dependencies:
dot-prop: 4.2.1
graceful-fs: 4.2.8
graceful-fs: 4.2.9
make-dir: 1.3.0
unique-string: 1.0.0
write-file-atomic: 2.4.1
@ -15386,6 +15404,18 @@ packages:
is-descriptor: 1.0.2
isobject: 3.0.1
/del/3.0.0:
resolution: {integrity: sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=}
engines: {node: '>=4'}
dependencies:
globby: 6.1.0
is-path-cwd: 1.0.0
is-path-in-cwd: 1.0.1
p-map: 1.2.0
pify: 3.0.0
rimraf: 2.7.1
dev: true
/del/4.1.1:
resolution: {integrity: sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==}
engines: {node: '>=6'}
@ -16772,11 +16802,11 @@ packages:
engines: {node: ^6.14.0 || ^8.10.0 || >=9.10.0}
hasBin: true
dependencies:
'@babel/code-frame': 7.16.0
'@babel/code-frame': 7.16.7
ajv: 6.12.6
chalk: 2.4.2
cross-spawn: 6.0.5
debug: 4.3.2
debug: 4.3.3
doctrine: 3.0.0
eslint-scope: 4.0.3
eslint-utils: 1.4.3
@ -17962,6 +17992,11 @@ packages:
readable-stream: 2.3.7
dev: true
/fn-name/2.0.1:
resolution: {integrity: sha1-UhTXU3pNBqSjAcDMJi/rhBiAAuc=}
engines: {node: '>=0.10.0'}
dev: true
/follow-redirects/1.14.5:
resolution: {integrity: sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==}
engines: {node: '>=4.0'}
@ -18296,6 +18331,17 @@ packages:
engines: {node: '>=6'}
dev: true
/g-status/2.0.2:
resolution: {integrity: sha512-kQoE9qH+T1AHKgSSD0Hkv98bobE90ILQcXAF4wvGgsr7uFqNvwmh8j+Lq3l0RVt3E3HjSbv2B9biEGcEtpHLCA==}
engines: {node: '>=6'}
dependencies:
arrify: 1.0.1
matcher: 1.1.1
simple-git: 1.132.0
transitivePeerDependencies:
- supports-color
dev: true
/gauge/3.0.2:
resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==}
engines: {node: '>=10'}
@ -19635,6 +19681,24 @@ packages:
ms: 2.1.3
dev: true
/husky/1.3.1:
resolution: {integrity: sha512-86U6sVVVf4b5NYSZ0yvv88dRgBSSXXmHaiq5pP4KDj5JVzdwKgBjEtUPOm8hcoytezFwbU+7gotXNhpHdystlg==}
engines: {node: '>=6'}
hasBin: true
requiresBuild: true
dependencies:
cosmiconfig: 5.2.1
execa: 1.0.0
find-up: 3.0.0
get-stdin: 6.0.0
is-ci: 2.0.0
pkg-dir: 3.0.0
please-upgrade-node: 3.2.0
read-pkg: 4.0.1
run-node: 1.0.0
slash: 2.0.0
dev: true
/husky/2.4.1:
resolution: {integrity: sha512-ZRwMWHr7QruR22dQ5l3rEGXQ7rAQYsJYqaeCd+NyOsIFczAtqaApZQP3P4HwLZjCtFbm3SUNYoKuoBXX3AYYfw==}
engines: {node: '>=8'}
@ -20392,11 +20456,23 @@ packages:
symbol-observable: 1.2.0
dev: true
/is-path-cwd/1.0.0:
resolution: {integrity: sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=}
engines: {node: '>=0.10.0'}
dev: true
/is-path-cwd/2.2.0:
resolution: {integrity: sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==}
engines: {node: '>=6'}
dev: true
/is-path-in-cwd/1.0.1:
resolution: {integrity: sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==}
engines: {node: '>=0.10.0'}
dependencies:
is-path-inside: 1.0.1
dev: true
/is-path-in-cwd/2.1.0:
resolution: {integrity: sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==}
engines: {node: '>=6'}
@ -23374,6 +23450,40 @@ packages:
uc.micro: 1.0.6
dev: true
/lint-staged/8.1.5:
resolution: {integrity: sha512-e5ZavfnSLcBJE1BTzRTqw6ly8OkqVyO3GL2M6teSmTBYQ/2BuueD5GIt2RPsP31u/vjKdexUyDCxSyK75q4BDA==}
hasBin: true
dependencies:
chalk: 2.4.2
commander: 2.20.3
cosmiconfig: 5.2.1
debug: 3.2.7
dedent: 0.7.0
del: 3.0.0
execa: 1.0.0
find-parent-dir: 0.3.1
g-status: 2.0.2
is-glob: 4.0.3
is-windows: 1.0.2
listr: 0.14.3
listr-update-renderer: 0.5.0_listr@0.14.3
lodash: 4.17.21
log-symbols: 2.2.0
micromatch: 3.1.10
npm-which: 3.0.1
p-map: 1.2.0
path-is-inside: 1.0.2
pify: 3.0.0
please-upgrade-node: 3.2.0
staged-git-files: 1.1.2
string-argv: 0.0.2
stringify-object: 3.3.0
yup: 0.26.10
transitivePeerDependencies:
- supports-color
- zen-observable
dev: true
/lint-staged/9.5.0:
resolution: {integrity: sha512-nawMob9cb/G1J98nb8v3VC/E8rcX1rryUYXVZ69aT9kde6YWX+uvNOEHY5yf2gcWcTJGiD0kqXmCnS3oD75GIA==}
hasBin: true
@ -23640,6 +23750,13 @@ packages:
chalk: 1.1.3
dev: true
/log-symbols/2.2.0:
resolution: {integrity: sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==}
engines: {node: '>=4'}
dependencies:
chalk: 2.4.2
dev: true
/log-symbols/3.0.0:
resolution: {integrity: sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==}
engines: {node: '>=8'}
@ -23929,6 +24046,13 @@ packages:
hasBin: true
dev: true
/matcher/1.1.1:
resolution: {integrity: sha512-+BmqxWIubKTRKNWx/ahnCkk3mG8m7OturVlqq6HiojGJTd5hVYbgZm6WzcYPCoB+KBT4Vd6R7WSRG2OADNaCjg==}
engines: {node: '>=4'}
dependencies:
escape-string-regexp: 1.0.5
dev: true
/mathml-tag-names/2.1.3:
resolution: {integrity: sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==}
dev: true
@ -25010,6 +25134,14 @@ packages:
npm-normalize-package-bin: 1.0.1
dev: true
/npm-path/2.0.4:
resolution: {integrity: sha512-IFsj0R9C7ZdR5cP+ET342q77uSRdtWOlWpih5eC+lu29tIDbNEgDbzgVJ5UFvYHWhxDZ5TFkJafFioO0pPQjCw==}
engines: {node: '>=0.8'}
hasBin: true
dependencies:
which: 1.3.1
dev: true
/npm-pick-manifest/6.1.1:
resolution: {integrity: sha512-dBsdBtORT84S8V8UTad1WlUyKIY9iMsAmqxHbLdeEeBNMLQDlDWWra3wYUx9EBEIiG/YwAy0XyNHDd2goAsfuA==}
dependencies:
@ -25068,6 +25200,16 @@ packages:
dependencies:
path-key: 3.1.1
/npm-which/3.0.1:
resolution: {integrity: sha1-kiXybsOihcIJyuZ8OxGmtKtxQKo=}
engines: {node: '>=4.2.0'}
hasBin: true
dependencies:
commander: 2.20.3
npm-path: 2.0.4
which: 1.3.1
dev: true
/npmlog/5.0.1:
resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==}
dependencies:
@ -25542,6 +25684,11 @@ packages:
p-limit: 3.1.0
dev: true
/p-map/1.2.0:
resolution: {integrity: sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==}
engines: {node: '>=4'}
dev: true
/p-map/2.1.0:
resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==}
engines: {node: '>=6'}
@ -27506,6 +27653,10 @@ packages:
object-assign: 4.1.1
react-is: 16.13.1
/property-expr/1.5.1:
resolution: {integrity: sha512-CGuc0VUTGthpJXL36ydB6jnbyOf/rAHFvmVrJlH+Rg0DqqLFQGAP6hIaxD/G0OAmBJPhXDHuEJigrp0e0wFV6g==}
dev: true
/property-information/5.6.0:
resolution: {integrity: sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==}
dependencies:
@ -27944,7 +28095,7 @@ packages:
peerDependencies:
react: '>=16.13.1'
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
dev: true
/react-fast-compare/3.2.0:
@ -28118,7 +28269,7 @@ packages:
react: '>= 16.8.0'
react-dom: '>= 16.8.0'
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
prop-types: 15.7.2
dev: false
@ -28127,7 +28278,7 @@ packages:
peerDependencies:
react: '>= 0.14.0'
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
highlight.js: 10.7.3
lowlight: 1.20.0
prismjs: 1.27.0
@ -28265,6 +28416,15 @@ packages:
normalize-package-data: 2.5.0
path-type: 3.0.0
/read-pkg/4.0.1:
resolution: {integrity: sha1-ljYlN48+HE1IyFhytabsfV0JMjc=}
engines: {node: '>=6'}
dependencies:
normalize-package-data: 2.5.0
parse-json: 4.0.0
pify: 3.0.0
dev: true
/read-pkg/5.2.0:
resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==}
engines: {node: '>=8'}
@ -28406,7 +28566,7 @@ packages:
/redux/4.1.2:
resolution: {integrity: sha512-SH8PglcebESbd/shgf6mii6EIoRM0zrQyjcuQ+ojmfxjTtE0z9Y8pa62iA/OJ58qjP6j27uyW4kUF4jl/jd6sw==}
dependencies:
'@babel/runtime': 7.16.3
'@babel/runtime': 7.17.7
/reflect.ownkeys/0.2.0:
resolution: {integrity: sha1-dJrO7H8/34tj+SegSAnpDFwLNGA=}
@ -28432,6 +28592,10 @@ packages:
resolution: {integrity: sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==}
dev: true
/regenerator-runtime/0.12.1:
resolution: {integrity: sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==}
dev: true
/regenerator-runtime/0.13.9:
resolution: {integrity: sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==}
@ -28808,7 +28972,7 @@ packages:
engines: {node: '>=4'}
dependencies:
onetime: 2.0.1
signal-exit: 3.0.5
signal-exit: 3.0.7
dev: true
/restore-cursor/3.1.0:
@ -29467,6 +29631,14 @@ packages:
/signal-exit/3.0.7:
resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
/simple-git/1.132.0:
resolution: {integrity: sha512-xauHm1YqCTom1sC9eOjfq3/9RKiUA9iPnxBbrY2DdL8l4ADMu0jjM5l5lphQP5YWNqAL2aXC/OeuQ76vHtW5fg==}
dependencies:
debug: 4.3.3
transitivePeerDependencies:
- supports-color
dev: true
/simple-git/2.48.0:
resolution: {integrity: sha512-z4qtrRuaAFJS4PUd0g+xy7aN4y+RvEt/QTJpR184lhJguBA1S/LsVlvE/CM95RsYMOFJG3NGGDjqFCzKU19S/A==}
dependencies:
@ -29833,6 +30005,11 @@ packages:
resolution: {integrity: sha512-GrdeshiRmS1YLMYgzF16olf2jJ/IzxXY9lhKOskuVziubpTYcYqyOwYeJKzQkwy7uN0fYSsbsC4RQaXf9LCrYA==}
dev: true
/staged-git-files/1.1.2:
resolution: {integrity: sha512-0Eyrk6uXW6tg9PYkhi/V/J4zHp33aNyi2hOCmhFLqLTIhbgqWn5jlSzI+IU0VqrZq6+DbHcabQl/WP6P3BG0QA==}
hasBin: true
dev: true
/state-toggle/1.0.3:
resolution: {integrity: sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ==}
dev: true
@ -29907,6 +30084,11 @@ packages:
resolution: {integrity: sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==}
dev: true
/string-argv/0.0.2:
resolution: {integrity: sha1-2sMECGkMIfPDYwo/86BYd73L1zY=}
engines: {node: '>=0.6.19'}
dev: true
/string-argv/0.3.1:
resolution: {integrity: sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==}
engines: {node: '>=0.6.19'}
@ -31157,6 +31339,10 @@ packages:
engines: {node: '>=0.6'}
dev: true
/toposort/2.0.2:
resolution: {integrity: sha1-riF2gXXRVZ1IvvNUILL0li8JwzA=}
dev: true
/totalist/1.1.0:
resolution: {integrity: sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==}
engines: {node: '>=6'}
@ -33202,6 +33388,17 @@ packages:
wrap-ansi: 2.1.0
dev: true
/yup/0.26.10:
resolution: {integrity: sha512-keuNEbNSnsOTOuGCt3UJW69jDE3O4P+UHAakO7vSeFMnjaitcmlbij/a3oNb9g1Y1KvSKH/7O1R2PQ4m4TRylw==}
dependencies:
'@babel/runtime': 7.0.0
fn-name: 2.0.1
lodash: 4.17.21
property-expr: 1.5.1
synchronous-promise: 2.0.15
toposort: 2.0.2
dev: true
/zenhub-api/0.2.0:
resolution: {integrity: sha1-vVYB33T9XB3qjS9pva2m8Qz24ok=}
dependencies:

View File

@ -7,6 +7,7 @@
"@woocommerce/e2e-environment": "packages/js/e2e-environment",
"@woocommerce/e2e-utils": "packages/js/e2e-utils",
"woocommerce": "plugins/woocommerce",
"woocommerce-legacy-assets": "plugins/woocommerce/legacy"
"woocommerce-legacy-assets": "plugins/woocommerce/legacy",
"woocommerce-beta-tester": "plugins/woocommerce-beta-tester"
}
}