Allow core inclusion via Package.php (https://github.com/woocommerce/woocommerce-admin/pull/3196)
* Create GH tag release process Add core to the release no need to re-run docs simplify build command add gh release script fix errant comment fix errant comment force add feature-config.php gitattributes moar attributes add language files * Make sure initalization via Core is working
This commit is contained in:
parent
f8fa7b6bc7
commit
790e5f59d3
|
@ -19,6 +19,9 @@ function replace_version( $filename, $package_json ) {
|
|||
if ( stripos( $line, ">define( 'WC_ADMIN_VERSION_NUMBER'," ) !== false ) {
|
||||
$line = "\t\t\$this->define( 'WC_ADMIN_VERSION_NUMBER', '{$package_json->version}' );\n";
|
||||
}
|
||||
if ( stripos( $line, "const VERSION =" ) !== false ) {
|
||||
$line = "\tconst VERSION = '{$package_json->version}';\n";
|
||||
}
|
||||
$lines[] = $line;
|
||||
}
|
||||
file_put_contents( $filename, $lines );
|
||||
|
@ -26,3 +29,4 @@ function replace_version( $filename, $package_json ) {
|
|||
|
||||
replace_version( 'woocommerce-admin.php', $package );
|
||||
replace_version( 'src/FeaturePlugin.php', $package );
|
||||
replace_version( 'src/Package.php', $package );
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
"prefer-stable": true,
|
||||
"minimum-stability": "dev",
|
||||
"require": {
|
||||
"composer/installers": "1.7.0"
|
||||
"composer/installers": "1.7.0",
|
||||
"automattic/jetpack-autoloader": "1.2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "6.5.13",
|
||||
|
@ -35,12 +36,6 @@
|
|||
"classmap": [
|
||||
"includes/"
|
||||
],
|
||||
"files": [
|
||||
"includes/core-functions.php",
|
||||
"includes/feature-config.php",
|
||||
"includes/page-controller-functions.php",
|
||||
"includes/wc-admin-update-functions.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Automattic\\WooCommerce\\Admin\\": "src/"
|
||||
}
|
||||
|
|
|
@ -4,8 +4,44 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "8e65d834da208270d0299c6e634b7fdb",
|
||||
"content-hash": "a0e3b70626c84a1eaac996defad5a84e",
|
||||
"packages": [
|
||||
{
|
||||
"name": "automattic/jetpack-autoloader",
|
||||
"version": "v1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Automattic/jetpack-autoloader.git",
|
||||
"reference": "4ad9631e68e9da8b8a764615766287becfb27f81"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/4ad9631e68e9da8b8a764615766287becfb27f81",
|
||||
"reference": "4ad9631e68e9da8b8a764615766287becfb27f81",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"composer-plugin-api": "^1.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5"
|
||||
},
|
||||
"type": "composer-plugin",
|
||||
"extra": {
|
||||
"class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Automattic\\Jetpack\\Autoloader\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"GPL-2.0-or-later"
|
||||
],
|
||||
"description": "Creates a custom autoloader for a plugin or theme.",
|
||||
"time": "2019-06-24T15:13:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/installers",
|
||||
"version": "v1.7.0",
|
||||
|
@ -198,16 +234,16 @@
|
|||
},
|
||||
{
|
||||
"name": "doctrine/instantiator",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/instantiator.git",
|
||||
"reference": "a2c590166b2133a4633738648b6b064edae0814a"
|
||||
"reference": "ae466f726242e637cebdd526a7d991b9433bacf1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a",
|
||||
"reference": "a2c590166b2133a4633738648b6b064edae0814a",
|
||||
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1",
|
||||
"reference": "ae466f726242e637cebdd526a7d991b9433bacf1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -250,20 +286,20 @@
|
|||
"constructor",
|
||||
"instantiate"
|
||||
],
|
||||
"time": "2019-03-17T17:37:11+00:00"
|
||||
"time": "2019-10-21T16:45:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "myclabs/deep-copy",
|
||||
"version": "1.9.1",
|
||||
"version": "1.9.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/myclabs/DeepCopy.git",
|
||||
"reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72"
|
||||
"reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72",
|
||||
"reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72",
|
||||
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea",
|
||||
"reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -298,7 +334,7 @@
|
|||
"object",
|
||||
"object graph"
|
||||
],
|
||||
"time": "2019-04-07T13:18:21+00:00"
|
||||
"time": "2019-08-09T12:45:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phar-io/manifest",
|
||||
|
@ -404,16 +440,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpcompatibility/php-compatibility",
|
||||
"version": "9.3.1",
|
||||
"version": "9.3.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPCompatibility/PHPCompatibility.git",
|
||||
"reference": "9999344e47e7af6b00e1a898eacc4e4368fb7196"
|
||||
"reference": "1f37659196e4f3113ea506a7efba201c52303bf1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9999344e47e7af6b00e1a898eacc4e4368fb7196",
|
||||
"reference": "9999344e47e7af6b00e1a898eacc4e4368fb7196",
|
||||
"url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/1f37659196e4f3113ea506a7efba201c52303bf1",
|
||||
"reference": "1f37659196e4f3113ea506a7efba201c52303bf1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -458,20 +494,20 @@
|
|||
"phpcs",
|
||||
"standards"
|
||||
],
|
||||
"time": "2019-09-05T18:36:49+00:00"
|
||||
"time": "2019-11-15T04:12:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpcompatibility/phpcompatibility-paragonie",
|
||||
"version": "1.1.0",
|
||||
"version": "1.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git",
|
||||
"reference": "b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936"
|
||||
"reference": "b862bc32f7e860d0b164b199bd995e690b4b191c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936",
|
||||
"reference": "b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936",
|
||||
"url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/b862bc32f7e860d0b164b199bd995e690b4b191c",
|
||||
"reference": "b862bc32f7e860d0b164b199bd995e690b4b191c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -510,7 +546,7 @@
|
|||
"polyfill",
|
||||
"standards"
|
||||
],
|
||||
"time": "2019-08-28T15:58:19+00:00"
|
||||
"time": "2019-11-04T15:17:54+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpcompatibility/phpcompatibility-wp",
|
||||
|
@ -564,35 +600,33 @@
|
|||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-common",
|
||||
"version": "1.0.1",
|
||||
"version": "2.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
|
||||
"reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
|
||||
"reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
|
||||
"reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a",
|
||||
"reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5"
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.6"
|
||||
"phpunit/phpunit": "~6"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
"dev-master": "2.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"phpDocumentor\\Reflection\\": [
|
||||
"src"
|
||||
]
|
||||
"phpDocumentor\\Reflection\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
|
@ -614,30 +648,30 @@
|
|||
"reflection",
|
||||
"static analysis"
|
||||
],
|
||||
"time": "2017-09-11T18:02:19+00:00"
|
||||
"time": "2018-08-07T13:53:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-docblock",
|
||||
"version": "4.3.1",
|
||||
"version": "4.3.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
||||
"reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c"
|
||||
"reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c",
|
||||
"reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e",
|
||||
"reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.0",
|
||||
"phpdocumentor/reflection-common": "^1.0.0",
|
||||
"phpdocumentor/type-resolver": "^0.4.0",
|
||||
"phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0",
|
||||
"phpdocumentor/type-resolver": "~0.4 || ^1.0.0",
|
||||
"webmozart/assert": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/instantiator": "~1.0.5",
|
||||
"doctrine/instantiator": "^1.0.5",
|
||||
"mockery/mockery": "^1.0",
|
||||
"phpunit/phpunit": "^6.4"
|
||||
},
|
||||
|
@ -665,41 +699,40 @@
|
|||
}
|
||||
],
|
||||
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
||||
"time": "2019-04-30T17:48:53+00:00"
|
||||
"time": "2019-09-12T14:27:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/type-resolver",
|
||||
"version": "0.4.0",
|
||||
"version": "1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
||||
"reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
|
||||
"reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
|
||||
"reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
|
||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9",
|
||||
"reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.5 || ^7.0",
|
||||
"phpdocumentor/reflection-common": "^1.0"
|
||||
"php": "^7.1",
|
||||
"phpdocumentor/reflection-common": "^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^0.9.4",
|
||||
"phpunit/phpunit": "^5.2||^4.8.24"
|
||||
"ext-tokenizer": "^7.1",
|
||||
"mockery/mockery": "~1",
|
||||
"phpunit/phpunit": "^7.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
"dev-master": "1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"phpDocumentor\\Reflection\\": [
|
||||
"src/"
|
||||
]
|
||||
"phpDocumentor\\Reflection\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
|
@ -712,26 +745,27 @@
|
|||
"email": "me@mikevanriel.com"
|
||||
}
|
||||
],
|
||||
"time": "2017-07-14T14:27:02+00:00"
|
||||
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
|
||||
"time": "2019-08-22T18:11:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
"version": "1.8.1",
|
||||
"version": "1.9.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpspec/prophecy.git",
|
||||
"reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76"
|
||||
"reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76",
|
||||
"reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203",
|
||||
"reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/instantiator": "^1.0.2",
|
||||
"php": "^5.3|^7.0",
|
||||
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
|
||||
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
|
||||
"sebastian/comparator": "^1.1|^2.0|^3.0",
|
||||
"sebastian/recursion-context": "^1.0|^2.0|^3.0"
|
||||
},
|
||||
|
@ -775,7 +809,7 @@
|
|||
"spy",
|
||||
"stub"
|
||||
],
|
||||
"time": "2019-06-13T12:50:23+00:00"
|
||||
"time": "2019-10-03T11:07:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
|
@ -1383,16 +1417,16 @@
|
|||
},
|
||||
{
|
||||
"name": "sebastian/exporter",
|
||||
"version": "3.1.0",
|
||||
"version": "3.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/exporter.git",
|
||||
"reference": "234199f4528de6d12aaa58b612e98f7d36adb937"
|
||||
"reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937",
|
||||
"reference": "234199f4528de6d12aaa58b612e98f7d36adb937",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e",
|
||||
"reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1419,6 +1453,10 @@
|
|||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
},
|
||||
{
|
||||
"name": "Jeff Welch",
|
||||
"email": "whatthejeff@gmail.com"
|
||||
|
@ -1427,17 +1465,13 @@
|
|||
"name": "Volker Dusch",
|
||||
"email": "github@wallbash.com"
|
||||
},
|
||||
{
|
||||
"name": "Bernhard Schussek",
|
||||
"email": "bschussek@2bepublished.at"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
},
|
||||
{
|
||||
"name": "Adam Harvey",
|
||||
"email": "aharvey@php.net"
|
||||
},
|
||||
{
|
||||
"name": "Bernhard Schussek",
|
||||
"email": "bschussek@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Provides the functionality to export PHP variables for visualization",
|
||||
|
@ -1446,7 +1480,7 @@
|
|||
"export",
|
||||
"exporter"
|
||||
],
|
||||
"time": "2017-04-03T13:19:02+00:00"
|
||||
"time": "2019-09-14T09:02:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/global-state",
|
||||
|
@ -1731,16 +1765,16 @@
|
|||
},
|
||||
{
|
||||
"name": "squizlabs/php_codesniffer",
|
||||
"version": "3.4.2",
|
||||
"version": "3.5.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
||||
"reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8"
|
||||
"reference": "65b12cdeaaa6cd276d4c3033a95b9b88b12701e7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8",
|
||||
"reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8",
|
||||
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/65b12cdeaaa6cd276d4c3033a95b9b88b12701e7",
|
||||
"reference": "65b12cdeaaa6cd276d4c3033a95b9b88b12701e7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1778,20 +1812,20 @@
|
|||
"phpcs",
|
||||
"standards"
|
||||
],
|
||||
"time": "2019-04-10T23:49:02+00:00"
|
||||
"time": "2019-10-28T04:36:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.11.0",
|
||||
"version": "v1.12.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||
"reference": "82ebae02209c21113908c229e9883c419720738a"
|
||||
"reference": "550ebaac289296ce228a706d0867afc34687e3f4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a",
|
||||
"reference": "82ebae02209c21113908c229e9883c419720738a",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
|
||||
"reference": "550ebaac289296ce228a706d0867afc34687e3f4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1803,7 +1837,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.11-dev"
|
||||
"dev-master": "1.12-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -1819,13 +1853,13 @@
|
|||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
},
|
||||
{
|
||||
"name": "Gert de Pagter",
|
||||
"email": "BackEndTea@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for ctype functions",
|
||||
|
@ -1836,7 +1870,7 @@
|
|||
"polyfill",
|
||||
"portable"
|
||||
],
|
||||
"time": "2019-02-06T07:57:58+00:00"
|
||||
"time": "2019-08-06T08:03:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "theseer/tokenizer",
|
||||
|
@ -1880,16 +1914,16 @@
|
|||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
"version": "1.4.0",
|
||||
"version": "1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/webmozart/assert.git",
|
||||
"reference": "83e253c8e0be5b0257b881e1827274667c5c17a9"
|
||||
"reference": "88e6d84706d09a236046d686bbea96f07b3a34f4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9",
|
||||
"reference": "83e253c8e0be5b0257b881e1827274667c5c17a9",
|
||||
"url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4",
|
||||
"reference": "88e6d84706d09a236046d686bbea96f07b3a34f4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1897,8 +1931,7 @@
|
|||
"symfony/polyfill-ctype": "^1.8"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.6",
|
||||
"sebastian/version": "^1.0.1"
|
||||
"phpunit/phpunit": "^4.8.36 || ^7.5.13"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
|
@ -1927,7 +1960,7 @@
|
|||
"check",
|
||||
"validate"
|
||||
],
|
||||
"time": "2018-12-25T11:19:39+00:00"
|
||||
"time": "2019-08-24T08:43:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "woocommerce/woocommerce-sniffs",
|
||||
|
@ -1971,16 +2004,16 @@
|
|||
},
|
||||
{
|
||||
"name": "wp-coding-standards/wpcs",
|
||||
"version": "2.1.1",
|
||||
"version": "2.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/WordPress/WordPress-Coding-Standards.git",
|
||||
"reference": "bd9c33152115e6741e3510ff7189605b35167908"
|
||||
"reference": "f90e8692ce97b693633db7ab20bfa78d930f536a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/bd9c33152115e6741e3510ff7189605b35167908",
|
||||
"reference": "bd9c33152115e6741e3510ff7189605b35167908",
|
||||
"url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/f90e8692ce97b693633db7ab20bfa78d930f536a",
|
||||
"reference": "f90e8692ce97b693633db7ab20bfa78d930f536a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2003,7 +2036,7 @@
|
|||
"authors": [
|
||||
{
|
||||
"name": "Contributors",
|
||||
"homepage": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/graphs/contributors"
|
||||
"homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors"
|
||||
}
|
||||
],
|
||||
"description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions",
|
||||
|
@ -2012,7 +2045,7 @@
|
|||
"standards",
|
||||
"wordpress"
|
||||
],
|
||||
"time": "2019-05-21T02:50:00+00:00"
|
||||
"time": "2019-11-11T12:34:03+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
|
|
|
@ -55,9 +55,19 @@ class FeaturePlugin {
|
|||
*/
|
||||
public function init() {
|
||||
$this->define_constants();
|
||||
|
||||
require_once WC_ADMIN_ABSPATH . '/includes/core-functions.php';
|
||||
require_once WC_ADMIN_ABSPATH . '/includes/feature-config.php';
|
||||
require_once WC_ADMIN_ABSPATH . '/includes/page-controller-functions.php';
|
||||
require_once WC_ADMIN_ABSPATH . '/includes/wc-admin-update-functions.php';
|
||||
|
||||
register_activation_hook( WC_ADMIN_PLUGIN_FILE, array( $this, 'on_activation' ) );
|
||||
register_deactivation_hook( WC_ADMIN_PLUGIN_FILE, array( $this, 'on_deactivation' ) );
|
||||
add_action( 'plugins_loaded', array( $this, 'on_plugins_loaded' ) );
|
||||
if ( did_action( 'plugins_loaded' ) ) {
|
||||
self::on_plugins_loaded();
|
||||
} else {
|
||||
add_action( 'plugins_loaded', array( $this, 'on_plugins_loaded' ) );
|
||||
}
|
||||
add_filter( 'action_scheduler_store_class', array( $this, 'replace_actionscheduler_store_class' ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -50,13 +50,30 @@ class Install {
|
|||
* This check is done on all requests and runs if the versions do not match.
|
||||
*/
|
||||
public static function check_version() {
|
||||
if (
|
||||
! defined( 'IFRAME_REQUEST' ) &&
|
||||
version_compare( get_option( self::VERSION_OPTION ), WC_ADMIN_VERSION_NUMBER, '<' )
|
||||
) {
|
||||
if ( defined( 'IFRAME_REQUEST' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$version_option = get_option( self::VERSION_OPTION );
|
||||
$requires_update = version_compare( get_option( self::VERSION_OPTION ), WC_ADMIN_VERSION_NUMBER, '<' );
|
||||
|
||||
/*
|
||||
* When included as part of Core, no `on_activation` hook as been called
|
||||
* so there is no version in options. Make sure install gets called in this
|
||||
* case as well as a regular version update
|
||||
*/
|
||||
if ( ! $version_option || $requires_update ) {
|
||||
self::install();
|
||||
do_action( 'wc_admin_updated' );
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the version option if none is found, as would be the case when
|
||||
* initialized via Core for the first time.
|
||||
*/
|
||||
if ( ! $version_option ) {
|
||||
add_option( self::VERSION_OPTION, WC_ADMIN_VERSION_NUMBER );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
/**
|
||||
* Returns information about the package and handles init.
|
||||
*
|
||||
* @package Automattic/WooCommerce/WCAdmin
|
||||
*/
|
||||
|
||||
namespace Automattic\WooCommerce\Admin;
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
/**
|
||||
* Main package class.
|
||||
*/
|
||||
class Package {
|
||||
|
||||
/**
|
||||
* Version.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '0.22.0';
|
||||
|
||||
/**
|
||||
* Init the package.
|
||||
*
|
||||
* Only initialize for WP 5.2 or greater.
|
||||
*/
|
||||
public static function init() {
|
||||
$wordpress_minimum_met = version_compare( get_bloginfo( 'version' ), '5.2', '>=' );
|
||||
if ( ! $wordpress_minimum_met ) {
|
||||
return;
|
||||
}
|
||||
FeaturePlugin::instance()->init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the version of the package.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get_version() {
|
||||
return self::VERSION;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the path to the package.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get_path() {
|
||||
return dirname( __DIR__ );
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue