Version Description
- 2022-04-21 =
- Fixed composer PSR-4 autoload
- Fixed notice: "Undefined index: method_integration"
Download this release
Release Info
Developer | wpdesk |
Plugin | Flexible Shipping for WooCommerce |
Version | 4.11.6 |
Comparing to | |
See all releases |
Code changes from version 4.11.5 to 4.11.6
- assets/js/admin.min.js +1 -1
- classes/class-flexible-shipping-plugin.php +7 -10
- classes/notices/abstract-rate.php +1 -1
- classes/notices/rate-notice-implementation.php +2 -2
- classes/table-rate/settings/flexible-shipping.php +1 -3
- classes/table-rate/views/ads/html-ads-fs-pro.php +1 -2
- classes/table-rate/views/ads/html-ads-fsie.php +1 -1
- flexible-shipping.php +5 -5
- inc/functions.php +1 -1
- lang/flexible-shipping.pot +36 -36
- readme.txt +18 -14
- src/WPDesk/FS/Info/FSIE.php +1 -1
- src/WPDesk/FS/Info/FSPro.php +1 -1
- src/WPDesk/FS/Info/FSWalkthrough.php +6 -6
- src/WPDesk/FS/Info/FSWalkthroughPL.php +6 -6
- src/WPDesk/FS/Info/WooCommerceABC.php +6 -6
- src/WPDesk/FS/Info/WooCommerceABCPL.php +5 -5
- src/WPDesk/FS/Onboarding/TableRate/PopupData.php +2 -2
- src/WPDesk/FS/TableRate/ContextualInfo/Creator.php +9 -9
- src/WPDesk/FS/TableRate/Rule/PreconfiguredScenarios/PreconfiguredScenariosFactory.php +2 -2
- src/WPDesk/FS/TableRate/RulesSettingsField.php +2 -2
- src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php +2 -2
- src/WPDesk/FS/TableRate/ShippingMethod/Convert/ConvertNotice.php +1 -1
- src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php +2 -2
- src/WPDesk/FS/TableRate/ShippingMethodSingle.php +1 -2
- src/WPDesk/FS/TableRate/views/shipping-method-settings-rules.php +2 -3
- src/WPDesk/FS/Tracker/TrackerNotices.php +2 -2
- vendor/composer/autoload_classmap.php +0 -20
- vendor/composer/autoload_psr4.php +1 -1
- vendor/composer/autoload_static.php +8 -25
- vendor_prefixed/wpdesk/wp-code-sniffer/composer.json +0 -42
- vendor_prefixed/wpdesk/wp-codeception/composer.json +0 -61
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Codeception/Command/AcceptanceTestGenerator.php +0 -63
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Codeception/Command/GeneratePluginActivation.php +0 -70
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Codeception/Command/GenerateWooCommerce.php +0 -70
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Codeception/Command/WooCommerceTestGenerator.php +0 -25
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/CommandProvider.php +0 -23
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/BaseCommand.php +0 -22
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/Configuration.php +0 -360
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/CreateCodeceptionTests.php +0 -116
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/LocalCodeceptionTrait.php +0 -256
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareCodeceptionDb.php +0 -43
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareLocalCodeceptionTests.php +0 -52
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareLocalCodeceptionTestsWithCoverage.php +0 -41
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareParallelCodeceptionTests.php +0 -57
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareWordpressForCodeception.php +0 -66
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/RunCodeceptionTests.php +0 -59
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/RunLocalCodeceptionTests.php +0 -45
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/RunLocalCodeceptionTestsWithCoverage.php +0 -45
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/SedTrait.php +0 -35
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/SettingsException.php +0 -14
- vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Plugin.php +0 -49
- vendor_prefixed/wpdesk/wp-logs/src/SimpleLoggerFactory.php +1 -1
- vendor_prefixed/wpdesk/wp-wpdesk-license/src/ActivationForm/FormContentRenderer.php +14 -0
assets/js/admin.min.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
function fs_removeParam(key,sourceURL){var rtn=sourceURL.split("?")[0],param,params_arr=[],queryString=(sourceURL.indexOf("?")!==-1)?sourceURL.split("?")[1]:"";if(queryString!==""){params_arr=queryString.split("&");for(var i=params_arr.length-1;i>=0;i-=1){param=params_arr[i].split("=")[0];if(param===key){params_arr.splice(i,1)}}
|
2 |
-
rtn=rtn+"?"+params_arr.join("&")}
|
3 |
return rtn}
|
4 |
function fs_trimChar(string,charToRemove){while(string.charAt(0)==charToRemove){string=string.substring(1)}
|
5 |
while(string.charAt(string.length-1)==charToRemove){string=string.substring(0,string.length-1)}
|
1 |
function fs_removeParam(key,sourceURL){var rtn=sourceURL.split("?")[0],param,params_arr=[],queryString=(sourceURL.indexOf("?")!==-1)?sourceURL.split("?")[1]:"";if(queryString!==""){params_arr=queryString.split("&");for(var i=params_arr.length-1;i>=0;i-=1){param=params_arr[i].split("=")[0];if(param===key){params_arr.splice(i,1)}}
|
2 |
+
rtn=rtn+"?"+params_arr.join("&");}
|
3 |
return rtn}
|
4 |
function fs_trimChar(string,charToRemove){while(string.charAt(0)==charToRemove){string=string.substring(1)}
|
5 |
while(string.charAt(string.length-1)==charToRemove){string=string.substring(0,string.length-1)}
|
classes/class-flexible-shipping-plugin.php
CHANGED
@@ -326,7 +326,7 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
|
|
326 |
$nps->set_disclaimer(
|
327 |
sprintf(
|
328 |
__( 'By using the \'Send feedback\' button I hereby agree and consent to the terms of %1$sPrivacy Policy%2$s.', 'flexible-shipping' ),
|
329 |
-
'<a target="_blank" href="https://
|
330 |
'</a>'
|
331 |
)
|
332 |
);
|
@@ -392,7 +392,7 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
|
|
392 |
$this->default_settings_tab = 'main';
|
393 |
|
394 |
$this->settings_url = admin_url( 'admin.php?page=flexible-shipping-settings' );
|
395 |
-
$this->docs_url = get_locale() === 'pl_PL' ? 'https://
|
396 |
|
397 |
$this->default_view_args = [
|
398 |
'plugin_url' => $this->get_plugin_url(),
|
@@ -774,7 +774,7 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
|
|
774 |
$this->scripts_version
|
775 |
);
|
776 |
|
777 |
-
$notice_url = get_locale() == 'pl_PL' ? 'https://
|
778 |
wp_localize_script(
|
779 |
'fs_admin',
|
780 |
'fs_admin',
|
@@ -855,10 +855,8 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
|
|
855 |
* @return array
|
856 |
*/
|
857 |
public function links_filter( $links ) {
|
858 |
-
$docs_link = get_locale() === 'pl_PL' ? 'https://
|
859 |
-
$support_link = get_locale() === 'pl_PL' ? 'https://
|
860 |
-
|
861 |
-
$docs_link .= '?utm_source=fs&utm_medium=link&utm_campaign=plugin-list-docs';
|
862 |
|
863 |
$settings_url = admin_url( 'admin.php?page=wc-settings&tab=shipping§ion=' . WPDesk_Flexible_Shipping_Settings::METHOD_ID );
|
864 |
|
@@ -870,11 +868,10 @@ class Flexible_Shipping_Plugin extends AbstractPlugin implements HookableCollect
|
|
870 |
'<a target="_blank" href="' . $docs_link . '">' . __( 'Docs', 'flexible-shipping' ) . '</a>',
|
871 |
'<a target="_blank" href="' . $support_link . '">' . __( 'Support', 'flexible-shipping' ) . '</a>',
|
872 |
];
|
873 |
-
$pro_link = get_locale() === 'pl_PL' ? 'https://
|
874 |
-
$utm = get_locale() === 'pl_PL' ? '?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=&utm_content=fs-plugins-upgrade' : '?utm_source=fs&utm_medium=quick-link&utm_campaign=upgrade-quick-link';
|
875 |
|
876 |
if ( ! wpdesk_is_plugin_active( 'flexible-shipping-pro/flexible-shipping-pro.php' ) ) {
|
877 |
-
$plugin_links[] = '<a href="' . $pro_link .
|
878 |
'Upgrade',
|
879 |
'flexible-shipping'
|
880 |
) . '</a>';
|
326 |
$nps->set_disclaimer(
|
327 |
sprintf(
|
328 |
__( 'By using the \'Send feedback\' button I hereby agree and consent to the terms of %1$sPrivacy Policy%2$s.', 'flexible-shipping' ),
|
329 |
+
'<a target="_blank" href="https://octolize.com/terms-of-service/privacy-policy/">',
|
330 |
'</a>'
|
331 |
)
|
332 |
);
|
392 |
$this->default_settings_tab = 'main';
|
393 |
|
394 |
$this->settings_url = admin_url( 'admin.php?page=flexible-shipping-settings' );
|
395 |
+
$this->docs_url = get_locale() === 'pl_PL' ? 'https://octol.io/fs-docs-pl' : 'https://octol.io/fs-docs';
|
396 |
|
397 |
$this->default_view_args = [
|
398 |
'plugin_url' => $this->get_plugin_url(),
|
774 |
$this->scripts_version
|
775 |
);
|
776 |
|
777 |
+
$notice_url = get_locale() == 'pl_PL' ? 'https://octol.io/fs-rate-not-good-pl' : 'https://octol.io/fs-rate-not-good';
|
778 |
wp_localize_script(
|
779 |
'fs_admin',
|
780 |
'fs_admin',
|
855 |
* @return array
|
856 |
*/
|
857 |
public function links_filter( $links ) {
|
858 |
+
$docs_link = get_locale() === 'pl_PL' ? 'https://octol.io/fs-docs-pl' : 'https://octol.io/fs-docs';
|
859 |
+
$support_link = get_locale() === 'pl_PL' ? 'https://octol.io/fs-support-pl' : 'https://octol.io/fs-support';
|
|
|
|
|
860 |
|
861 |
$settings_url = admin_url( 'admin.php?page=wc-settings&tab=shipping§ion=' . WPDesk_Flexible_Shipping_Settings::METHOD_ID );
|
862 |
|
868 |
'<a target="_blank" href="' . $docs_link . '">' . __( 'Docs', 'flexible-shipping' ) . '</a>',
|
869 |
'<a target="_blank" href="' . $support_link . '">' . __( 'Support', 'flexible-shipping' ) . '</a>',
|
870 |
];
|
871 |
+
$pro_link = get_locale() === 'pl_PL' ? 'https://octol.io/fs-upgrade-pl' : 'https://octol.io/fs-upgrade';
|
|
|
872 |
|
873 |
if ( ! wpdesk_is_plugin_active( 'flexible-shipping-pro/flexible-shipping-pro.php' ) ) {
|
874 |
+
$plugin_links[] = '<a href="' . $pro_link . '" target="_blank" style="color:#d64e07;font-weight:bold;">' . __(
|
875 |
'Upgrade',
|
876 |
'flexible-shipping'
|
877 |
) . '</a>';
|
classes/notices/abstract-rate.php
CHANGED
@@ -23,7 +23,7 @@ abstract class RateNotice implements RateNoticeInterface {
|
|
23 |
protected function action_links() {
|
24 |
$actions[] = sprintf(
|
25 |
__( '%1$sOk, you deserved it%2$s', 'flexible-shipping' ),
|
26 |
-
'<a target="_blank" href="' . esc_url( 'https://
|
27 |
'</a>'
|
28 |
);
|
29 |
$actions[] = sprintf(
|
23 |
protected function action_links() {
|
24 |
$actions[] = sprintf(
|
25 |
__( '%1$sOk, you deserved it%2$s', 'flexible-shipping' ),
|
26 |
+
'<a target="_blank" href="' . esc_url( 'https://octol.io/fs-rate' ) . '">',
|
27 |
'</a>'
|
28 |
);
|
29 |
$actions[] = sprintf(
|
classes/notices/rate-notice-implementation.php
CHANGED
@@ -13,7 +13,7 @@ class RateNoticeImplementation extends RateNotice
|
|
13 |
protected function action_links() {
|
14 |
$actions[] = sprintf(
|
15 |
__( '%1$sOk, you deserved it%2$s', 'flexible-shipping' ),
|
16 |
-
'<a target="_blank" href="' . esc_url( 'https://
|
17 |
'</a>'
|
18 |
);
|
19 |
$actions[] = sprintf(
|
@@ -54,7 +54,7 @@ class RateNoticeImplementation extends RateNotice
|
|
54 |
* @return string
|
55 |
*/
|
56 |
protected function get_message() {
|
57 |
-
$message = __( 'Awesome, you\'ve been using Flexible Shipping for more than 2 weeks. Could you please do me a BIG favor and give it a 5-star rating on WordPress? ~
|
58 |
$message .= '<br/>';
|
59 |
$message .= implode( ' | ', $this->action_links() );
|
60 |
return $message;
|
13 |
protected function action_links() {
|
14 |
$actions[] = sprintf(
|
15 |
__( '%1$sOk, you deserved it%2$s', 'flexible-shipping' ),
|
16 |
+
'<a target="_blank" href="' . esc_url( 'https://octol.io/fs-rate' ) . '">',
|
17 |
'</a>'
|
18 |
);
|
19 |
$actions[] = sprintf(
|
54 |
* @return string
|
55 |
*/
|
56 |
protected function get_message() {
|
57 |
+
$message = __( 'Awesome, you\'ve been using Flexible Shipping for more than 2 weeks. Could you please do me a BIG favor and give it a 5-star rating on WordPress? ~Octolize Team', 'flexible-shipping' );
|
58 |
$message .= '<br/>';
|
59 |
$message .= implode( ' | ', $this->action_links() );
|
60 |
return $message;
|
classes/table-rate/settings/flexible-shipping.php
CHANGED
@@ -9,9 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
exit;
|
10 |
}
|
11 |
|
12 |
-
$docs_link = get_locale() === 'pl_PL' ? 'https://
|
13 |
-
|
14 |
-
$docs_link .= '?utm_source=flexible-shipping-settings&utm_medium=link&utm_campaign=flexible-shipping-docs-link';
|
15 |
|
16 |
$settings = array(
|
17 |
array(
|
9 |
exit;
|
10 |
}
|
11 |
|
12 |
+
$docs_link = get_locale() === 'pl_PL' ? 'https://octol.io/fs-docs-pl' : 'https://octol.io/fs-docs';
|
|
|
|
|
13 |
|
14 |
$settings = array(
|
15 |
array(
|
classes/table-rate/views/ads/html-ads-fs-pro.php
CHANGED
@@ -12,8 +12,7 @@
|
|
12 |
<div class="wpdesk-stuffbox">
|
13 |
<h3 class="title"><?php esc_html_e( 'Get Flexible Shipping PRO!', 'flexible-shipping' ); ?></h3>
|
14 |
<?php
|
15 |
-
$fs_link = get_locale() === 'pl_PL' ? 'https://
|
16 |
-
$utm = get_locale() === 'pl_PL' ? '?utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=button&utm_term=upgrade-now&utm_content=fs-shippingzone-upgradenow' : '?utm_source=fs-settings&utm_medium=link&utm_campaign=settings-upgrade-link';
|
17 |
?>
|
18 |
|
19 |
<div class="inside">
|
12 |
<div class="wpdesk-stuffbox">
|
13 |
<h3 class="title"><?php esc_html_e( 'Get Flexible Shipping PRO!', 'flexible-shipping' ); ?></h3>
|
14 |
<?php
|
15 |
+
$fs_link = get_locale() === 'pl_PL' ? 'https://octol.io/fs-box-upgrade-pl' : 'https://octol.io/fs-box-upgrade';
|
|
|
16 |
?>
|
17 |
|
18 |
<div class="inside">
|
classes/table-rate/views/ads/html-ads-fsie.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @var string $shipping_method_id .
|
6 |
*/
|
7 |
|
8 |
-
$fsie_link = get_locale() === 'pl_PL' ? 'https://
|
9 |
?>
|
10 |
|
11 |
<div class="fs-flexible-shipping-sidebar fs-flexible-shipping-sidebar-fsie <?php echo esc_attr( isset( $shipping_method_id ) ? $shipping_method_id : '' ); ?>"
|
5 |
* @var string $shipping_method_id .
|
6 |
*/
|
7 |
|
8 |
+
$fsie_link = get_locale() === 'pl_PL' ? 'https://octol.io/fsie-box-fs-pl' : 'https://octol.io/fsie-box-fs';
|
9 |
?>
|
10 |
|
11 |
<div class="fs-flexible-shipping-sidebar fs-flexible-shipping-sidebar-fsie <?php echo esc_attr( isset( $shipping_method_id ) ? $shipping_method_id : '' ); ?>"
|
flexible-shipping.php
CHANGED
@@ -3,15 +3,15 @@
|
|
3 |
* Plugin Name: Flexible Shipping
|
4 |
* Plugin URI: https://wordpress.org/plugins/flexible-shipping/
|
5 |
* Description: Create additional shipment methods in WooCommerce and enable pricing based on cart weight or total.
|
6 |
-
* Version: 4.11.
|
7 |
* Author: WP Desk
|
8 |
-
* Author URI: https://
|
9 |
* Text Domain: flexible-shipping
|
10 |
* Domain Path: /lang/
|
11 |
* Requires at least: 5.2
|
12 |
* Tested up to: 5.9
|
13 |
-
* WC requires at least: 6.
|
14 |
-
* WC tested up to: 6.
|
15 |
* Requires PHP: 7.0
|
16 |
*
|
17 |
* Copyright 2017 WP Desk Ltd.
|
@@ -38,7 +38,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
38 |
} // Exit if accessed directly
|
39 |
|
40 |
/* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
|
41 |
-
$plugin_version = '4.11.
|
42 |
|
43 |
$plugin_name = 'Flexible Shipping';
|
44 |
$product_id = 'Flexible Shipping';
|
3 |
* Plugin Name: Flexible Shipping
|
4 |
* Plugin URI: https://wordpress.org/plugins/flexible-shipping/
|
5 |
* Description: Create additional shipment methods in WooCommerce and enable pricing based on cart weight or total.
|
6 |
+
* Version: 4.11.6
|
7 |
* Author: WP Desk
|
8 |
+
* Author URI: https://octol.io/fs-author
|
9 |
* Text Domain: flexible-shipping
|
10 |
* Domain Path: /lang/
|
11 |
* Requires at least: 5.2
|
12 |
* Tested up to: 5.9
|
13 |
+
* WC requires at least: 6.1
|
14 |
+
* WC tested up to: 6.5
|
15 |
* Requires PHP: 7.0
|
16 |
*
|
17 |
* Copyright 2017 WP Desk Ltd.
|
38 |
} // Exit if accessed directly
|
39 |
|
40 |
/* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
|
41 |
+
$plugin_version = '4.11.6';
|
42 |
|
43 |
$plugin_name = 'Flexible Shipping';
|
44 |
$product_id = 'Flexible Shipping';
|
inc/functions.php
CHANGED
@@ -21,7 +21,7 @@ function flexible_shipping_method_selected_in_cart( $shipping_method_integration
|
|
21 |
foreach ( $chosen_shipping_methods as $id => $shipping ) {
|
22 |
if ( isset( $flexible_shipping_rates[ $shipping ] ) ) {
|
23 |
$shipping_method = $flexible_shipping_rates[ $shipping ];
|
24 |
-
if ( $shipping_method['method_integration'] === $shipping_method_integration ) {
|
25 |
return $shipping_method;
|
26 |
}
|
27 |
}
|
21 |
foreach ( $chosen_shipping_methods as $id => $shipping ) {
|
22 |
if ( isset( $flexible_shipping_rates[ $shipping ] ) ) {
|
23 |
$shipping_method = $flexible_shipping_rates[ $shipping ];
|
24 |
+
if ( isset( $shipping_method['method_integration'] ) && $shipping_method['method_integration'] === $shipping_method_integration ) {
|
25 |
return $shipping_method;
|
26 |
}
|
27 |
}
|
lang/flexible-shipping.pot
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
# This file is distributed under the same license as the Flexible Shipping plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Flexible Shipping 4.11.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/flexible-shipping\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2022-04-
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
"X-Domain: flexible-shipping\n"
|
@@ -18,8 +18,8 @@ msgstr ""
|
|
18 |
#: classes/table-rate/multilingual.php:46
|
19 |
#: classes/table-rate/multilingual.php:49
|
20 |
#: classes/table-rate/multilingual.php:52
|
21 |
-
#: classes/table-rate/settings/flexible-shipping.php:
|
22 |
-
#: classes/table-rate/settings/flexible-shipping.php:
|
23 |
#: classes/table-rate/shipping-method.php:95
|
24 |
#: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:154
|
25 |
#: src/WPDesk/FS/TableRate/ShippingMethod/Duplicate/DuplicateAction.php:76
|
@@ -41,7 +41,7 @@ msgid "WP Desk"
|
|
41 |
msgstr ""
|
42 |
|
43 |
#. Author URI of the plugin
|
44 |
-
msgid "https://
|
45 |
msgstr ""
|
46 |
|
47 |
#: classes/class-flexible-shipping-plugin.php:323
|
@@ -102,19 +102,19 @@ msgstr ""
|
|
102 |
msgid "How can We make Flexible Shipping better for you? %1$sJust write to us.%2$s"
|
103 |
msgstr ""
|
104 |
|
105 |
-
#: classes/class-flexible-shipping-plugin.php:
|
106 |
msgid "Settings"
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: classes/class-flexible-shipping-plugin.php:
|
110 |
msgid "Docs"
|
111 |
msgstr ""
|
112 |
|
113 |
-
#: classes/class-flexible-shipping-plugin.php:
|
114 |
msgid "Support"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: classes/class-flexible-shipping-plugin.php:
|
118 |
msgid "Upgrade"
|
119 |
msgstr ""
|
120 |
|
@@ -146,7 +146,7 @@ msgid "Flexible Shipping requires at least version 1.1 of Orlen Paczka plugin."
|
|
146 |
msgstr ""
|
147 |
|
148 |
#: classes/notices/rate-notice-implementation.php:57
|
149 |
-
msgid "Awesome, you've been using Flexible Shipping for more than 2 weeks. Could you please do me a BIG favor and give it a 5-star rating on WordPress? ~
|
150 |
msgstr ""
|
151 |
|
152 |
#: classes/table-rate/bulk-actions.php:78
|
@@ -277,51 +277,51 @@ msgid "%1$sDownload debug.log file%2$s"
|
|
277 |
msgstr ""
|
278 |
|
279 |
#. Translators: link.
|
280 |
-
#: classes/table-rate/settings/flexible-shipping.php:
|
281 |
msgid "See how to %1$sconfigure Flexible Shipping%2$s."
|
282 |
msgstr ""
|
283 |
|
284 |
-
#: classes/table-rate/settings/flexible-shipping.php:
|
285 |
#: classes/table-rate/shipping-method.php:86
|
286 |
#: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:53
|
287 |
msgid "Enable/Disable"
|
288 |
msgstr ""
|
289 |
|
290 |
-
#: classes/table-rate/settings/flexible-shipping.php:
|
291 |
msgid "Enable Flexible Shipping"
|
292 |
msgstr ""
|
293 |
|
294 |
-
#: classes/table-rate/settings/flexible-shipping.php:
|
295 |
msgid "Shipping title"
|
296 |
msgstr ""
|
297 |
|
298 |
-
#: classes/table-rate/settings/flexible-shipping.php:
|
299 |
msgid "Visible only to admin in WooCommerce settings."
|
300 |
msgstr ""
|
301 |
|
302 |
-
#: classes/table-rate/settings/flexible-shipping.php:
|
303 |
#: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:55
|
304 |
msgid "Tax Status"
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: classes/table-rate/settings/flexible-shipping.php:
|
308 |
#: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:62
|
309 |
msgid "If you select to apply the tax, the plugin will use the tax rates defined in the WooCommerce settings at <strong>WooCommerce → Settings → Tax</strong>."
|
310 |
msgstr ""
|
311 |
|
312 |
-
#: classes/table-rate/settings/flexible-shipping.php:
|
313 |
#: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:59
|
314 |
msgid "Taxable"
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: classes/table-rate/settings/flexible-shipping.php:
|
318 |
#: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:60
|
319 |
msgctxt "Tax status"
|
320 |
msgid "None"
|
321 |
msgstr ""
|
322 |
|
323 |
-
#: classes/table-rate/settings/flexible-shipping.php:
|
324 |
-
#: classes/table-rate/settings/flexible-shipping.php:
|
325 |
#: src/WPDesk/FS/Info/WooCommerceABC.php:41
|
326 |
msgid "Shipping Methods"
|
327 |
msgstr ""
|
@@ -382,7 +382,7 @@ msgid "Shipping method %s updated."
|
|
382 |
msgstr ""
|
383 |
|
384 |
#: classes/table-rate/shipping-method.php:562
|
385 |
-
#: src/WPDesk/FS/TableRate/ShippingMethodSingle.php:
|
386 |
msgid "Shipping cost added."
|
387 |
msgstr ""
|
388 |
|
@@ -391,27 +391,27 @@ msgstr ""
|
|
391 |
msgid "Get Flexible Shipping PRO!"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: classes/table-rate/views/ads/html-ads-fs-pro.php:
|
395 |
#: src/WPDesk/FS/Info/views/fs-pro.php:9
|
396 |
msgid "Shipping Classes support"
|
397 |
msgstr ""
|
398 |
|
399 |
-
#: classes/table-rate/views/ads/html-ads-fs-pro.php:
|
400 |
#: src/WPDesk/FS/Info/views/fs-pro.php:13
|
401 |
msgid "Product count based costs"
|
402 |
msgstr ""
|
403 |
|
404 |
-
#: classes/table-rate/views/ads/html-ads-fs-pro.php:
|
405 |
#: src/WPDesk/FS/Info/views/fs-pro.php:17
|
406 |
msgid "Stopping, Cancelling a rule"
|
407 |
msgstr ""
|
408 |
|
409 |
-
#: classes/table-rate/views/ads/html-ads-fs-pro.php:
|
410 |
#: src/WPDesk/FS/Info/views/fs-pro.php:21
|
411 |
msgid "Additional calculation methods"
|
412 |
msgstr ""
|
413 |
|
414 |
-
#: classes/table-rate/views/ads/html-ads-fs-pro.php:
|
415 |
#: src/WPDesk/FS/Info/FSPro.php:40
|
416 |
msgid "Upgrade now to PRO version →"
|
417 |
msgstr ""
|
@@ -863,12 +863,12 @@ msgstr ""
|
|
863 |
|
864 |
#. Translators: open and close strong tag.
|
865 |
#: src/WPDesk/FS/Onboarding/TableRate/PopupData.php:226
|
866 |
-
msgid "https://
|
867 |
msgstr ""
|
868 |
|
869 |
#. Translators: open and close strong tag.
|
870 |
#: src/WPDesk/FS/Onboarding/TableRate/PopupData.php:232
|
871 |
-
msgid "https://
|
872 |
msgstr ""
|
873 |
|
874 |
#: src/WPDesk/FS/Onboarding/TableRate/PopupData.php:244
|
@@ -1459,7 +1459,7 @@ msgid "A single Flexible Shipping method."
|
|
1459 |
msgstr ""
|
1460 |
|
1461 |
#. Translators: docs link.
|
1462 |
-
#: src/WPDesk/FS/TableRate/ShippingMethodSingle.php:
|
1463 |
msgid "A single Flexible Shipping method. Learn %1$show to configure FS shipping method →%2$s"
|
1464 |
msgstr ""
|
1465 |
|
@@ -1477,24 +1477,24 @@ msgid "Need more? Check %1$sFlexible Shipping PRO%2$s to unleash its full potent
|
|
1477 |
msgstr ""
|
1478 |
|
1479 |
#. Translators: open tag, close tag.
|
1480 |
-
#: src/WPDesk/FS/TableRate/views/shipping-method-settings-rules.php:
|
1481 |
msgid "Want to find out how the table rate works? Hop on board and %1$slet us guide you through the whole setup →%2$s"
|
1482 |
msgstr ""
|
1483 |
|
1484 |
-
#: src/WPDesk/FS/TableRate/views/shipping-method-settings-rules.php:
|
1485 |
msgid "Please mind that the ranges you define must not overlap each other and make sure there are no gaps between them."
|
1486 |
msgstr ""
|
1487 |
|
1488 |
#. Translators: open tag, close tag.
|
1489 |
-
#: src/WPDesk/FS/TableRate/views/shipping-method-settings-rules.php:
|
1490 |
msgid "%1$sExample%2$s: If your rules are based on %1$sprice%2$s and the first range covers $0-$100, the next one should start from %1$s$100.01%2$s, not from %1$s$101%2$s, etc."
|
1491 |
msgstr ""
|
1492 |
|
1493 |
-
#: src/WPDesk/FS/TableRate/views/shipping-method-settings-rules.php:
|
1494 |
msgid "Missing rules table - settings cannot be saved!"
|
1495 |
msgstr ""
|
1496 |
|
1497 |
-
#: src/WPDesk/FS/TableRate/views/shipping-method-settings-rules.php:
|
1498 |
msgid "This is where the rules table should be displayed. If it's not, it is usually caused by the conflict with the other plugins you are currently using, JavaScript error or the caching issue. Clear your browser's cache or deactivate the plugins which may be interfering."
|
1499 |
msgstr ""
|
1500 |
|
@@ -1513,7 +1513,7 @@ msgid "Learn more »"
|
|
1513 |
msgstr ""
|
1514 |
|
1515 |
#: src/WPDesk/FS/Tracker/TrackerNotices.php:56
|
1516 |
-
msgid "Thank you in advance!%1$s~
|
1517 |
msgstr ""
|
1518 |
|
1519 |
#: templates/email/after_order_table.php:12
|
2 |
# This file is distributed under the same license as the Flexible Shipping plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Flexible Shipping 4.11.6\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/flexible-shipping\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2022-04-21T16:09:34+00:00\n"
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
"X-Domain: flexible-shipping\n"
|
18 |
#: classes/table-rate/multilingual.php:46
|
19 |
#: classes/table-rate/multilingual.php:49
|
20 |
#: classes/table-rate/multilingual.php:52
|
21 |
+
#: classes/table-rate/settings/flexible-shipping.php:16
|
22 |
+
#: classes/table-rate/settings/flexible-shipping.php:31
|
23 |
#: classes/table-rate/shipping-method.php:95
|
24 |
#: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:154
|
25 |
#: src/WPDesk/FS/TableRate/ShippingMethod/Duplicate/DuplicateAction.php:76
|
41 |
msgstr ""
|
42 |
|
43 |
#. Author URI of the plugin
|
44 |
+
msgid "https://octol.io/fs-author"
|
45 |
msgstr ""
|
46 |
|
47 |
#: classes/class-flexible-shipping-plugin.php:323
|
102 |
msgid "How can We make Flexible Shipping better for you? %1$sJust write to us.%2$s"
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: classes/class-flexible-shipping-plugin.php:864
|
106 |
msgid "Settings"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: classes/class-flexible-shipping-plugin.php:868
|
110 |
msgid "Docs"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: classes/class-flexible-shipping-plugin.php:869
|
114 |
msgid "Support"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: classes/class-flexible-shipping-plugin.php:874
|
118 |
msgid "Upgrade"
|
119 |
msgstr ""
|
120 |
|
146 |
msgstr ""
|
147 |
|
148 |
#: classes/notices/rate-notice-implementation.php:57
|
149 |
+
msgid "Awesome, you've been using Flexible Shipping for more than 2 weeks. Could you please do me a BIG favor and give it a 5-star rating on WordPress? ~Octolize Team"
|
150 |
msgstr ""
|
151 |
|
152 |
#: classes/table-rate/bulk-actions.php:78
|
277 |
msgstr ""
|
278 |
|
279 |
#. Translators: link.
|
280 |
+
#: classes/table-rate/settings/flexible-shipping.php:19
|
281 |
msgid "See how to %1$sconfigure Flexible Shipping%2$s."
|
282 |
msgstr ""
|
283 |
|
284 |
+
#: classes/table-rate/settings/flexible-shipping.php:22
|
285 |
#: classes/table-rate/shipping-method.php:86
|
286 |
#: src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php:53
|
287 |
msgid "Enable/Disable"
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: classes/table-rate/settings/flexible-shipping.php:24
|
291 |
msgid "Enable Flexible Shipping"
|
292 |
msgstr ""
|
293 |
|
294 |
+
#: classes/table-rate/settings/flexible-shipping.php:28
|
295 |
msgid "Shipping title"
|
296 |
msgstr ""
|
297 |
|
298 |
+
#: classes/table-rate/settings/flexible-shipping.php:30
|
299 |
msgid "Visible only to admin in WooCommerce settings."
|
300 |
msgstr ""
|
301 |
|
302 |
+
#: classes/table-rate/settings/flexible-shipping.php:35
|
303 |
#: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:55
|
304 |
msgid "Tax Status"
|
305 |
msgstr ""
|
306 |
|
307 |
+
#: classes/table-rate/settings/flexible-shipping.php:38
|
308 |
#: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:62
|
309 |
msgid "If you select to apply the tax, the plugin will use the tax rates defined in the WooCommerce settings at <strong>WooCommerce → Settings → Tax</strong>."
|
310 |
msgstr ""
|
311 |
|
312 |
+
#: classes/table-rate/settings/flexible-shipping.php:40
|
313 |
#: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:59
|
314 |
msgid "Taxable"
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: classes/table-rate/settings/flexible-shipping.php:41
|
318 |
#: src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php:60
|
319 |
msgctxt "Tax status"
|
320 |
msgid "None"
|
321 |
msgstr ""
|
322 |
|
323 |
+
#: classes/table-rate/settings/flexible-shipping.php:45
|
324 |
+
#: classes/table-rate/settings/flexible-shipping.php:50
|
325 |
#: src/WPDesk/FS/Info/WooCommerceABC.php:41
|
326 |
msgid "Shipping Methods"
|
327 |
msgstr ""
|
382 |
msgstr ""
|
383 |
|
384 |
#: classes/table-rate/shipping-method.php:562
|
385 |
+
#: src/WPDesk/FS/TableRate/ShippingMethodSingle.php:277
|
386 |
msgid "Shipping cost added."
|
387 |
msgstr ""
|
388 |
|
391 |
msgid "Get Flexible Shipping PRO!"
|
392 |
msgstr ""
|
393 |
|
394 |
+
#: classes/table-rate/views/ads/html-ads-fs-pro.php:22
|
395 |
#: src/WPDesk/FS/Info/views/fs-pro.php:9
|
396 |
msgid "Shipping Classes support"
|
397 |
msgstr ""
|
398 |
|
399 |
+
#: classes/table-rate/views/ads/html-ads-fs-pro.php:25
|
400 |
#: src/WPDesk/FS/Info/views/fs-pro.php:13
|
401 |
msgid "Product count based costs"
|
402 |
msgstr ""
|
403 |
|
404 |
+
#: classes/table-rate/views/ads/html-ads-fs-pro.php:28
|
405 |
#: src/WPDesk/FS/Info/views/fs-pro.php:17
|
406 |
msgid "Stopping, Cancelling a rule"
|
407 |
msgstr ""
|
408 |
|
409 |
+
#: classes/table-rate/views/ads/html-ads-fs-pro.php:31
|
410 |
#: src/WPDesk/FS/Info/views/fs-pro.php:21
|
411 |
msgid "Additional calculation methods"
|
412 |
msgstr ""
|
413 |
|
414 |
+
#: classes/table-rate/views/ads/html-ads-fs-pro.php:36
|
415 |
#: src/WPDesk/FS/Info/FSPro.php:40
|
416 |
msgid "Upgrade now to PRO version →"
|
417 |
msgstr ""
|
863 |
|
864 |
#. Translators: open and close strong tag.
|
865 |
#: src/WPDesk/FS/Onboarding/TableRate/PopupData.php:226
|
866 |
+
msgid "https://octol.io/onboarding-sc"
|
867 |
msgstr ""
|
868 |
|
869 |
#. Translators: open and close strong tag.
|
870 |
#: src/WPDesk/FS/Onboarding/TableRate/PopupData.php:232
|
871 |
+
msgid "https://octol.io/onboarding-docs"
|
872 |
msgstr ""
|
873 |
|
874 |
#: src/WPDesk/FS/Onboarding/TableRate/PopupData.php:244
|
1459 |
msgstr ""
|
1460 |
|
1461 |
#. Translators: docs link.
|
1462 |
+
#: src/WPDesk/FS/TableRate/ShippingMethodSingle.php:68
|
1463 |
msgid "A single Flexible Shipping method. Learn %1$show to configure FS shipping method →%2$s"
|
1464 |
msgstr ""
|
1465 |
|
1477 |
msgstr ""
|
1478 |
|
1479 |
#. Translators: open tag, close tag.
|
1480 |
+
#: src/WPDesk/FS/TableRate/views/shipping-method-settings-rules.php:66
|
1481 |
msgid "Want to find out how the table rate works? Hop on board and %1$slet us guide you through the whole setup →%2$s"
|
1482 |
msgstr ""
|
1483 |
|
1484 |
+
#: src/WPDesk/FS/TableRate/views/shipping-method-settings-rules.php:75
|
1485 |
msgid "Please mind that the ranges you define must not overlap each other and make sure there are no gaps between them."
|
1486 |
msgstr ""
|
1487 |
|
1488 |
#. Translators: open tag, close tag.
|
1489 |
+
#: src/WPDesk/FS/TableRate/views/shipping-method-settings-rules.php:81
|
1490 |
msgid "%1$sExample%2$s: If your rules are based on %1$sprice%2$s and the first range covers $0-$100, the next one should start from %1$s$100.01%2$s, not from %1$s$101%2$s, etc."
|
1491 |
msgstr ""
|
1492 |
|
1493 |
+
#: src/WPDesk/FS/TableRate/views/shipping-method-settings-rules.php:97
|
1494 |
msgid "Missing rules table - settings cannot be saved!"
|
1495 |
msgstr ""
|
1496 |
|
1497 |
+
#: src/WPDesk/FS/TableRate/views/shipping-method-settings-rules.php:106
|
1498 |
msgid "This is where the rules table should be displayed. If it's not, it is usually caused by the conflict with the other plugins you are currently using, JavaScript error or the caching issue. Clear your browser's cache or deactivate the plugins which may be interfering."
|
1499 |
msgstr ""
|
1500 |
|
1513 |
msgstr ""
|
1514 |
|
1515 |
#: src/WPDesk/FS/Tracker/TrackerNotices.php:56
|
1516 |
+
msgid "Thank you in advance!%1$s~ Octolize Team"
|
1517 |
msgstr ""
|
1518 |
|
1519 |
#: templates/email/after_order_table.php:12
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Table Rate Shipping Method for WooCommerce by Flexible Shipping ===
|
2 |
Contributors: wpdesk,dyszczo,grola,piotrpo,marcinkolanko,mateuszgbiorczyk,sebastianpisula,bartj
|
3 |
-
Donate link: https://
|
4 |
Tags: table rate, table rate shipping, conditional shipping, free shipping, woocommerce shipping, flexible shipping, woocommerce table rate shipping, cart based shipping, weight shipping, weight based shipping, totals based shipping, order based shipping, shipping zones, shipping classes, shipping, free shipping, advanced shipping
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 5.9
|
7 |
-
Stable tag: 4.11.
|
8 |
Requires PHP: 7.0
|
9 |
License: GPLv3 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -20,7 +20,7 @@ Flexible Shipping is the most advanced shipping plugin for WooCommerce stores al
|
|
20 |
[youtube https://www.youtube.com/watch?v=C7dQ2jQ-iVc]
|
21 |
|
22 |
> **Upgrade to Flexible Shipping PRO**<br />
|
23 |
-
> Upgrade to [Flexible Shipping PRO now](https://
|
24 |
|
25 |
= Possible Shipping Scenarios =
|
26 |
|
@@ -33,7 +33,7 @@ Flexible Shipping is the most advanced shipping plugin for WooCommerce stores al
|
|
33 |
* Add a cost per whole order and per each one product in the cart (PRO)
|
34 |
* Enable/disable shipping method based on the Time of the Day and Day of the week (PRO)
|
35 |
|
36 |
-
These are only a few examples of the Flexible Shipping usage, however, its possibilities are almost endless and sky is the limit ;) We have described some of them in our docs and [Ready to use scenarios](https://
|
37 |
|
38 |
= Features =
|
39 |
|
@@ -72,45 +72,45 @@ These are only a few examples of the Flexible Shipping usage, however, its possi
|
|
72 |
* Free shipping coupons support
|
73 |
|
74 |
|
75 |
-
[Upgrade to PRO Now →](https://
|
76 |
|
77 |
= Flexible Shipping Locations Add-On =
|
78 |
|
79 |
Flexible Shipping Locations Add-On extends the default Flexible Shipping for WooCommerce functionalities and adds the possiblity to create the additional rules based on locations. It works with both, free and PRO versions so you can buy it separately if you do not need the PRO features.
|
80 |
|
81 |
-
[Buy Flexible Shipping Locations Add-On now →](https://
|
82 |
|
83 |
= Flexible Shipping Import Export Add-On =
|
84 |
|
85 |
Flexible Shipping Import Export Add-On allows you to allows you to easily import and export Flexible Shipping methods. This allows you to easily move and update shipping methods. Plugin supports CSV format. It works with both, free and PRO versions so you can buy it separately if you do not need the PRO features.
|
86 |
|
87 |
-
[Buy Flexible Shipping Import Export Add-On now →](https://
|
88 |
|
89 |
= Multi Vendor Shipping for WooCommerce Add-On =
|
90 |
|
91 |
Multi Vendor Shipping for WooCommerce Add-on extends the Flexible Shipping plugin by adding rules based on Product Author (Vendor). This allows you to assign shipping methods to vendors or set additional shipping costs to them. It works with both, free and PRO versions so you can buy it separately if you do not need the PRO features.
|
92 |
|
93 |
-
[Buy Multi Vendor Shipping for WooCommerce Add-On now →](https://
|
94 |
|
95 |
= Conditional Shipping Methods =
|
96 |
|
97 |
Conditionally display and hide the shipping methods in your WooCommerce store. Define the rules when the specific shipping methods should be available to pick and when not to. Extend the Flexible Shipping plugin's capabilities with conditional logic for displaying shipping methods.
|
98 |
|
99 |
-
[Buy Conditional Shipping Methods now →](https://
|
100 |
|
101 |
= Docs =
|
102 |
|
103 |
-
[View Flexible Shipping Docs](https://
|
104 |
|
105 |
= Support Policy =
|
106 |
|
107 |
-
We provide a limited support for the free version of our Flexible Shipping plugin on the [dedicated plugin Support Forum](https://wordpress.org/support/plugin/flexible-shipping/). Please upgrade to PRO version to get the priority e-mail support as well as all PRO features. [Upgrade Now →](https://
|
108 |
|
109 |
= Further Integrations =
|
110 |
|
111 |
**United Kingdom**
|
112 |
|
113 |
-
We have released a DPD UK WooCommerce integration for Flexible Shipping covering the whole UK teritory. Check our plugin and [offer your customers the DPD UK services at your shop →](https://
|
114 |
|
115 |
**Poland**
|
116 |
|
@@ -180,11 +180,11 @@ Optionally you can also try to upload the plugin zip file using Plugins -> Add N
|
|
180 |
|
181 |
= How to configure the plugin? =
|
182 |
|
183 |
-
To make it clear and as easy as possible we have prepared the detailed step-by-step guides in our [Flexible Shipping Docs here](https://
|
184 |
|
185 |
= Do you offer support? =
|
186 |
|
187 |
-
We provide a limited support for the free version of our Flexible Shipping plugin on the [dedicated plugin Support Forum](https://wordpress.org/support/plugin/flexible-shipping/). Please upgrade to PRO version to get the priority e-mail support as well as all PRO features. [Upgrade Now →](https://
|
188 |
|
189 |
== Screenshots ==
|
190 |
|
@@ -200,6 +200,10 @@ If you are upgrading from the old Flexible Shipping version (1.3.2, woo-flexible
|
|
200 |
|
201 |
== Changelog ==
|
202 |
|
|
|
|
|
|
|
|
|
203 |
= 4.11.5 - 2022-04-13 =
|
204 |
* Added outdated PRO version checker
|
205 |
|
1 |
=== Table Rate Shipping Method for WooCommerce by Flexible Shipping ===
|
2 |
Contributors: wpdesk,dyszczo,grola,piotrpo,marcinkolanko,mateuszgbiorczyk,sebastianpisula,bartj
|
3 |
+
Donate link: https://octol.io/fs-repo-up
|
4 |
Tags: table rate, table rate shipping, conditional shipping, free shipping, woocommerce shipping, flexible shipping, woocommerce table rate shipping, cart based shipping, weight shipping, weight based shipping, totals based shipping, order based shipping, shipping zones, shipping classes, shipping, free shipping, advanced shipping
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 5.9
|
7 |
+
Stable tag: 4.11.6
|
8 |
Requires PHP: 7.0
|
9 |
License: GPLv3 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
20 |
[youtube https://www.youtube.com/watch?v=C7dQ2jQ-iVc]
|
21 |
|
22 |
> **Upgrade to Flexible Shipping PRO**<br />
|
23 |
+
> Upgrade to [Flexible Shipping PRO now](https://octol.io/fs-repo-up) to get the priority e-mail support and gain an access to all the PRO features!
|
24 |
|
25 |
= Possible Shipping Scenarios =
|
26 |
|
33 |
* Add a cost per whole order and per each one product in the cart (PRO)
|
34 |
* Enable/disable shipping method based on the Time of the Day and Day of the week (PRO)
|
35 |
|
36 |
+
These are only a few examples of the Flexible Shipping usage, however, its possibilities are almost endless and sky is the limit ;) We have described some of them in our docs and [Ready to use scenarios](https://octol.io/fs-repo-docs).
|
37 |
|
38 |
= Features =
|
39 |
|
72 |
* Free shipping coupons support
|
73 |
|
74 |
|
75 |
+
[Upgrade to PRO Now →](https://octol.io/fs-repo-up)
|
76 |
|
77 |
= Flexible Shipping Locations Add-On =
|
78 |
|
79 |
Flexible Shipping Locations Add-On extends the default Flexible Shipping for WooCommerce functionalities and adds the possiblity to create the additional rules based on locations. It works with both, free and PRO versions so you can buy it separately if you do not need the PRO features.
|
80 |
|
81 |
+
[Buy Flexible Shipping Locations Add-On now →](https://octol.io/fs-repo-cross-locations)
|
82 |
|
83 |
= Flexible Shipping Import Export Add-On =
|
84 |
|
85 |
Flexible Shipping Import Export Add-On allows you to allows you to easily import and export Flexible Shipping methods. This allows you to easily move and update shipping methods. Plugin supports CSV format. It works with both, free and PRO versions so you can buy it separately if you do not need the PRO features.
|
86 |
|
87 |
+
[Buy Flexible Shipping Import Export Add-On now →](https://octol.io/fs-repo-cross-fsie)
|
88 |
|
89 |
= Multi Vendor Shipping for WooCommerce Add-On =
|
90 |
|
91 |
Multi Vendor Shipping for WooCommerce Add-on extends the Flexible Shipping plugin by adding rules based on Product Author (Vendor). This allows you to assign shipping methods to vendors or set additional shipping costs to them. It works with both, free and PRO versions so you can buy it separately if you do not need the PRO features.
|
92 |
|
93 |
+
[Buy Multi Vendor Shipping for WooCommerce Add-On now →](https://octol.io/fs-repo-cross-mvs)
|
94 |
|
95 |
= Conditional Shipping Methods =
|
96 |
|
97 |
Conditionally display and hide the shipping methods in your WooCommerce store. Define the rules when the specific shipping methods should be available to pick and when not to. Extend the Flexible Shipping plugin's capabilities with conditional logic for displaying shipping methods.
|
98 |
|
99 |
+
[Buy Conditional Shipping Methods now →](https://octol.io/fs-repo-cross-csm)
|
100 |
|
101 |
= Docs =
|
102 |
|
103 |
+
[View Flexible Shipping Docs](https://octol.io/fs-repo-docs)
|
104 |
|
105 |
= Support Policy =
|
106 |
|
107 |
+
We provide a limited support for the free version of our Flexible Shipping plugin on the [dedicated plugin Support Forum](https://wordpress.org/support/plugin/flexible-shipping/). Please upgrade to PRO version to get the priority e-mail support as well as all PRO features. [Upgrade Now →](https://octol.io/fs-repo-up)
|
108 |
|
109 |
= Further Integrations =
|
110 |
|
111 |
**United Kingdom**
|
112 |
|
113 |
+
We have released a DPD UK WooCommerce integration for Flexible Shipping covering the whole UK teritory. Check our plugin and [offer your customers the DPD UK services at your shop →](https://octol.io/fs-repo-cross-dpd-uk)
|
114 |
|
115 |
**Poland**
|
116 |
|
180 |
|
181 |
= How to configure the plugin? =
|
182 |
|
183 |
+
To make it clear and as easy as possible we have prepared the detailed step-by-step guides in our [Flexible Shipping Docs here](https://octol.io/fs-repo-docs).
|
184 |
|
185 |
= Do you offer support? =
|
186 |
|
187 |
+
We provide a limited support for the free version of our Flexible Shipping plugin on the [dedicated plugin Support Forum](https://wordpress.org/support/plugin/flexible-shipping/). Please upgrade to PRO version to get the priority e-mail support as well as all PRO features. [Upgrade Now →](https://octol.io/fs-repo-up)
|
188 |
|
189 |
== Screenshots ==
|
190 |
|
200 |
|
201 |
== Changelog ==
|
202 |
|
203 |
+
= 4.11.6 - 2022-04-21 =
|
204 |
+
* Fixed composer PSR-4 autoload
|
205 |
+
* Fixed notice: "Undefined index: method_integration"
|
206 |
+
|
207 |
= 4.11.5 - 2022-04-13 =
|
208 |
* Added outdated PRO version checker
|
209 |
|
src/WPDesk/FS/Info/FSIE.php
CHANGED
@@ -35,7 +35,7 @@ class FSIE extends Metabox {
|
|
35 |
* @return string
|
36 |
*/
|
37 |
private function get_footer_content() {
|
38 |
-
$url = get_locale() === 'pl_PL' ? 'https://
|
39 |
|
40 |
return '<a class="button button-primary" href="' . esc_url( $url ) . '" target="_blank">' . __( 'Buy Flexible Shipping Import/Export →', 'flexible-shipping' ) . '</a>';
|
41 |
}
|
35 |
* @return string
|
36 |
*/
|
37 |
private function get_footer_content() {
|
38 |
+
$url = get_locale() === 'pl_PL' ? 'https://octol.io/fs-info-fsie-pl' : 'https://octol.io/fs-info-fsie';
|
39 |
|
40 |
return '<a class="button button-primary" href="' . esc_url( $url ) . '" target="_blank">' . __( 'Buy Flexible Shipping Import/Export →', 'flexible-shipping' ) . '</a>';
|
41 |
}
|
src/WPDesk/FS/Info/FSPro.php
CHANGED
@@ -35,7 +35,7 @@ class FSPro extends Metabox {
|
|
35 |
* @return string
|
36 |
*/
|
37 |
private function get_footer_content() {
|
38 |
-
$url = get_user_locale() === 'pl_PL' ? 'https://
|
39 |
|
40 |
return '<a class="button button-primary" href="' . esc_url( $url ) . '" target="_blank">' . __( 'Upgrade now to PRO version →', 'flexible-shipping' ) . '</a>';
|
41 |
}
|
35 |
* @return string
|
36 |
*/
|
37 |
private function get_footer_content() {
|
38 |
+
$url = get_user_locale() === 'pl_PL' ? 'https://octol.io/fs-info-pro-pl' : 'https://octol.io/fs-info-pro';
|
39 |
|
40 |
return '<a class="button button-primary" href="' . esc_url( $url ) . '" target="_blank">' . __( 'Upgrade now to PRO version →', 'flexible-shipping' ) . '</a>';
|
41 |
}
|
src/WPDesk/FS/Info/FSWalkthrough.php
CHANGED
@@ -19,7 +19,7 @@ class FSWalkthrough extends Links {
|
|
19 |
public function __construct() {
|
20 |
$title = __( 'Flexible Shipping walkthrough', 'flexible-shipping' );
|
21 |
$footer_label = __( 'Learn more about Flexible Shipping →', 'flexible-shipping' );
|
22 |
-
$footer_url = 'https://
|
23 |
|
24 |
parent::__construct( 'fs-walkthrough', $title, $this->generate_footer( $footer_url, $footer_label ) );
|
25 |
}
|
@@ -31,23 +31,23 @@ class FSWalkthrough extends Links {
|
|
31 |
return array(
|
32 |
array(
|
33 |
'label' => __( 'How to add a new shipping method handled by Flexible Shipping?', 'flexible-shipping' ),
|
34 |
-
'href' => 'https://
|
35 |
),
|
36 |
array(
|
37 |
'label' => __( 'A complete guide to shipping methods', 'flexible-shipping' ),
|
38 |
-
'href' => 'https://
|
39 |
),
|
40 |
array(
|
41 |
'label' => __( 'Disable or hide the shipping method', 'flexible-shipping' ),
|
42 |
-
'href' => 'https://
|
43 |
),
|
44 |
array(
|
45 |
'label' => __( 'Advanced options and customization', 'flexible-shipping' ),
|
46 |
-
'href' => 'https://
|
47 |
),
|
48 |
array(
|
49 |
'label' => __( 'Combine shipping classes in Flexible Shipping', 'flexible-shipping' ),
|
50 |
-
'href' => 'https://
|
51 |
),
|
52 |
);
|
53 |
}
|
19 |
public function __construct() {
|
20 |
$title = __( 'Flexible Shipping walkthrough', 'flexible-shipping' );
|
21 |
$footer_label = __( 'Learn more about Flexible Shipping →', 'flexible-shipping' );
|
22 |
+
$footer_url = 'https://octol.io/fs-info-docs';
|
23 |
|
24 |
parent::__construct( 'fs-walkthrough', $title, $this->generate_footer( $footer_url, $footer_label ) );
|
25 |
}
|
31 |
return array(
|
32 |
array(
|
33 |
'label' => __( 'How to add a new shipping method handled by Flexible Shipping?', 'flexible-shipping' ),
|
34 |
+
'href' => 'https://octol.io/fs-info-fs-new-method',
|
35 |
),
|
36 |
array(
|
37 |
'label' => __( 'A complete guide to shipping methods', 'flexible-shipping' ),
|
38 |
+
'href' => 'https://octol.io/fs-complete-guide',
|
39 |
),
|
40 |
array(
|
41 |
'label' => __( 'Disable or hide the shipping method', 'flexible-shipping' ),
|
42 |
+
'href' => 'https://octol.io/fs-disable-method',
|
43 |
),
|
44 |
array(
|
45 |
'label' => __( 'Advanced options and customization', 'flexible-shipping' ),
|
46 |
+
'href' => 'https://octol.io/fs-advanced-options',
|
47 |
),
|
48 |
array(
|
49 |
'label' => __( 'Combine shipping classes in Flexible Shipping', 'flexible-shipping' ),
|
50 |
+
'href' => 'https://octol.io/fs-combine-shipping-classes',
|
51 |
),
|
52 |
);
|
53 |
}
|
src/WPDesk/FS/Info/FSWalkthroughPL.php
CHANGED
@@ -19,7 +19,7 @@ class FSWalkthroughPL extends Links {
|
|
19 |
public function __construct() {
|
20 |
$title = __( 'Flexible Shipping walkthrough', 'flexible-shipping' );
|
21 |
$footer_label = __( 'Learn more about Flexible Shipping →', 'flexible-shipping' );
|
22 |
-
$footer_url = 'https://
|
23 |
|
24 |
parent::__construct( 'fs-walkthrough', $title, $this->generate_footer( $footer_url, $footer_label ) );
|
25 |
}
|
@@ -31,23 +31,23 @@ class FSWalkthroughPL extends Links {
|
|
31 |
return array(
|
32 |
array(
|
33 |
'label' => __( 'How to add a new shipping method handled by Flexible Shipping?', 'flexible-shipping' ),
|
34 |
-
'href' => 'https://
|
35 |
),
|
36 |
array(
|
37 |
'label' => __( 'A complete guide to shipping methods', 'flexible-shipping' ),
|
38 |
-
'href' => 'https://
|
39 |
),
|
40 |
array(
|
41 |
'label' => __( 'Disable or hide the shipping method', 'flexible-shipping' ),
|
42 |
-
'href' => 'https://
|
43 |
),
|
44 |
array(
|
45 |
'label' => __( 'Advanced options and customization', 'flexible-shipping' ),
|
46 |
-
'href' => 'https://
|
47 |
),
|
48 |
array(
|
49 |
'label' => __( 'Combine shipping classes in Flexible Shipping', 'flexible-shipping' ),
|
50 |
-
'href' => 'https://
|
51 |
),
|
52 |
);
|
53 |
}
|
19 |
public function __construct() {
|
20 |
$title = __( 'Flexible Shipping walkthrough', 'flexible-shipping' );
|
21 |
$footer_label = __( 'Learn more about Flexible Shipping →', 'flexible-shipping' );
|
22 |
+
$footer_url = 'https://octol.io/fs-info-docs-pl';
|
23 |
|
24 |
parent::__construct( 'fs-walkthrough', $title, $this->generate_footer( $footer_url, $footer_label ) );
|
25 |
}
|
31 |
return array(
|
32 |
array(
|
33 |
'label' => __( 'How to add a new shipping method handled by Flexible Shipping?', 'flexible-shipping' ),
|
34 |
+
'href' => 'https://octol.io/fs-konfiguracja',
|
35 |
),
|
36 |
array(
|
37 |
'label' => __( 'A complete guide to shipping methods', 'flexible-shipping' ),
|
38 |
+
'href' => 'https://octol.io/fs-konfiguracja-metody',
|
39 |
),
|
40 |
array(
|
41 |
'label' => __( 'Disable or hide the shipping method', 'flexible-shipping' ),
|
42 |
+
'href' => 'https://octol.io/fs-wylaczanie-metody',
|
43 |
),
|
44 |
array(
|
45 |
'label' => __( 'Advanced options and customization', 'flexible-shipping' ),
|
46 |
+
'href' => 'https://octol.io/fs-zaawansowane',
|
47 |
),
|
48 |
array(
|
49 |
'label' => __( 'Combine shipping classes in Flexible Shipping', 'flexible-shipping' ),
|
50 |
+
'href' => 'https://octol.io/fs-laczenie-klas-wysylkowych',
|
51 |
),
|
52 |
);
|
53 |
}
|
src/WPDesk/FS/Info/WooCommerceABC.php
CHANGED
@@ -19,7 +19,7 @@ class WooCommerceABC extends Links {
|
|
19 |
public function __construct() {
|
20 |
$title = __( 'WooCommerce ABCs', 'flexible-shipping' );
|
21 |
$footer_label = __( 'Want to know more about WooCommerce? →', 'flexible-shipping' );
|
22 |
-
$footer_url = 'https://
|
23 |
|
24 |
parent::__construct( 'woocommerce-abc', $title, $this->generate_footer( $footer_url, $footer_label ) );
|
25 |
}
|
@@ -31,23 +31,23 @@ class WooCommerceABC extends Links {
|
|
31 |
return array(
|
32 |
array(
|
33 |
'label' => __( 'Shipping Zones', 'flexible-shipping' ),
|
34 |
-
'href' => 'https://
|
35 |
),
|
36 |
array(
|
37 |
'label' => __( 'Shipping Tax', 'flexible-shipping' ),
|
38 |
-
'href' => 'https://
|
39 |
),
|
40 |
array(
|
41 |
'label' => __( 'Shipping Methods', 'flexible-shipping' ),
|
42 |
-
'href' => 'https://
|
43 |
),
|
44 |
array(
|
45 |
'label' => __( 'Shipping Classes', 'flexible-shipping' ),
|
46 |
-
'href' => 'https://
|
47 |
),
|
48 |
array(
|
49 |
'label' => __( 'Table Rate Shipping', 'flexible-shipping' ),
|
50 |
-
'href' => 'https://
|
51 |
),
|
52 |
);
|
53 |
}
|
19 |
public function __construct() {
|
20 |
$title = __( 'WooCommerce ABCs', 'flexible-shipping' );
|
21 |
$footer_label = __( 'Want to know more about WooCommerce? →', 'flexible-shipping' );
|
22 |
+
$footer_url = 'https://octol.io/fs-info-blog';
|
23 |
|
24 |
parent::__construct( 'woocommerce-abc', $title, $this->generate_footer( $footer_url, $footer_label ) );
|
25 |
}
|
31 |
return array(
|
32 |
array(
|
33 |
'label' => __( 'Shipping Zones', 'flexible-shipping' ),
|
34 |
+
'href' => 'https://octol.io/fs-info-zones',
|
35 |
),
|
36 |
array(
|
37 |
'label' => __( 'Shipping Tax', 'flexible-shipping' ),
|
38 |
+
'href' => 'https://octol.io/fs-info-tax',
|
39 |
),
|
40 |
array(
|
41 |
'label' => __( 'Shipping Methods', 'flexible-shipping' ),
|
42 |
+
'href' => 'https://octol.io/fs-info-methods',
|
43 |
),
|
44 |
array(
|
45 |
'label' => __( 'Shipping Classes', 'flexible-shipping' ),
|
46 |
+
'href' => 'https://octol.io/fs-info-classes',
|
47 |
),
|
48 |
array(
|
49 |
'label' => __( 'Table Rate Shipping', 'flexible-shipping' ),
|
50 |
+
'href' => 'https://octol.io/fs-info-table-rate',
|
51 |
),
|
52 |
);
|
53 |
}
|
src/WPDesk/FS/Info/WooCommerceABCPL.php
CHANGED
@@ -19,7 +19,7 @@ class WooCommerceABCPL extends Links {
|
|
19 |
public function __construct() {
|
20 |
$title = __( 'WooCommerce ABCs', 'flexible-shipping' );
|
21 |
$footer_label = __( 'Want to know more about WooCommerce? →', 'flexible-shipping' );
|
22 |
-
$footer_url = 'https://
|
23 |
|
24 |
parent::__construct( 'woocommerce-abc', $title, $this->generate_footer( $footer_url, $footer_label ) );
|
25 |
}
|
@@ -31,19 +31,19 @@ class WooCommerceABCPL extends Links {
|
|
31 |
return array(
|
32 |
array(
|
33 |
'label' => __( 'Shipping configuration', 'flexible-shipping' ),
|
34 |
-
'href' => 'https://
|
35 |
),
|
36 |
array(
|
37 |
'label' => __( 'Shipping Zones', 'flexible-shipping' ),
|
38 |
-
'href' => 'https://
|
39 |
),
|
40 |
array(
|
41 |
'label' => __( 'Shipping Classes', 'flexible-shipping' ),
|
42 |
-
'href' => 'https://
|
43 |
),
|
44 |
array(
|
45 |
'label' => __( 'Free Shipping', 'flexible-shipping' ),
|
46 |
-
'href' => 'https://
|
47 |
),
|
48 |
);
|
49 |
}
|
19 |
public function __construct() {
|
20 |
$title = __( 'WooCommerce ABCs', 'flexible-shipping' );
|
21 |
$footer_label = __( 'Want to know more about WooCommerce? →', 'flexible-shipping' );
|
22 |
+
$footer_url = 'https://octol.io/fs-info-blog-pl';
|
23 |
|
24 |
parent::__construct( 'woocommerce-abc', $title, $this->generate_footer( $footer_url, $footer_label ) );
|
25 |
}
|
31 |
return array(
|
32 |
array(
|
33 |
'label' => __( 'Shipping configuration', 'flexible-shipping' ),
|
34 |
+
'href' => 'https://octol.io/fs-info-wysylka',
|
35 |
),
|
36 |
array(
|
37 |
'label' => __( 'Shipping Zones', 'flexible-shipping' ),
|
38 |
+
'href' => 'https://octol.io/fs-info-strefy',
|
39 |
),
|
40 |
array(
|
41 |
'label' => __( 'Shipping Classes', 'flexible-shipping' ),
|
42 |
+
'href' => 'https://octol.io/fs-info-klasy',
|
43 |
),
|
44 |
array(
|
45 |
'label' => __( 'Free Shipping', 'flexible-shipping' ),
|
46 |
+
'href' => 'https://octol.io/fs-info-darmowa-wysylka',
|
47 |
),
|
48 |
);
|
49 |
}
|
src/WPDesk/FS/Onboarding/TableRate/PopupData.php
CHANGED
@@ -223,13 +223,13 @@ class PopupData {
|
|
223 |
sprintf(
|
224 |
'<a href="%s" target="_blank">',
|
225 |
// Translators: open and close strong tag.
|
226 |
-
esc_url( __( 'https://
|
227 |
),
|
228 |
'</a>',
|
229 |
sprintf(
|
230 |
'<a href="%s" target="_blank">',
|
231 |
// Translators: open and close strong tag.
|
232 |
-
esc_url( __( 'https://
|
233 |
),
|
234 |
'</a>'
|
235 |
),
|
223 |
sprintf(
|
224 |
'<a href="%s" target="_blank">',
|
225 |
// Translators: open and close strong tag.
|
226 |
+
esc_url( __( 'https://octol.io/onboarding-sc', 'flexible-shipping' ) )
|
227 |
),
|
228 |
'</a>',
|
229 |
sprintf(
|
230 |
'<a href="%s" target="_blank">',
|
231 |
// Translators: open and close strong tag.
|
232 |
+
esc_url( __( 'https://octol.io/onboarding-docs', 'flexible-shipping' ) )
|
233 |
),
|
234 |
'</a>'
|
235 |
),
|
src/WPDesk/FS/TableRate/ContextualInfo/Creator.php
CHANGED
@@ -148,7 +148,7 @@ class Creator implements HookableCollection {
|
|
148 |
sprintf(
|
149 |
// Translators: link.
|
150 |
__( 'Want to show your customers the DHL Express live rates? %1$sCheck our DHL Express plugin →%2$s', 'flexible-shipping' ),
|
151 |
-
'<a class="button button-primary" href="https://
|
152 |
'</a>'
|
153 |
)
|
154 |
)
|
@@ -162,8 +162,8 @@ class Creator implements HookableCollection {
|
|
162 |
private function create_fedex_contextual_info( array $phrases_in ) {
|
163 |
if ( ! defined( 'FLEXIBLE_SHIPPING_FEDEX_VERSION' ) && ! defined( 'FLEXIBLE_SHIPPING_FEDEX_PRO_VERSION' ) ) {
|
164 |
$target_url = $this->is_base_location_country_pl()
|
165 |
-
? 'https://
|
166 |
-
: 'https://
|
167 |
$this->add_hookable(
|
168 |
new Flexible_Shipping_Contextual_Info(
|
169 |
self::METHOD_TITLE_AND_METHOD_DESCRIPTION_ELEMENTS,
|
@@ -186,8 +186,8 @@ class Creator implements HookableCollection {
|
|
186 |
private function create_ups_contextual_info( array $phrases_in ) {
|
187 |
if ( ! defined( 'WOOCOMMERCE_UPS_LABELS_VERSION' ) ) {
|
188 |
$target_url = get_user_locale() === 'pl_PL'
|
189 |
-
? 'https://
|
190 |
-
: 'https://
|
191 |
$this->add_hookable(
|
192 |
new Flexible_Shipping_Contextual_Info(
|
193 |
self::METHOD_TITLE_AND_METHOD_DESCRIPTION_ELEMENTS,
|
@@ -209,7 +209,7 @@ class Creator implements HookableCollection {
|
|
209 |
*/
|
210 |
private function create_usps_contextual_info( array $phrases_in ) {
|
211 |
if ( ! defined( 'FLEXIBLE_SHIPPING_USPS_PRO_VERSION' ) ) {
|
212 |
-
$target_url = 'https://
|
213 |
|
214 |
$this->add_hookable(
|
215 |
new Flexible_Shipping_Contextual_Info(
|
@@ -345,7 +345,7 @@ class Creator implements HookableCollection {
|
|
345 |
sprintf(
|
346 |
// Translators: link.
|
347 |
__( 'Sending your products via DPD UK? Create the shipments and generate shipping labels directly from your shop using our %1$sDPD UK integration →%2$s', 'flexible-shipping' ),
|
348 |
-
'<a class="button button-primary" href="https://
|
349 |
'</a>'
|
350 |
)
|
351 |
)
|
@@ -387,7 +387,7 @@ class Creator implements HookableCollection {
|
|
387 |
sprintf(
|
388 |
// Translators: link.
|
389 |
__( '%1$sAdd integration%2$s', 'flexible-shipping' ),
|
390 |
-
'<a class="button button-primary" href="https://
|
391 |
' →</a>'
|
392 |
);
|
393 |
} else {
|
@@ -395,7 +395,7 @@ class Creator implements HookableCollection {
|
|
395 |
sprintf(
|
396 |
// Translators: link.
|
397 |
__( '%1$sAdd integration%2$s', 'flexible-shipping' ),
|
398 |
-
'<a class="button button-primary" href="https://
|
399 |
' →</a>'
|
400 |
);
|
401 |
}
|
148 |
sprintf(
|
149 |
// Translators: link.
|
150 |
__( 'Want to show your customers the DHL Express live rates? %1$sCheck our DHL Express plugin →%2$s', 'flexible-shipping' ),
|
151 |
+
'<a class="button button-primary" href="https://octol.io/fs-cross-dhl-express" target="_blank">',
|
152 |
'</a>'
|
153 |
)
|
154 |
)
|
162 |
private function create_fedex_contextual_info( array $phrases_in ) {
|
163 |
if ( ! defined( 'FLEXIBLE_SHIPPING_FEDEX_VERSION' ) && ! defined( 'FLEXIBLE_SHIPPING_FEDEX_PRO_VERSION' ) ) {
|
164 |
$target_url = $this->is_base_location_country_pl()
|
165 |
+
? 'https://octol.io/fs-cross-fedex-pl'
|
166 |
+
: 'https://octol.io/fs-cross-fedex';
|
167 |
$this->add_hookable(
|
168 |
new Flexible_Shipping_Contextual_Info(
|
169 |
self::METHOD_TITLE_AND_METHOD_DESCRIPTION_ELEMENTS,
|
186 |
private function create_ups_contextual_info( array $phrases_in ) {
|
187 |
if ( ! defined( 'WOOCOMMERCE_UPS_LABELS_VERSION' ) ) {
|
188 |
$target_url = get_user_locale() === 'pl_PL'
|
189 |
+
? 'https://octol.io/fs-cross-ups-labels-pl'
|
190 |
+
: 'https://octol.io/fs-cross-ups-labels';
|
191 |
$this->add_hookable(
|
192 |
new Flexible_Shipping_Contextual_Info(
|
193 |
self::METHOD_TITLE_AND_METHOD_DESCRIPTION_ELEMENTS,
|
209 |
*/
|
210 |
private function create_usps_contextual_info( array $phrases_in ) {
|
211 |
if ( ! defined( 'FLEXIBLE_SHIPPING_USPS_PRO_VERSION' ) ) {
|
212 |
+
$target_url = 'https://octol.io/fs-cross-usps';
|
213 |
|
214 |
$this->add_hookable(
|
215 |
new Flexible_Shipping_Contextual_Info(
|
345 |
sprintf(
|
346 |
// Translators: link.
|
347 |
__( 'Sending your products via DPD UK? Create the shipments and generate shipping labels directly from your shop using our %1$sDPD UK integration →%2$s', 'flexible-shipping' ),
|
348 |
+
'<a class="button button-primary" href="https://octol.io/fs-cross-dpd-uk" target="_blank">',
|
349 |
'</a>'
|
350 |
)
|
351 |
)
|
387 |
sprintf(
|
388 |
// Translators: link.
|
389 |
__( '%1$sAdd integration%2$s', 'flexible-shipping' ),
|
390 |
+
'<a class="button button-primary" href="https://octol.io/fs-integrations" target="_blank">',
|
391 |
' →</a>'
|
392 |
);
|
393 |
} else {
|
395 |
sprintf(
|
396 |
// Translators: link.
|
397 |
__( '%1$sAdd integration%2$s', 'flexible-shipping' ),
|
398 |
+
'<a class="button button-primary" href="https://octol.io/fs-integrations" target="_blank">',
|
399 |
' →</a>'
|
400 |
);
|
401 |
}
|
src/WPDesk/FS/TableRate/Rule/PreconfiguredScenarios/PreconfiguredScenariosFactory.php
CHANGED
@@ -31,7 +31,7 @@ class PreconfiguredScenariosFactory {
|
|
31 |
*/
|
32 |
private function add_weight_scenarios( array $scenarios ) {
|
33 |
$pl = get_locale() === 'pl_PL';
|
34 |
-
$url = $pl ? 'https://
|
35 |
$scenarios['simple_weight'] = new PredefinedScenario(
|
36 |
__( 'Weight', 'flexible-shipping' ),
|
37 |
__( 'Weight-based shipping', 'flexible-shipping' ),
|
@@ -50,7 +50,7 @@ class PreconfiguredScenariosFactory {
|
|
50 |
*/
|
51 |
private function add_value_scenarios( array $scenarios ) {
|
52 |
$pl = get_locale() === 'pl_PL';
|
53 |
-
$url = $pl ? 'https://
|
54 |
$scenarios['simple_value'] = new PredefinedScenario(
|
55 |
__( 'Price', 'flexible-shipping' ),
|
56 |
__( 'Price-based shipping', 'flexible-shipping' ),
|
31 |
*/
|
32 |
private function add_weight_scenarios( array $scenarios ) {
|
33 |
$pl = get_locale() === 'pl_PL';
|
34 |
+
$url = $pl ? 'https://octol.io/fs-weight-pl' : 'https://octol.io/fs-weight';
|
35 |
$scenarios['simple_weight'] = new PredefinedScenario(
|
36 |
__( 'Weight', 'flexible-shipping' ),
|
37 |
__( 'Weight-based shipping', 'flexible-shipping' ),
|
50 |
*/
|
51 |
private function add_value_scenarios( array $scenarios ) {
|
52 |
$pl = get_locale() === 'pl_PL';
|
53 |
+
$url = $pl ? 'https://octol.io/fs-price-based-pl' : 'https://octol.io/fs-price-based';
|
54 |
$scenarios['simple_value'] = new PredefinedScenario(
|
55 |
__( 'Price', 'flexible-shipping' ),
|
56 |
__( 'Price-based shipping', 'flexible-shipping' ),
|
src/WPDesk/FS/TableRate/RulesSettingsField.php
CHANGED
@@ -111,8 +111,8 @@ class RulesSettingsField {
|
|
111 |
'scenarios_tracking_nonce' => wp_create_nonce( AjaxTracker::AJAX_ACTION ),
|
112 |
'scenarios_docs_link' =>
|
113 |
'pl_PL' === get_locale()
|
114 |
-
? 'https://
|
115 |
-
: 'https://
|
116 |
);
|
117 |
}
|
118 |
|
111 |
'scenarios_tracking_nonce' => wp_create_nonce( AjaxTracker::AJAX_ACTION ),
|
112 |
'scenarios_docs_link' =>
|
113 |
'pl_PL' === get_locale()
|
114 |
+
? 'https://octol.io/fs-scenarios-pl'
|
115 |
+
: 'https://octol.io/fs-scenarios',
|
116 |
);
|
117 |
}
|
118 |
|
src/WPDesk/FS/TableRate/ShippingMethod/CommonMethodSettings.php
CHANGED
@@ -93,7 +93,7 @@ class CommonMethodSettings implements MethodSettings {
|
|
93 |
'description' => sprintf(
|
94 |
// Translators: documentation link.
|
95 |
__( 'Learn %1$show to customize the displayed notice →%2$s', 'flexible-shipping' ),
|
96 |
-
sprintf( '<a href="%s" target="_blank">', esc_url( get_locale() === 'pl_PL' ? 'https://
|
97 |
'</a>'
|
98 |
) . '<br /><br />' . __( 'Please mind that if you use any additional plugins to split the shipment into packages, the \'Left to free shipping notice\' will not be displayed.', 'flexible-shipping' ),
|
99 |
],
|
@@ -133,7 +133,7 @@ class CommonMethodSettings implements MethodSettings {
|
|
133 |
'description' => sprintf(
|
134 |
// Translators: documentation link.
|
135 |
__( 'Enable FS debug mode to verify the shipping methods\' configuration, check which one was used and how the shipping cost was calculated as well as identify any possible mistakes. %1$sLearn more how the Debug Mode works →%2$s', 'flexible-shipping' ),
|
136 |
-
'<a href="' . ( 'pl_PL' !== get_locale() ? 'https://
|
137 |
'</a>'
|
138 |
),
|
139 |
],
|
93 |
'description' => sprintf(
|
94 |
// Translators: documentation link.
|
95 |
__( 'Learn %1$show to customize the displayed notice →%2$s', 'flexible-shipping' ),
|
96 |
+
sprintf( '<a href="%s" target="_blank">', esc_url( get_locale() === 'pl_PL' ? 'https://octol.io/fs-free-notice-pl' : 'https://octol.io/fs-free-notice' ) ),
|
97 |
'</a>'
|
98 |
) . '<br /><br />' . __( 'Please mind that if you use any additional plugins to split the shipment into packages, the \'Left to free shipping notice\' will not be displayed.', 'flexible-shipping' ),
|
99 |
],
|
133 |
'description' => sprintf(
|
134 |
// Translators: documentation link.
|
135 |
__( 'Enable FS debug mode to verify the shipping methods\' configuration, check which one was used and how the shipping cost was calculated as well as identify any possible mistakes. %1$sLearn more how the Debug Mode works →%2$s', 'flexible-shipping' ),
|
136 |
+
'<a href="' . ( 'pl_PL' !== get_locale() ? 'https://octol.io/fs-debug-mode' : 'https://octol.io/fs-debug-mode-pl' ) . '" target="_blank">',
|
137 |
'</a>'
|
138 |
),
|
139 |
],
|
src/WPDesk/FS/TableRate/ShippingMethod/Convert/ConvertNotice.php
CHANGED
@@ -85,7 +85,7 @@ class ConvertNotice implements Hookable {
|
|
85 |
return;
|
86 |
}
|
87 |
|
88 |
-
$learn_more_url = 'pl_PL' === get_locale() ? 'https://
|
89 |
|
90 |
if ( count( $shipping_method->get_shipping_methods() ) > 0 ) {
|
91 |
$this->add_notice(
|
85 |
return;
|
86 |
}
|
87 |
|
88 |
+
$learn_more_url = 'pl_PL' === get_locale() ? 'https://octol.io/fs-migration-pl' : 'https://octol.io/fs-migration';
|
89 |
|
90 |
if ( count( $shipping_method->get_shipping_methods() ) > 0 ) {
|
91 |
$this->add_notice(
|
src/WPDesk/FS/TableRate/ShippingMethod/SingleMethodSettings.php
CHANGED
@@ -34,8 +34,8 @@ class SingleMethodSettings implements MethodSettings {
|
|
34 |
*/
|
35 |
private function append_tax_settings( array $settings_fields ) {
|
36 |
$tax_docs_link = 'pl_PL' !== get_locale()
|
37 |
-
? 'https://
|
38 |
-
: 'https://
|
39 |
$new_settings_fields = [];
|
40 |
foreach ( $settings_fields as $key => $settings_field ) {
|
41 |
$new_settings_fields[ $key ] = $settings_field;
|
34 |
*/
|
35 |
private function append_tax_settings( array $settings_fields ) {
|
36 |
$tax_docs_link = 'pl_PL' !== get_locale()
|
37 |
+
? 'https://octol.io/fs-tax'
|
38 |
+
: 'https://octol.io/fs-tax-pl';
|
39 |
$new_settings_fields = [];
|
40 |
foreach ( $settings_fields as $key => $settings_field ) {
|
41 |
$new_settings_fields[ $key ] = $settings_field;
|
src/WPDesk/FS/TableRate/ShippingMethodSingle.php
CHANGED
@@ -63,8 +63,7 @@ class ShippingMethodSingle extends WC_Shipping_Method {
|
|
63 |
$this->method_title = __( 'Flexible Shipping', 'flexible-shipping' );
|
64 |
$this->method_description = __( 'A single Flexible Shipping method.', 'flexible-shipping' );
|
65 |
if ( $this->instance_id ) {
|
66 |
-
$docs_link = get_locale() === 'pl_PL' ? 'https://
|
67 |
-
$docs_link .= '?utm_source=flexible-shipping-settings&utm_medium=link&utm_campaign=flexible-shipping-docs-link';
|
68 |
// Translators: docs link.
|
69 |
$this->method_description = sprintf( __( 'A single Flexible Shipping method. Learn %1$show to configure FS shipping method →%2$s', 'flexible-shipping' ), '<a href="' . $docs_link . '" target="_blank">', '</a>' );
|
70 |
}
|
63 |
$this->method_title = __( 'Flexible Shipping', 'flexible-shipping' );
|
64 |
$this->method_description = __( 'A single Flexible Shipping method.', 'flexible-shipping' );
|
65 |
if ( $this->instance_id ) {
|
66 |
+
$docs_link = get_locale() === 'pl_PL' ? 'https://octol.io/fs-docs-pl' : 'https://octol.io/fs-docs';
|
|
|
67 |
// Translators: docs link.
|
68 |
$this->method_description = sprintf( __( 'A single Flexible Shipping method. Learn %1$show to configure FS shipping method →%2$s', 'flexible-shipping' ), '<a href="' . $docs_link . '" target="_blank">', '</a>' );
|
69 |
}
|
src/WPDesk/FS/TableRate/views/shipping-method-settings-rules.php
CHANGED
@@ -44,14 +44,13 @@ $rule_table_settings = [
|
|
44 |
<?php if ( ! wpdesk_is_plugin_active( 'flexible-shipping-pro/flexible-shipping-pro.php' ) ) : ?>
|
45 |
<p>
|
46 |
<?php
|
47 |
-
$fs_pro_link = get_locale() === 'pl_PL' ? 'https://
|
48 |
|
49 |
echo wp_kses_post(
|
50 |
sprintf(
|
51 |
// Translators: open tag, close tag.
|
52 |
__( 'Need more? Check %1$sFlexible Shipping PRO%2$s to unleash its full potential and add advanced rules based on shipping classes, products, quantity, include additional handling fees, insurance and much more.', 'flexible-shipping' ),
|
53 |
-
'<a href="' . esc_url( $fs_pro_link ) . '
|
54 |
-
" target="_blank">',
|
55 |
'</a>'
|
56 |
)
|
57 |
);
|
44 |
<?php if ( ! wpdesk_is_plugin_active( 'flexible-shipping-pro/flexible-shipping-pro.php' ) ) : ?>
|
45 |
<p>
|
46 |
<?php
|
47 |
+
$fs_pro_link = get_locale() === 'pl_PL' ? 'https://octol.io/fs-hints-up-pl' : 'https://octol.io/fs-hints-up';
|
48 |
|
49 |
echo wp_kses_post(
|
50 |
sprintf(
|
51 |
// Translators: open tag, close tag.
|
52 |
__( 'Need more? Check %1$sFlexible Shipping PRO%2$s to unleash its full potential and add advanced rules based on shipping classes, products, quantity, include additional handling fees, insurance and much more.', 'flexible-shipping' ),
|
53 |
+
'<a href="' . esc_url( $fs_pro_link ) . '" target="_blank">',
|
|
|
54 |
'</a>'
|
55 |
)
|
56 |
);
|
src/WPDesk/FS/Tracker/TrackerNotices.php
CHANGED
@@ -16,7 +16,7 @@ use FSVendor\WPDesk\PluginBuilder\Plugin\Hookable;
|
|
16 |
*/
|
17 |
class TrackerNotices implements Hookable {
|
18 |
|
19 |
-
const USAGE_DATA_URL = 'https://
|
20 |
|
21 |
/**
|
22 |
* Hooks.
|
@@ -53,7 +53,7 @@ class TrackerNotices implements Hookable {
|
|
53 |
);
|
54 |
?>
|
55 |
<a href="<?php echo esc_url( self::USAGE_DATA_URL ); ?>" target="_blank"><?php echo wp_kses_post( __( 'Learn more »', 'flexible-shipping' ) ); ?></a><br/><br/>
|
56 |
-
<?php echo wp_kses_post( sprintf( __( 'Thank you in advance!%1$s~
|
57 |
<?php
|
58 |
$out = ob_get_clean();
|
59 |
return $out ? $out : '';
|
16 |
*/
|
17 |
class TrackerNotices implements Hookable {
|
18 |
|
19 |
+
const USAGE_DATA_URL = 'https://octolize.com/usage-tracking/';
|
20 |
|
21 |
/**
|
22 |
* Hooks.
|
53 |
);
|
54 |
?>
|
55 |
<a href="<?php echo esc_url( self::USAGE_DATA_URL ); ?>" target="_blank"><?php echo wp_kses_post( __( 'Learn more »', 'flexible-shipping' ) ); ?></a><br/><br/>
|
56 |
+
<?php echo wp_kses_post( sprintf( __( 'Thank you in advance!%1$s~ Octolize Team', 'flexible-shipping' ), '<br/>' ) ); // phpcs:ignore. ?>
|
57 |
<?php
|
58 |
$out = ob_get_clean();
|
59 |
return $out ? $out : '';
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -112,26 +112,6 @@ return array(
|
|
112 |
'FSVendor\\WPDesk\\Beacon\\BeaconPro' => $baseDir . '/vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/BeaconPro.php',
|
113 |
'FSVendor\\WPDesk\\Beacon\\BeaconShouldShowStrategy' => $baseDir . '/vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/BeaconShouldShowStrategy.php',
|
114 |
'FSVendor\\WPDesk\\Beacon\\Beacon\\WooCommerceSettingsFieldsModifier' => $baseDir . '/vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/WooCommerceSettingsFieldsModifier.php',
|
115 |
-
'FSVendor\\WPDesk\\Codeception\\Command\\AcceptanceTestGenerator' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Codeception/Command/AcceptanceTestGenerator.php',
|
116 |
-
'FSVendor\\WPDesk\\Codeception\\Command\\GeneratePluginActivation' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Codeception/Command/GeneratePluginActivation.php',
|
117 |
-
'FSVendor\\WPDesk\\Codeception\\Command\\GenerateWooCommerce' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Codeception/Command/GenerateWooCommerce.php',
|
118 |
-
'FSVendor\\WPDesk\\Codeception\\Command\\WooCommerceTestGenerator' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Codeception/Command/WooCommerceTestGenerator.php',
|
119 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\CommandProvider' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/CommandProvider.php',
|
120 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\BaseCommand' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/BaseCommand.php',
|
121 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\Configuration' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/Configuration.php',
|
122 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\CreateCodeceptionTests' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/CreateCodeceptionTests.php',
|
123 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\LocalCodeceptionTrait' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/LocalCodeceptionTrait.php',
|
124 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\PrepareCodeceptionDb' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareCodeceptionDb.php',
|
125 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\PrepareLocalCodeceptionTests' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareLocalCodeceptionTests.php',
|
126 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\PrepareLocalCodeceptionTestsWithCoverage' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareLocalCodeceptionTestsWithCoverage.php',
|
127 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\PrepareParallelCodeceptionTests' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareParallelCodeceptionTests.php',
|
128 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\PrepareWordpressForCodeception' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareWordpressForCodeception.php',
|
129 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\RunCodeceptionTests' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/RunCodeceptionTests.php',
|
130 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\RunLocalCodeceptionTests' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/RunLocalCodeceptionTests.php',
|
131 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\RunLocalCodeceptionTestsWithCoverage' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/RunLocalCodeceptionTestsWithCoverage.php',
|
132 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\SedTrait' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/SedTrait.php',
|
133 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\SettingsException' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/SettingsException.php',
|
134 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Plugin' => $baseDir . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Plugin.php',
|
135 |
'FSVendor\\WPDesk\\FS\\Compatibility\\BlockSettings' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/BlockSettings.php',
|
136 |
'FSVendor\\WPDesk\\FS\\Compatibility\\Notice' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/Notice.php',
|
137 |
'FSVendor\\WPDesk\\FS\\Compatibility\\PluginCompatibility' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/PluginCompatibility.php',
|
112 |
'FSVendor\\WPDesk\\Beacon\\BeaconPro' => $baseDir . '/vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/BeaconPro.php',
|
113 |
'FSVendor\\WPDesk\\Beacon\\BeaconShouldShowStrategy' => $baseDir . '/vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/BeaconShouldShowStrategy.php',
|
114 |
'FSVendor\\WPDesk\\Beacon\\Beacon\\WooCommerceSettingsFieldsModifier' => $baseDir . '/vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/WooCommerceSettingsFieldsModifier.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
'FSVendor\\WPDesk\\FS\\Compatibility\\BlockSettings' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/BlockSettings.php',
|
116 |
'FSVendor\\WPDesk\\FS\\Compatibility\\Notice' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/Notice.php',
|
117 |
'FSVendor\\WPDesk\\FS\\Compatibility\\PluginCompatibility' => $baseDir . '/vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/PluginCompatibility.php',
|
vendor/composer/autoload_psr4.php
CHANGED
@@ -6,6 +6,6 @@ $vendorDir = dirname(dirname(__FILE__));
|
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
|
|
9 |
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
|
10 |
-
'' => array($baseDir . '/src'),
|
11 |
);
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
9 |
+
'WPDesk\\FS\\' => array($baseDir . '/src/WPDesk/FS'),
|
10 |
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
|
|
|
11 |
);
|
vendor/composer/autoload_static.php
CHANGED
@@ -7,6 +7,10 @@ namespace Composer\Autoload;
|
|
7 |
class ComposerStaticInitFlexibleShipping
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
|
|
|
|
|
|
|
|
10 |
'P' =>
|
11 |
array (
|
12 |
'Psr\\Log\\' => 8,
|
@@ -14,16 +18,16 @@ class ComposerStaticInitFlexibleShipping
|
|
14 |
);
|
15 |
|
16 |
public static $prefixDirsPsr4 = array (
|
|
|
|
|
|
|
|
|
17 |
'Psr\\Log\\' =>
|
18 |
array (
|
19 |
0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
|
20 |
),
|
21 |
);
|
22 |
|
23 |
-
public static $fallbackDirsPsr4 = array (
|
24 |
-
0 => __DIR__ . '/../..' . '/src',
|
25 |
-
);
|
26 |
-
|
27 |
public static $classMap = array (
|
28 |
'FSVendor\\Monolog\\ErrorHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/ErrorHandler.php',
|
29 |
'FSVendor\\Monolog\\Formatter\\ChromePHPFormatter' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php',
|
@@ -131,26 +135,6 @@ class ComposerStaticInitFlexibleShipping
|
|
131 |
'FSVendor\\WPDesk\\Beacon\\BeaconPro' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/BeaconPro.php',
|
132 |
'FSVendor\\WPDesk\\Beacon\\BeaconShouldShowStrategy' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/BeaconShouldShowStrategy.php',
|
133 |
'FSVendor\\WPDesk\\Beacon\\Beacon\\WooCommerceSettingsFieldsModifier' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/WooCommerceSettingsFieldsModifier.php',
|
134 |
-
'FSVendor\\WPDesk\\Codeception\\Command\\AcceptanceTestGenerator' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Codeception/Command/AcceptanceTestGenerator.php',
|
135 |
-
'FSVendor\\WPDesk\\Codeception\\Command\\GeneratePluginActivation' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Codeception/Command/GeneratePluginActivation.php',
|
136 |
-
'FSVendor\\WPDesk\\Codeception\\Command\\GenerateWooCommerce' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Codeception/Command/GenerateWooCommerce.php',
|
137 |
-
'FSVendor\\WPDesk\\Codeception\\Command\\WooCommerceTestGenerator' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Codeception/Command/WooCommerceTestGenerator.php',
|
138 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\CommandProvider' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/CommandProvider.php',
|
139 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\BaseCommand' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/BaseCommand.php',
|
140 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\Configuration' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/Configuration.php',
|
141 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\CreateCodeceptionTests' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/CreateCodeceptionTests.php',
|
142 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\LocalCodeceptionTrait' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/LocalCodeceptionTrait.php',
|
143 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\PrepareCodeceptionDb' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareCodeceptionDb.php',
|
144 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\PrepareLocalCodeceptionTests' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareLocalCodeceptionTests.php',
|
145 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\PrepareLocalCodeceptionTestsWithCoverage' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareLocalCodeceptionTestsWithCoverage.php',
|
146 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\PrepareParallelCodeceptionTests' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareParallelCodeceptionTests.php',
|
147 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\PrepareWordpressForCodeception' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareWordpressForCodeception.php',
|
148 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\RunCodeceptionTests' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/RunCodeceptionTests.php',
|
149 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\RunLocalCodeceptionTests' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/RunLocalCodeceptionTests.php',
|
150 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\RunLocalCodeceptionTestsWithCoverage' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/RunLocalCodeceptionTestsWithCoverage.php',
|
151 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\SedTrait' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/SedTrait.php',
|
152 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Commands\\SettingsException' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/SettingsException.php',
|
153 |
-
'FSVendor\\WPDesk\\Composer\\Codeception\\Plugin' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Plugin.php',
|
154 |
'FSVendor\\WPDesk\\FS\\Compatibility\\BlockSettings' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/BlockSettings.php',
|
155 |
'FSVendor\\WPDesk\\FS\\Compatibility\\Notice' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/Notice.php',
|
156 |
'FSVendor\\WPDesk\\FS\\Compatibility\\PluginCompatibility' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/PluginCompatibility.php',
|
@@ -608,7 +592,6 @@ class ComposerStaticInitFlexibleShipping
|
|
608 |
return \Closure::bind(function () use ($loader) {
|
609 |
$loader->prefixLengthsPsr4 = ComposerStaticInitFlexibleShipping::$prefixLengthsPsr4;
|
610 |
$loader->prefixDirsPsr4 = ComposerStaticInitFlexibleShipping::$prefixDirsPsr4;
|
611 |
-
$loader->fallbackDirsPsr4 = ComposerStaticInitFlexibleShipping::$fallbackDirsPsr4;
|
612 |
$loader->classMap = ComposerStaticInitFlexibleShipping::$classMap;
|
613 |
|
614 |
}, null, ClassLoader::class);
|
7 |
class ComposerStaticInitFlexibleShipping
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
+
'W' =>
|
11 |
+
array (
|
12 |
+
'WPDesk\\FS\\' => 10,
|
13 |
+
),
|
14 |
'P' =>
|
15 |
array (
|
16 |
'Psr\\Log\\' => 8,
|
18 |
);
|
19 |
|
20 |
public static $prefixDirsPsr4 = array (
|
21 |
+
'WPDesk\\FS\\' =>
|
22 |
+
array (
|
23 |
+
0 => __DIR__ . '/../..' . '/src/WPDesk/FS',
|
24 |
+
),
|
25 |
'Psr\\Log\\' =>
|
26 |
array (
|
27 |
0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
|
28 |
),
|
29 |
);
|
30 |
|
|
|
|
|
|
|
|
|
31 |
public static $classMap = array (
|
32 |
'FSVendor\\Monolog\\ErrorHandler' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/ErrorHandler.php',
|
33 |
'FSVendor\\Monolog\\Formatter\\ChromePHPFormatter' => __DIR__ . '/../..' . '/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php',
|
135 |
'FSVendor\\WPDesk\\Beacon\\BeaconPro' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/BeaconPro.php',
|
136 |
'FSVendor\\WPDesk\\Beacon\\BeaconShouldShowStrategy' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/BeaconShouldShowStrategy.php',
|
137 |
'FSVendor\\WPDesk\\Beacon\\Beacon\\WooCommerceSettingsFieldsModifier' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-helpscout-beacon/src/Beacon/WooCommerceSettingsFieldsModifier.php',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
'FSVendor\\WPDesk\\FS\\Compatibility\\BlockSettings' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/BlockSettings.php',
|
139 |
'FSVendor\\WPDesk\\FS\\Compatibility\\Notice' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/Notice.php',
|
140 |
'FSVendor\\WPDesk\\FS\\Compatibility\\PluginCompatibility' => __DIR__ . '/../..' . '/vendor_prefixed/wpdesk/wp-wpdesk-fs-compatibility/src/PluginCompatibility.php',
|
592 |
return \Closure::bind(function () use ($loader) {
|
593 |
$loader->prefixLengthsPsr4 = ComposerStaticInitFlexibleShipping::$prefixLengthsPsr4;
|
594 |
$loader->prefixDirsPsr4 = ComposerStaticInitFlexibleShipping::$prefixDirsPsr4;
|
|
|
595 |
$loader->classMap = ComposerStaticInitFlexibleShipping::$classMap;
|
596 |
|
597 |
}, null, ClassLoader::class);
|
vendor_prefixed/wpdesk/wp-code-sniffer/composer.json
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "wpdesk\/wp-code-sniffer",
|
3 |
-
"description": "Library for WP Desk Coding Standards in plugins.",
|
4 |
-
"license": "MIT",
|
5 |
-
"keywords": [
|
6 |
-
"wordpress",
|
7 |
-
"code sniffer",
|
8 |
-
"admin",
|
9 |
-
"phpcs"
|
10 |
-
],
|
11 |
-
"homepage": "https:\/\/gitlab.com\/wpdesk\/wp-code-sniffer",
|
12 |
-
"type": "phpcodesniffer-standard",
|
13 |
-
"prefer-stable": true,
|
14 |
-
"version": "1.2.3",
|
15 |
-
"authors": [
|
16 |
-
{
|
17 |
-
"name": "grola",
|
18 |
-
"email": "grola@wpdesk.net"
|
19 |
-
}
|
20 |
-
],
|
21 |
-
"require": {
|
22 |
-
"php": ">=7.0",
|
23 |
-
"dealerdirect\/phpcodesniffer-composer-installer": "0.6|^0.7",
|
24 |
-
"squizlabs\/php_codesniffer": "^3.6",
|
25 |
-
"wp-coding-standards\/wpcs": "^2.3",
|
26 |
-
"phpcompatibility\/phpcompatibility-wp": "^2.1.1"
|
27 |
-
},
|
28 |
-
"require-dev": {
|
29 |
-
"roave\/security-advisories": "dev-latest"
|
30 |
-
},
|
31 |
-
"scripts": {
|
32 |
-
"install-codestandards": [
|
33 |
-
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
|
34 |
-
],
|
35 |
-
"pre-package-install": [
|
36 |
-
"@install-codestandards"
|
37 |
-
],
|
38 |
-
"post-package-update": [
|
39 |
-
"@install-codestandards"
|
40 |
-
]
|
41 |
-
}
|
42 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/composer.json
DELETED
@@ -1,61 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "wpdesk\/wp-codeception",
|
3 |
-
"description": "Library for WP Desk Codeception tests.",
|
4 |
-
"license": "MIT",
|
5 |
-
"keywords": [
|
6 |
-
"wordpress",
|
7 |
-
"codeception",
|
8 |
-
"admin"
|
9 |
-
],
|
10 |
-
"homepage": "https:\/\/gitlab.com\/wpdesk\/wp-codeception",
|
11 |
-
"type": "composer-plugin",
|
12 |
-
"minimum-stability": "stable",
|
13 |
-
"authors": [
|
14 |
-
{
|
15 |
-
"name": "grola",
|
16 |
-
"email": "grola@wpdesk.net"
|
17 |
-
}
|
18 |
-
],
|
19 |
-
"config": {
|
20 |
-
"sort-packages": true,
|
21 |
-
"platform": {
|
22 |
-
"php": "7.0.8"
|
23 |
-
}
|
24 |
-
},
|
25 |
-
"require": {
|
26 |
-
"php": ">=7.0.8",
|
27 |
-
"ext-json": "*",
|
28 |
-
"composer-plugin-api": "^1.1|^2",
|
29 |
-
"albertofem\/rsync-lib": "^1.0",
|
30 |
-
"bordoni\/phpass": "^0.3.5",
|
31 |
-
"codeception\/module-asserts": "^1.3",
|
32 |
-
"codeception\/module-cli": "^1.0",
|
33 |
-
"codeception\/module-db": "^1.0",
|
34 |
-
"codeception\/module-filesystem": "^1.0",
|
35 |
-
"codeception\/module-phpbrowser": "^1.0",
|
36 |
-
"codeception\/module-rest": "^1.2",
|
37 |
-
"codeception\/module-webdriver": "^1.0",
|
38 |
-
"codeception\/util-universalframework": "^1.0",
|
39 |
-
"lucatume\/codeception-steppify": "^1.0",
|
40 |
-
"lucatume\/wp-browser": "^2.4",
|
41 |
-
"phpunit\/php-code-coverage": "^5.3",
|
42 |
-
"symfony\/yaml": "^v3.4.47",
|
43 |
-
"vlucas\/phpdotenv": "^4.2.0",
|
44 |
-
"wp-cli\/admin-command": "^2.0",
|
45 |
-
"wp-cli\/wp-cli-bundle": "^2.4"
|
46 |
-
},
|
47 |
-
"autoload": {
|
48 |
-
"psr-4": {
|
49 |
-
"FSVendor\\WPDesk\\Codeception\\": "src\/WPDesk\/Codeception",
|
50 |
-
"FSVendor\\Codeception\\Module\\": "src\/Codeception\/Module",
|
51 |
-
"FSVendor\\WPDesk\\Composer\\Codeception\\": "src\/WPDesk\/Composer"
|
52 |
-
}
|
53 |
-
},
|
54 |
-
"autoload-dev": {},
|
55 |
-
"scripts": {
|
56 |
-
"phpcs": "phpcs"
|
57 |
-
},
|
58 |
-
"extra": {
|
59 |
-
"class": "WPDesk\\Composer\\Codeception\\Plugin"
|
60 |
-
}
|
61 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Codeception/Command/AcceptanceTestGenerator.php
DELETED
@@ -1,63 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FSVendor\WPDesk\Codeception\Command;
|
4 |
-
|
5 |
-
use FSVendor\Codeception\Lib\Generator\Test;
|
6 |
-
/**
|
7 |
-
* Class code for codeception example test for WP Desk plugin activation.
|
8 |
-
*
|
9 |
-
* @package WPDesk\Codeception\Command
|
10 |
-
*/
|
11 |
-
class AcceptanceTestGenerator extends \FSVendor\Codeception\Lib\Generator\Test
|
12 |
-
{
|
13 |
-
protected $template = <<<EOF
|
14 |
-
<?php {{namespace}}
|
15 |
-
|
16 |
-
use WPDesk\\Codeception\\Tests\\Acceptance\\Cest\\AbstractCestForPluginActivation;
|
17 |
-
|
18 |
-
class {{name}} extends AbstractCestForPluginActivation {
|
19 |
-
|
20 |
-
\t/**
|
21 |
-
\t * Deactivate plugins before tests.
|
22 |
-
\t *
|
23 |
-
\t * @param AcceptanceTester \$i .
|
24 |
-
\t *
|
25 |
-
\t * @throws \\Codeception\\Exception\\ModuleException .
|
26 |
-
\t */
|
27 |
-
\tpublic function _before( \$i ) {
|
28 |
-
\t\t\$i->loginAsAdministrator();
|
29 |
-
\t\t\$i->amOnPluginsPage();
|
30 |
-
\t\t\$i->deactivatePlugin( \$this->getPluginSlug() );
|
31 |
-
\t\t\$i->amOnPluginsPage();
|
32 |
-
\t\t\$i->seePluginDeactivated( \$this->getPluginSlug() );
|
33 |
-
\t\t\$i->amOnPluginsPage();
|
34 |
-
\t\t\$i->deactivatePlugin( self::WOOCOMMERCE_PLUGIN_SLUG );
|
35 |
-
\t\t\$i->amOnPluginsPage();
|
36 |
-
\t\t\$i->seePluginDeactivated( self::WOOCOMMERCE_PLUGIN_SLUG );
|
37 |
-
\t}
|
38 |
-
|
39 |
-
\t/**
|
40 |
-
\t * Plugin activation.
|
41 |
-
\t *
|
42 |
-
\t * @param AcceptanceTester \$i .
|
43 |
-
\t *
|
44 |
-
\t * @throws \\Codeception\\Exception\\ModuleException .
|
45 |
-
\t */
|
46 |
-
\tpublic function pluginActivation( \$i ) {
|
47 |
-
|
48 |
-
\t\t\$i->loginAsAdministrator();
|
49 |
-
|
50 |
-
\t\t\$i->amOnPluginsPage();
|
51 |
-
\t\t\$i->seePluginDeactivated( \$this->getPluginSlug() );
|
52 |
-
|
53 |
-
\t\t// This is an example and you should change it to current plugin.
|
54 |
-
\t\t\$i->activateWPDeskPlugin(
|
55 |
-
\t\t\t\$this->getPluginSlug(),
|
56 |
-
\t\t\tarray( 'woocommerce' ),
|
57 |
-
\t\t\tarray( 'The “WooCommerce Fakturownia” plugin cannot run without WooCommerce active. Please install and activate WooCommerce plugin.' )
|
58 |
-
\t\t);
|
59 |
-
|
60 |
-
\t}
|
61 |
-
}
|
62 |
-
EOF;
|
63 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Codeception/Command/GeneratePluginActivation.php
DELETED
@@ -1,70 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FSVendor\WPDesk\Codeception\Command;
|
4 |
-
|
5 |
-
use FSVendor\Codeception\Command\GenerateTest;
|
6 |
-
use FSVendor\Codeception\CustomCommandInterface;
|
7 |
-
use FSVendor\Symfony\Component\Console\Input\InputInterface;
|
8 |
-
use FSVendor\Symfony\Component\Console\Output\OutputInterface;
|
9 |
-
/**
|
10 |
-
* Generates codeception example test for WP Desk plugin activation.
|
11 |
-
*
|
12 |
-
* @package WPDesk\Codeception\Command
|
13 |
-
*/
|
14 |
-
class GeneratePluginActivation extends \FSVendor\Codeception\Command\GenerateTest implements \FSVendor\Codeception\CustomCommandInterface
|
15 |
-
{
|
16 |
-
/**
|
17 |
-
* Get codeception command description.
|
18 |
-
*
|
19 |
-
* @return string
|
20 |
-
*/
|
21 |
-
public function getDescription()
|
22 |
-
{
|
23 |
-
return 'Generates plugin activation tests.';
|
24 |
-
}
|
25 |
-
/**
|
26 |
-
* Returns the name of the command.
|
27 |
-
*
|
28 |
-
* @return string
|
29 |
-
*/
|
30 |
-
public static function getCommandName()
|
31 |
-
{
|
32 |
-
return 'generate:activation';
|
33 |
-
}
|
34 |
-
/**
|
35 |
-
* Get generator class.
|
36 |
-
*
|
37 |
-
* @param array $config .
|
38 |
-
* @param string $class .
|
39 |
-
* @return AcceptanceTestGenerator
|
40 |
-
*/
|
41 |
-
protected function getGenerator($config, $class)
|
42 |
-
{
|
43 |
-
return new \FSVendor\WPDesk\Codeception\Command\AcceptanceTestGenerator($config, $class);
|
44 |
-
}
|
45 |
-
/**
|
46 |
-
* Execute command.
|
47 |
-
*
|
48 |
-
* @param InputInterface $input
|
49 |
-
* @param OutputInterface $output
|
50 |
-
*
|
51 |
-
* @return void
|
52 |
-
*/
|
53 |
-
public function execute(\FSVendor\Symfony\Component\Console\Input\InputInterface $input, \FSVendor\Symfony\Component\Console\Output\OutputInterface $output)
|
54 |
-
{
|
55 |
-
$suite = $input->getArgument('suite');
|
56 |
-
$class = $input->getArgument('class');
|
57 |
-
$config = $this->getSuiteConfig($suite);
|
58 |
-
$className = $this->getShortClassName($class);
|
59 |
-
$path = $this->createDirectoryFor($config['path'], $class);
|
60 |
-
$filename = $this->completeSuffix($className, 'Cest');
|
61 |
-
$filename = $path . $filename;
|
62 |
-
$gen = $this->getGenerator($config, $class);
|
63 |
-
$res = $this->createFile($filename, $gen->produce());
|
64 |
-
if (!$res) {
|
65 |
-
$output->writeln("<error>Test {$filename} already exists</error>");
|
66 |
-
return;
|
67 |
-
}
|
68 |
-
$output->writeln("<info>Test was created in {$filename}</info>");
|
69 |
-
}
|
70 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Codeception/Command/GenerateWooCommerce.php
DELETED
@@ -1,70 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FSVendor\WPDesk\Codeception\Command;
|
4 |
-
|
5 |
-
use FSVendor\Codeception\Command\GenerateTest;
|
6 |
-
use FSVendor\Codeception\CustomCommandInterface;
|
7 |
-
use FSVendor\Symfony\Component\Console\Input\InputInterface;
|
8 |
-
use FSVendor\Symfony\Component\Console\Output\OutputInterface;
|
9 |
-
/**
|
10 |
-
* Generates codeception example test for WP Desk plugin activation.
|
11 |
-
*
|
12 |
-
* @package WPDesk\Codeception\Command
|
13 |
-
*/
|
14 |
-
class GenerateWooCommerce extends \FSVendor\Codeception\Command\GenerateTest implements \FSVendor\Codeception\CustomCommandInterface
|
15 |
-
{
|
16 |
-
/**
|
17 |
-
* Get codeception command description.
|
18 |
-
*
|
19 |
-
* @return string
|
20 |
-
*/
|
21 |
-
public function getDescription()
|
22 |
-
{
|
23 |
-
return 'Generates woocommerce tests.';
|
24 |
-
}
|
25 |
-
/**
|
26 |
-
* Returns the name of the command.
|
27 |
-
*
|
28 |
-
* @return string
|
29 |
-
*/
|
30 |
-
public static function getCommandName()
|
31 |
-
{
|
32 |
-
return 'generate:woocommerce';
|
33 |
-
}
|
34 |
-
/**
|
35 |
-
* Get generator class.
|
36 |
-
*
|
37 |
-
* @param array $config .
|
38 |
-
* @param string $class .
|
39 |
-
* @return WooCommerceTestGenerator
|
40 |
-
*/
|
41 |
-
protected function getGenerator($config, $class)
|
42 |
-
{
|
43 |
-
return new \FSVendor\WPDesk\Codeception\Command\WooCommerceTestGenerator($config, $class);
|
44 |
-
}
|
45 |
-
/**
|
46 |
-
* Execute command.
|
47 |
-
*
|
48 |
-
* @param InputInterface $input
|
49 |
-
* @param OutputInterface $output
|
50 |
-
*
|
51 |
-
* @return void
|
52 |
-
*/
|
53 |
-
public function execute(\FSVendor\Symfony\Component\Console\Input\InputInterface $input, \FSVendor\Symfony\Component\Console\Output\OutputInterface $output)
|
54 |
-
{
|
55 |
-
$suite = $input->getArgument('suite');
|
56 |
-
$class = $input->getArgument('class');
|
57 |
-
$config = $this->getSuiteConfig($suite);
|
58 |
-
$className = $this->getShortClassName($class);
|
59 |
-
$path = $this->createDirectoryFor($config['path'], $class);
|
60 |
-
$filename = $this->completeSuffix($className, 'Cest');
|
61 |
-
$filename = $path . $filename;
|
62 |
-
$gen = $this->getGenerator($config, $class);
|
63 |
-
$res = $this->createFile($filename, $gen->produce());
|
64 |
-
if (!$res) {
|
65 |
-
$output->writeln("<error>Test {$filename} already exists</error>");
|
66 |
-
return;
|
67 |
-
}
|
68 |
-
$output->writeln("<info>Test was created in {$filename}</info>");
|
69 |
-
}
|
70 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Codeception/Command/WooCommerceTestGenerator.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FSVendor\WPDesk\Codeception\Command;
|
4 |
-
|
5 |
-
use FSVendor\Codeception\Lib\Generator\Test;
|
6 |
-
/**
|
7 |
-
* Class code for codeception example test for WP Desk plugin activation.
|
8 |
-
*
|
9 |
-
* @package WPDesk\Codeception\Command
|
10 |
-
*/
|
11 |
-
class WooCommerceTestGenerator extends \FSVendor\Codeception\Lib\Generator\Test
|
12 |
-
{
|
13 |
-
protected $template = <<<EOF
|
14 |
-
<?php {{namespace}}
|
15 |
-
|
16 |
-
use WPDesk\\Codeception\\Tests\\Acceptance\\Cest\\AbstractCestForWooCommerce;
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Common WooCommerce tests.
|
20 |
-
*/
|
21 |
-
class {{name}} extends AbstractCestForWooCommerce {
|
22 |
-
|
23 |
-
}
|
24 |
-
EOF;
|
25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/CommandProvider.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FSVendor\WPDesk\Composer\Codeception;
|
4 |
-
|
5 |
-
use FSVendor\WPDesk\Composer\Codeception\Commands\CreateCodeceptionTests;
|
6 |
-
use FSVendor\WPDesk\Composer\Codeception\Commands\PrepareCodeceptionDb;
|
7 |
-
use FSVendor\WPDesk\Composer\Codeception\Commands\PrepareLocalCodeceptionTests;
|
8 |
-
use FSVendor\WPDesk\Composer\Codeception\Commands\PrepareLocalCodeceptionTestsWithCoverage;
|
9 |
-
use FSVendor\WPDesk\Composer\Codeception\Commands\PrepareParallelCodeceptionTests;
|
10 |
-
use FSVendor\WPDesk\Composer\Codeception\Commands\PrepareWordpressForCodeception;
|
11 |
-
use FSVendor\WPDesk\Composer\Codeception\Commands\RunCodeceptionTests;
|
12 |
-
use FSVendor\WPDesk\Composer\Codeception\Commands\RunLocalCodeceptionTests;
|
13 |
-
use FSVendor\WPDesk\Composer\Codeception\Commands\RunLocalCodeceptionTestsWithCoverage;
|
14 |
-
/**
|
15 |
-
* Links plugin commands handlers to composer.
|
16 |
-
*/
|
17 |
-
class CommandProvider implements \FSVendor\Composer\Plugin\Capability\CommandProvider
|
18 |
-
{
|
19 |
-
public function getCommands()
|
20 |
-
{
|
21 |
-
return [new \FSVendor\WPDesk\Composer\Codeception\Commands\CreateCodeceptionTests(), new \FSVendor\WPDesk\Composer\Codeception\Commands\RunCodeceptionTests(), new \FSVendor\WPDesk\Composer\Codeception\Commands\RunLocalCodeceptionTests(), new \FSVendor\WPDesk\Composer\Codeception\Commands\RunLocalCodeceptionTestsWithCoverage(), new \FSVendor\WPDesk\Composer\Codeception\Commands\PrepareCodeceptionDb(), new \FSVendor\WPDesk\Composer\Codeception\Commands\PrepareWordpressForCodeception(), new \FSVendor\WPDesk\Composer\Codeception\Commands\PrepareLocalCodeceptionTests(), new \FSVendor\WPDesk\Composer\Codeception\Commands\PrepareLocalCodeceptionTestsWithCoverage(), new \FSVendor\WPDesk\Composer\Codeception\Commands\PrepareParallelCodeceptionTests()];
|
22 |
-
}
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/BaseCommand.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FSVendor\WPDesk\Composer\Codeception\Commands;
|
4 |
-
|
5 |
-
use FSVendor\Composer\Command\BaseCommand as CodeceptionBaseCommand;
|
6 |
-
use FSVendor\Symfony\Component\Console\Output\OutputInterface;
|
7 |
-
/**
|
8 |
-
* Base for commands - declares common methods.
|
9 |
-
*
|
10 |
-
* @package WPDesk\Composer\Codeception\Commands
|
11 |
-
*/
|
12 |
-
abstract class BaseCommand extends \FSVendor\Composer\Command\BaseCommand
|
13 |
-
{
|
14 |
-
/**
|
15 |
-
* @param string $command
|
16 |
-
* @param OutputInterface $output
|
17 |
-
*/
|
18 |
-
protected function execAndOutput($command, \FSVendor\Symfony\Component\Console\Output\OutputInterface $output)
|
19 |
-
{
|
20 |
-
\passthru($command);
|
21 |
-
}
|
22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/Configuration.php
DELETED
@@ -1,360 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class Env
|
5 |
-
* @package WPDesk\Composer\Codeception\Commands
|
6 |
-
*/
|
7 |
-
namespace FSVendor\WPDesk\Composer\Codeception\Commands;
|
8 |
-
|
9 |
-
use FSVendor\Dotenv\Dotenv;
|
10 |
-
/**
|
11 |
-
* Env.
|
12 |
-
*/
|
13 |
-
class Configuration
|
14 |
-
{
|
15 |
-
const MYSQL_IP = 'MYSQL_IP';
|
16 |
-
const MYSQL_DBNAME = 'MYSQL_DBNAME';
|
17 |
-
const MYSQL_DBUSER = 'MYSQL_DBUSER';
|
18 |
-
const MYSQL_DBPASSWORD = 'MYSQL_DBPASSWORD';
|
19 |
-
const APACHE_DOCUMENT_ROOT = 'APACHE_DOCUMENT_ROOT';
|
20 |
-
const WOOTESTS_IP = 'WOOTESTS_IP';
|
21 |
-
const DEPENDENT_PLUGINS_DIR = 'DEPENDENT_PLUGINS_DIR';
|
22 |
-
/**
|
23 |
-
* @var string
|
24 |
-
*/
|
25 |
-
private $apache_document_root;
|
26 |
-
/**
|
27 |
-
* @var string
|
28 |
-
*/
|
29 |
-
private $wptests_ip;
|
30 |
-
/**
|
31 |
-
* @var string
|
32 |
-
*/
|
33 |
-
private $dbhost;
|
34 |
-
/**
|
35 |
-
* @var string
|
36 |
-
*/
|
37 |
-
private $dbname;
|
38 |
-
/**
|
39 |
-
* @var string
|
40 |
-
*/
|
41 |
-
private $dbuser;
|
42 |
-
/**
|
43 |
-
* @var string
|
44 |
-
*/
|
45 |
-
private $dbpassword;
|
46 |
-
/**
|
47 |
-
* @var string
|
48 |
-
*/
|
49 |
-
private $dependent_plugins_dir;
|
50 |
-
/**
|
51 |
-
* @var string
|
52 |
-
*/
|
53 |
-
private $plugin_slug;
|
54 |
-
/**
|
55 |
-
* @var string
|
56 |
-
*/
|
57 |
-
private $plugin_dir;
|
58 |
-
/**
|
59 |
-
* @var string
|
60 |
-
*/
|
61 |
-
private $plugin_file;
|
62 |
-
/**
|
63 |
-
* @var string
|
64 |
-
*/
|
65 |
-
private $plugin_title;
|
66 |
-
/**
|
67 |
-
* @var string
|
68 |
-
*/
|
69 |
-
private $plugin_product_id;
|
70 |
-
/**
|
71 |
-
* @var array
|
72 |
-
*/
|
73 |
-
private $repository_plugins;
|
74 |
-
/**
|
75 |
-
* @var array
|
76 |
-
*/
|
77 |
-
private $local_plugins;
|
78 |
-
/**
|
79 |
-
* @var array
|
80 |
-
*/
|
81 |
-
private $activate_plugins;
|
82 |
-
/**
|
83 |
-
* @var array
|
84 |
-
*/
|
85 |
-
private $prepare_database;
|
86 |
-
/**
|
87 |
-
* @var array
|
88 |
-
*/
|
89 |
-
private $theme_files;
|
90 |
-
/**
|
91 |
-
* Configuration constructor.
|
92 |
-
*
|
93 |
-
* @param $apache_document_root
|
94 |
-
* @param $wptests_ip
|
95 |
-
* @param $dbhost
|
96 |
-
* @param $dbname
|
97 |
-
* @param $dbuser
|
98 |
-
* @param $dbpassword
|
99 |
-
* @param $dependent_plugins_dir
|
100 |
-
* @param $plugin_slug
|
101 |
-
* @param $plugin_dir
|
102 |
-
* @param $plugin_file
|
103 |
-
* @param $plugin_title
|
104 |
-
* @param $plugin_product_id
|
105 |
-
* @param $repository_plugins
|
106 |
-
* @param $local_plugins
|
107 |
-
* @param $activate_plugins
|
108 |
-
* @param $prepare_database
|
109 |
-
* @param $theme_files
|
110 |
-
*/
|
111 |
-
public function __construct($apache_document_root, $wptests_ip, $dbhost, $dbname, $dbuser, $dbpassword, $dependent_plugins_dir, $plugin_slug, $plugin_dir, $plugin_file, $plugin_title, $plugin_product_id, $repository_plugins, $local_plugins, $activate_plugins, $prepare_database, $theme_files)
|
112 |
-
{
|
113 |
-
$this->apache_document_root = $apache_document_root;
|
114 |
-
$this->wptests_ip = $wptests_ip;
|
115 |
-
$this->dbhost = $dbhost;
|
116 |
-
$this->dbname = $dbname;
|
117 |
-
$this->dbuser = $dbuser;
|
118 |
-
$this->dbpassword = $dbpassword;
|
119 |
-
$this->dependent_plugins_dir = $dependent_plugins_dir;
|
120 |
-
$this->plugin_slug = $plugin_slug;
|
121 |
-
$this->plugin_dir = $plugin_dir;
|
122 |
-
$this->plugin_file = $plugin_file;
|
123 |
-
$this->plugin_title = $plugin_title;
|
124 |
-
$this->plugin_product_id = $plugin_product_id;
|
125 |
-
$this->repository_plugins = $repository_plugins;
|
126 |
-
$this->local_plugins = $local_plugins;
|
127 |
-
$this->activate_plugins = $activate_plugins;
|
128 |
-
$this->prepare_database = $prepare_database;
|
129 |
-
$this->theme_files = $theme_files;
|
130 |
-
}
|
131 |
-
/**
|
132 |
-
* @return string
|
133 |
-
*/
|
134 |
-
public function getApacheDocumentRoot()
|
135 |
-
{
|
136 |
-
return $this->apache_document_root;
|
137 |
-
}
|
138 |
-
/**
|
139 |
-
* @return string
|
140 |
-
*/
|
141 |
-
public function getWptestsIp()
|
142 |
-
{
|
143 |
-
return $this->wptests_ip;
|
144 |
-
}
|
145 |
-
/**
|
146 |
-
* @return string
|
147 |
-
*/
|
148 |
-
public function getDbhost()
|
149 |
-
{
|
150 |
-
return $this->dbhost;
|
151 |
-
}
|
152 |
-
/**
|
153 |
-
* @return string
|
154 |
-
*/
|
155 |
-
public function getDbname()
|
156 |
-
{
|
157 |
-
return $this->dbname;
|
158 |
-
}
|
159 |
-
/**
|
160 |
-
* @return string
|
161 |
-
*/
|
162 |
-
public function getDbuser()
|
163 |
-
{
|
164 |
-
return $this->dbuser;
|
165 |
-
}
|
166 |
-
/**
|
167 |
-
* @return string
|
168 |
-
*/
|
169 |
-
public function getDbpassword()
|
170 |
-
{
|
171 |
-
return $this->dbpassword;
|
172 |
-
}
|
173 |
-
/**
|
174 |
-
* @return string
|
175 |
-
*/
|
176 |
-
public function getDependentPluginsDir()
|
177 |
-
{
|
178 |
-
return $this->dependent_plugins_dir;
|
179 |
-
}
|
180 |
-
/**
|
181 |
-
* @return string
|
182 |
-
*/
|
183 |
-
public function getPluginSlug()
|
184 |
-
{
|
185 |
-
return $this->plugin_slug;
|
186 |
-
}
|
187 |
-
/**
|
188 |
-
* @return string
|
189 |
-
*/
|
190 |
-
public function getPluginDir()
|
191 |
-
{
|
192 |
-
return $this->plugin_dir;
|
193 |
-
}
|
194 |
-
/**
|
195 |
-
* @return string
|
196 |
-
*/
|
197 |
-
public function getPluginFile()
|
198 |
-
{
|
199 |
-
return $this->plugin_file;
|
200 |
-
}
|
201 |
-
/**
|
202 |
-
* @return string
|
203 |
-
*/
|
204 |
-
public function getPluginTitle()
|
205 |
-
{
|
206 |
-
return $this->plugin_title;
|
207 |
-
}
|
208 |
-
/**
|
209 |
-
* @return string
|
210 |
-
*/
|
211 |
-
public function getPluginProductId()
|
212 |
-
{
|
213 |
-
return $this->plugin_product_id;
|
214 |
-
}
|
215 |
-
/**
|
216 |
-
* @return array
|
217 |
-
*/
|
218 |
-
public function getRepositoryPlugins()
|
219 |
-
{
|
220 |
-
return $this->repository_plugins;
|
221 |
-
}
|
222 |
-
/**
|
223 |
-
* @return array
|
224 |
-
*/
|
225 |
-
public function getLocalPlugins()
|
226 |
-
{
|
227 |
-
return $this->local_plugins;
|
228 |
-
}
|
229 |
-
/**
|
230 |
-
* @return array
|
231 |
-
*/
|
232 |
-
public function getActivatePlugins()
|
233 |
-
{
|
234 |
-
return $this->activate_plugins;
|
235 |
-
}
|
236 |
-
/**
|
237 |
-
* @return array
|
238 |
-
*/
|
239 |
-
public function getPrepareDatabase()
|
240 |
-
{
|
241 |
-
return $this->prepare_database;
|
242 |
-
}
|
243 |
-
/**
|
244 |
-
* @return array
|
245 |
-
*/
|
246 |
-
public function getThemeFiles()
|
247 |
-
{
|
248 |
-
return $this->theme_files;
|
249 |
-
}
|
250 |
-
/**
|
251 |
-
* Set env variables from configuration.
|
252 |
-
*/
|
253 |
-
public function prepareEnvForConfiguration()
|
254 |
-
{
|
255 |
-
$this->putEnv('WPDESK_PLUGIN_SLUG', $this->getPluginSlug());
|
256 |
-
$this->putEnv('WPDESK_PLUGIN_FILE', $this->getPluginFile());
|
257 |
-
$this->putEnv('WPDESK_PLUGIN_TITLE', $this->getPluginTitle());
|
258 |
-
$this->putEnv('WPDESK_PLUGIN_PRODUCT_ID', $this->getPluginProductId());
|
259 |
-
}
|
260 |
-
/**
|
261 |
-
* @param string $env_variable
|
262 |
-
* @param string $value
|
263 |
-
*
|
264 |
-
* @return string
|
265 |
-
*/
|
266 |
-
private function putEnv($env_variable, $value)
|
267 |
-
{
|
268 |
-
\putenv($env_variable . '=' . $value);
|
269 |
-
}
|
270 |
-
/**
|
271 |
-
* @param array $configuration .
|
272 |
-
*
|
273 |
-
* @return Configuration
|
274 |
-
*/
|
275 |
-
public static function createFromEnvAndConfiguration(array $configuration)
|
276 |
-
{
|
277 |
-
$dotenv = \FSVendor\Dotenv\Dotenv::createImmutable(\getcwd() . '/../');
|
278 |
-
$dotenv->safeLoad();
|
279 |
-
$apache_document_root = self::prepareFromEnv(self::APACHE_DOCUMENT_ROOT, self::prepareApacheDocumentRoot());
|
280 |
-
$wptests_ip = self::prepareFromEnv(self::WOOTESTS_IP, 'wptests.lh');
|
281 |
-
$dbhost = self::prepareFromEnv(self::MYSQL_IP, 'mysqltests');
|
282 |
-
$dbname = self::prepareFromEnv(self::MYSQL_DBNAME, 'wptest');
|
283 |
-
$dbuser = self::prepareFromEnv(self::MYSQL_DBUSER, 'mysql');
|
284 |
-
$dbpassword = self::prepareFromEnv(self::MYSQL_DBPASSWORD, 'mysql');
|
285 |
-
$dependent_plugins_dir = self::prepareFromEnv(self::DEPENDENT_PLUGINS_DIR, '../');
|
286 |
-
if (isset($configuration['plugin-slug'])) {
|
287 |
-
$plugin_slug = $configuration['plugin-slug'];
|
288 |
-
} else {
|
289 |
-
throw new \FSVendor\WPDesk\Composer\Codeception\Commands\SettingsException('Missing plugin-slug setting!');
|
290 |
-
}
|
291 |
-
if (isset($configuration['plugin-file'])) {
|
292 |
-
$plugin_file = $configuration['plugin-file'];
|
293 |
-
} else {
|
294 |
-
throw new \FSVendor\WPDesk\Composer\Codeception\Commands\SettingsException('Missing plugin-file setting!');
|
295 |
-
}
|
296 |
-
$plugin_file_exploded = \explode('/', $plugin_file);
|
297 |
-
$plugin_dir = $plugin_file_exploded[0];
|
298 |
-
if (isset($configuration['plugin-title'])) {
|
299 |
-
$plugin_title = $configuration['plugin-title'];
|
300 |
-
} else {
|
301 |
-
throw new \FSVendor\WPDesk\Composer\Codeception\Commands\SettingsException('Missing plugin-title setting!');
|
302 |
-
}
|
303 |
-
if (isset($configuration['plugin-product-id'])) {
|
304 |
-
$plugin_product_id = $configuration['plugin-product-id'];
|
305 |
-
} else {
|
306 |
-
$plugin_product_id = '';
|
307 |
-
}
|
308 |
-
$prepare_database = array();
|
309 |
-
if (isset($configuration['prepare-database']) && \is_array($configuration['prepare-database'])) {
|
310 |
-
$prepare_database = $configuration['prepare-database'];
|
311 |
-
}
|
312 |
-
$theme_files = array();
|
313 |
-
if (isset($configuration['theme-files']) && \is_array($configuration['theme-files'])) {
|
314 |
-
$theme_files = $configuration['theme-files'];
|
315 |
-
}
|
316 |
-
$repository_plugins = self::getPluginsSettings($configuration, 'repository');
|
317 |
-
$local_plugins = self::getPluginsSettings($configuration, 'local');
|
318 |
-
$activate_plugins = self::getPluginsSettings($configuration, 'activate');
|
319 |
-
return new self($apache_document_root, $wptests_ip, $dbhost, $dbname, $dbuser, $dbpassword, $dependent_plugins_dir, $plugin_slug, $plugin_dir, $plugin_file, $plugin_title, $plugin_product_id, $repository_plugins, $local_plugins, $activate_plugins, $prepare_database, $theme_files);
|
320 |
-
}
|
321 |
-
/**
|
322 |
-
* @param string $env_variable .
|
323 |
-
* @param string $default_value .
|
324 |
-
*
|
325 |
-
* @return string
|
326 |
-
*/
|
327 |
-
private static function prepareFromEnv($env_variable, $default_value)
|
328 |
-
{
|
329 |
-
$value = \getenv($env_variable);
|
330 |
-
$value = $value ? $value : $default_value;
|
331 |
-
return $value;
|
332 |
-
}
|
333 |
-
/**
|
334 |
-
* @return string
|
335 |
-
*/
|
336 |
-
private static function prepareApacheDocumentRoot()
|
337 |
-
{
|
338 |
-
return self::isWindows() ? 'c:\\xampp\\htdocs\\wptests' : '/tmp/wptests';
|
339 |
-
}
|
340 |
-
/**
|
341 |
-
* @return bool
|
342 |
-
*/
|
343 |
-
public static function isWindows()
|
344 |
-
{
|
345 |
-
return \false !== \stristr(\PHP_OS, 'WIN') && \false === \stristr(\PHP_OS, 'DARWIN');
|
346 |
-
}
|
347 |
-
/**
|
348 |
-
* @param array $configuration .
|
349 |
-
* @param string $plugins_section .
|
350 |
-
*
|
351 |
-
* @return array
|
352 |
-
*/
|
353 |
-
private static function getPluginsSettings(array $configuration, $plugins_section)
|
354 |
-
{
|
355 |
-
if (\is_array($configuration) && isset($configuration['plugins'], $configuration['plugins'][$plugins_section]) && \is_array($configuration['plugins'][$plugins_section])) {
|
356 |
-
return $configuration['plugins'][$plugins_section];
|
357 |
-
}
|
358 |
-
return array();
|
359 |
-
}
|
360 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/CreateCodeceptionTests.php
DELETED
@@ -1,116 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FSVendor\WPDesk\Composer\Codeception\Commands;
|
4 |
-
|
5 |
-
use FSVendor\Composer\Downloader\FilesystemException;
|
6 |
-
use FSVendor\Symfony\Component\Console\Input\InputInterface;
|
7 |
-
use FSVendor\Symfony\Component\Console\Output\OutputInterface;
|
8 |
-
/**
|
9 |
-
* Codeception tests creator command.
|
10 |
-
*
|
11 |
-
* @package WPDesk\Composer\Codeception\Commands
|
12 |
-
*/
|
13 |
-
class CreateCodeceptionTests extends \FSVendor\WPDesk\Composer\Codeception\Commands\BaseCommand
|
14 |
-
{
|
15 |
-
use SedTrait;
|
16 |
-
/**
|
17 |
-
* Configure command.
|
18 |
-
*/
|
19 |
-
protected function configure()
|
20 |
-
{
|
21 |
-
parent::configure();
|
22 |
-
$this->setName('create-codeception-tests')->setDescription('Create codeception tests directories and files.');
|
23 |
-
}
|
24 |
-
/**
|
25 |
-
* Copy file.
|
26 |
-
*
|
27 |
-
* @param string $source
|
28 |
-
* @param string $dest
|
29 |
-
* @param string $exceptionMessage
|
30 |
-
* @throws FilesystemException
|
31 |
-
*/
|
32 |
-
private function copy($source, $dest, $exceptionMessage)
|
33 |
-
{
|
34 |
-
if (!\copy($source, $dest)) {
|
35 |
-
throw new \FSVendor\Composer\Downloader\FilesystemException($exceptionMessage);
|
36 |
-
}
|
37 |
-
}
|
38 |
-
/**
|
39 |
-
* Copy configuration files.
|
40 |
-
*
|
41 |
-
* @param $codeceptionDir
|
42 |
-
* @param $testsDir
|
43 |
-
* @param $codeceptionYml
|
44 |
-
* @param $envConfig
|
45 |
-
* @param $acceptanceYml
|
46 |
-
* @param $bootstrapScript
|
47 |
-
* @return void
|
48 |
-
* @throws FilesystemException
|
49 |
-
*/
|
50 |
-
private function copyConfigurationFiles($codeceptionDir, $testsDir, $codeceptionYml, $envConfig, $acceptanceYml, $bootstrapScript)
|
51 |
-
{
|
52 |
-
if (!\file_exists('./' . $codeceptionYml)) {
|
53 |
-
$this->copy('./vendor/wpdesk/wp-codeception/configuration/' . $codeceptionYml, './' . $codeceptionYml, 'Error copying codeception configuration file!');
|
54 |
-
}
|
55 |
-
if (!\file_exists('./' . $envConfig)) {
|
56 |
-
$this->copy('./vendor/wpdesk/wp-codeception/configuration/' . $envConfig, './' . $envConfig, 'Error copying codeception env configuration file!');
|
57 |
-
}
|
58 |
-
if (\file_exists($testsDir . '/' . $acceptanceYml)) {
|
59 |
-
\unlink($testsDir . '/' . $acceptanceYml);
|
60 |
-
}
|
61 |
-
$this->copy('./vendor/wpdesk/wp-codeception/configuration/' . $acceptanceYml, $testsDir . '/' . $acceptanceYml, 'Error copying codeception acceptance configuration file!');
|
62 |
-
if (!\file_exists($codeceptionDir . '/' . $bootstrapScript)) {
|
63 |
-
$this->copy('./vendor/wpdesk/wp-codeception/scripts/' . $bootstrapScript, $codeceptionDir . '/' . $bootstrapScript, 'Error copying codeception bootstrap script file!');
|
64 |
-
}
|
65 |
-
if (!@\file_exists($testsDir . '/_output')) {
|
66 |
-
\mkdir($testsDir . '/_output', 0777, \true);
|
67 |
-
}
|
68 |
-
if (!\file_exists($testsDir . '/_output/.gitignore')) {
|
69 |
-
$this->copy('./vendor/wpdesk/wp-codeception/configuration/_output.gitignore', $testsDir . '/_output/.gitignore', 'Error copying codeception acceptance output .gitignore file!');
|
70 |
-
}
|
71 |
-
if (!@\file_exists($testsDir . '/_support/_generated')) {
|
72 |
-
\mkdir($testsDir . '/_support/_generated', 0777, \true);
|
73 |
-
}
|
74 |
-
if (!\file_exists($testsDir . '/_support/_generated/.gitignore')) {
|
75 |
-
$this->copy('./vendor/wpdesk/wp-codeception/configuration/_generated.gitignore', $testsDir . '/_support/_generated/.gitignore', 'Error copying codeception acceptance output .gitignore file!');
|
76 |
-
}
|
77 |
-
}
|
78 |
-
/**
|
79 |
-
* Inject traits into tester class.
|
80 |
-
*
|
81 |
-
* @param string $testsDir
|
82 |
-
* @return void
|
83 |
-
*/
|
84 |
-
private function injectTraitsIntoTesterClass($testsDir)
|
85 |
-
{
|
86 |
-
$file_pattern = $testsDir . '/_support/AcceptanceTester.php';
|
87 |
-
$pattern = "/use _generated\\\\AcceptanceTesterActions;/";
|
88 |
-
$replace = "use _generated\\AcceptanceTesterActions;\n" . "\n\tuse \\WPDesk\\Codeception\\Tests\\Acceptance\\Tester\\TesterWordpressActions;" . "\n\tuse \\WPDesk\\Codeception\\Tests\\Acceptance\\Tester\\TesterWooCommerceActions;" . "\n\tuse \\WPDesk\\Codeception\\Tests\\Acceptance\\Tester\\TesterWPDeskActions;";
|
89 |
-
$this->wpdeskSed($file_pattern, $pattern, $replace);
|
90 |
-
}
|
91 |
-
/**
|
92 |
-
* Execute command.
|
93 |
-
*
|
94 |
-
* @param InputInterface $input
|
95 |
-
* @param OutputInterface $output
|
96 |
-
* @return void
|
97 |
-
* @throws FilesystemException
|
98 |
-
*/
|
99 |
-
protected function execute(\FSVendor\Symfony\Component\Console\Input\InputInterface $input, \FSVendor\Symfony\Component\Console\Output\OutputInterface $output)
|
100 |
-
{
|
101 |
-
$codeceptionDir = './tests/codeception';
|
102 |
-
$testsDir = $codeceptionDir . '/tests';
|
103 |
-
$codeceptionYml = 'codeception.dist.yml';
|
104 |
-
$envConfig = '.env.testing';
|
105 |
-
$acceptanceYml = 'acceptance.suite.yml';
|
106 |
-
$bootstrapScript = 'bootstrap.sh';
|
107 |
-
if (!@\file_exists($testsDir)) {
|
108 |
-
\mkdir($testsDir, 0777, \true);
|
109 |
-
}
|
110 |
-
$this->copyConfigurationFiles($codeceptionDir, $testsDir, $codeceptionYml, $envConfig, $acceptanceYml, $bootstrapScript);
|
111 |
-
$this->execAndOutput('./vendor/bin/codecept bootstrap ' . $codeceptionDir, $output);
|
112 |
-
$this->execAndOutput('./vendor/bin/codecept generate:activation acceptance ActivationCest', $output);
|
113 |
-
$this->execAndOutput('./vendor/bin/codecept generate:woocommerce acceptance WooCommerceCest', $output);
|
114 |
-
$this->injectTraitsIntoTesterClass($testsDir);
|
115 |
-
}
|
116 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/LocalCodeceptionTrait.php
DELETED
@@ -1,256 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FSVendor\WPDesk\Composer\Codeception\Commands;
|
4 |
-
|
5 |
-
use FSVendor\Composer\Downloader\FilesystemException;
|
6 |
-
use FSVendor\Symfony\Component\Console\Input\InputInterface;
|
7 |
-
use FSVendor\Symfony\Component\Console\Output\OutputInterface;
|
8 |
-
use FSVendor\Symfony\Component\Yaml\Exception\ParseException;
|
9 |
-
use FSVendor\Symfony\Component\Yaml\Yaml;
|
10 |
-
/**
|
11 |
-
* Common methods for local Codeception tests.
|
12 |
-
*/
|
13 |
-
trait LocalCodeceptionTrait
|
14 |
-
{
|
15 |
-
private function getWpDeskConfiguration()
|
16 |
-
{
|
17 |
-
try {
|
18 |
-
$wpdesk_configuration = \FSVendor\Symfony\Component\Yaml\Yaml::parseFile(\getcwd() . '/tests/codeception/wpdesk.yml');
|
19 |
-
} catch (\FSVendor\Symfony\Component\Yaml\Exception\ParseException $e) {
|
20 |
-
$wpdesk_configuration = array();
|
21 |
-
}
|
22 |
-
return \FSVendor\WPDesk\Composer\Codeception\Commands\Configuration::createFromEnvAndConfiguration($wpdesk_configuration);
|
23 |
-
}
|
24 |
-
/**
|
25 |
-
* @param OutputInterface $output
|
26 |
-
* @param Configuration $configuration
|
27 |
-
*/
|
28 |
-
private function prepareWpConfig(\FSVendor\Symfony\Component\Console\Output\OutputInterface $output, \FSVendor\WPDesk\Composer\Codeception\Commands\Configuration $configuration)
|
29 |
-
{
|
30 |
-
$apache_document_root = $configuration->getApacheDocumentRoot();
|
31 |
-
$this->executeWpCliAndOutput('config set WP_DEBUG true --raw', $output, $apache_document_root);
|
32 |
-
$this->executeWpCliAndOutput('config set WP_DEBUG_LOG true --raw', $output, $apache_document_root);
|
33 |
-
$this->executeWpCliAndOutput('config set WP_DEBUG_DISPLAY false --raw', $output, $apache_document_root);
|
34 |
-
$this->executeWpCliAndOutput('config set WP_HOME http://' . $configuration->getWptestsIp(), $output, $apache_document_root);
|
35 |
-
$this->executeWpCliAndOutput('config set WP_SITEURL http://' . $configuration->getWptestsIp(), $output, $apache_document_root);
|
36 |
-
$this->executeWpCliAndOutput('config set WP_AUTO_UPDATE_CORE false --raw', $output, $apache_document_root);
|
37 |
-
$this->executeWpCliAndOutput('config set AUTOMATIC_UPDATER_DISABLED false --raw', $output, $apache_document_root);
|
38 |
-
$this->executeWpCliAndOutput('rewrite structure \'/%postname%/\'', $output, $apache_document_root);
|
39 |
-
}
|
40 |
-
/**
|
41 |
-
* @param OutputInterface $output
|
42 |
-
* @param Configuration $configuration
|
43 |
-
*/
|
44 |
-
private function activatePlugins(\FSVendor\Symfony\Component\Console\Output\OutputInterface $output, \FSVendor\WPDesk\Composer\Codeception\Commands\Configuration $configuration)
|
45 |
-
{
|
46 |
-
$this->executeWpCliAndOutput('plugin deactivate --all', $output, $configuration->getApacheDocumentRoot());
|
47 |
-
$plugins = '';
|
48 |
-
foreach ($configuration->getRepositoryPlugins() as $plugin) {
|
49 |
-
$plugins .= ' ' . $plugin;
|
50 |
-
}
|
51 |
-
if ($plugins) {
|
52 |
-
$this->executeWpCliAndOutput('plugin install ' . $plugins, $output, $configuration->getApacheDocumentRoot());
|
53 |
-
}
|
54 |
-
foreach ($configuration->getLocalPlugins() as $plugin) {
|
55 |
-
$source = $this->preparePathForRsync($this->prepareLocalPluginDir($plugin, $configuration->getDependentPluginsDir()) . '/*', $configuration::isWindows());
|
56 |
-
$target = $this->preparePathForRsync($this->prepareTargetDir($plugin, $configuration) . '/', $configuration::isWindows());
|
57 |
-
$rsync = 'rsync -a ' . $source . ' ' . $target . ' --exclude=node_modules --exclude=.git --exclude=tests --exclude=.idea';
|
58 |
-
$output->writeln($rsync);
|
59 |
-
$this->execAndOutput($rsync, $output);
|
60 |
-
}
|
61 |
-
foreach ($configuration->getActivatePlugins() as $plugin) {
|
62 |
-
$this->executeWpCliAndOutput('plugin activate ' . $plugin, $output, $configuration->getApacheDocumentRoot());
|
63 |
-
}
|
64 |
-
$this->executeWpCliAndOutput('plugin activate ' . $configuration->getPluginDir(), $output, $configuration->getApacheDocumentRoot());
|
65 |
-
}
|
66 |
-
/**
|
67 |
-
* @param string $plugin .
|
68 |
-
*/
|
69 |
-
private function prepareLocalPluginDir($plugin, $local_plugins_dir = \false)
|
70 |
-
{
|
71 |
-
if (!$local_plugins_dir) {
|
72 |
-
$local_plugins_dir = \dirname(\getcwd());
|
73 |
-
}
|
74 |
-
return $this->trailingslashit($local_plugins_dir) . $plugin;
|
75 |
-
}
|
76 |
-
/**
|
77 |
-
* @param $string
|
78 |
-
*
|
79 |
-
* @return string
|
80 |
-
*/
|
81 |
-
private function trailingslashit($string)
|
82 |
-
{
|
83 |
-
return \rtrim($string, '/\\') . '/';
|
84 |
-
}
|
85 |
-
/**
|
86 |
-
* @param string $command
|
87 |
-
* @param OutputInterface $output
|
88 |
-
* @param string $apache_document_root
|
89 |
-
*/
|
90 |
-
private function executeWpCliAndOutput($command, \FSVendor\Symfony\Component\Console\Output\OutputInterface $output, $apache_document_root)
|
91 |
-
{
|
92 |
-
$output->write("WPCLI: {$command}\n");
|
93 |
-
$sep = \DIRECTORY_SEPARATOR;
|
94 |
-
$wp = "php vendor{$sep}wp-cli{$sep}wp-cli{$sep}php{$sep}boot-fs.php";
|
95 |
-
$command = $wp . ' ' . $command . ' --allow-root --path=' . $apache_document_root;
|
96 |
-
$this->execAndOutput($command, $output);
|
97 |
-
}
|
98 |
-
/**
|
99 |
-
* @param string $plugin_dir
|
100 |
-
* @param OutputInterface $output
|
101 |
-
* @param Configuration $configuration
|
102 |
-
* @param bool $coverage
|
103 |
-
*/
|
104 |
-
private function installPlugin(string $plugin_dir, \FSVendor\Symfony\Component\Console\Output\OutputInterface $output, \FSVendor\WPDesk\Composer\Codeception\Commands\Configuration $configuration, bool $coverage = \true)
|
105 |
-
{
|
106 |
-
$source = $this->preparePathForRsync(\getcwd() . '/*', $configuration::isWindows());
|
107 |
-
$target = $this->preparePathForRsync($this->prepareTargetDir($plugin_dir, $configuration) . '/', $configuration::isWindows());
|
108 |
-
$rsync = 'rsync -av ' . $source . ' ' . $target . ' --exclude=node_modules --exclude=.git --exclude=.idea --exclude=vendor --exclude=vendor_prefixed --exclude=tests/wordpress ';
|
109 |
-
$this->execAndOutput($rsync, $output);
|
110 |
-
\copy(\getcwd() . '/.env.testing', $this->prepareTargetDir($plugin_dir, $configuration) . '/.env.testing');
|
111 |
-
if (!$coverage) {
|
112 |
-
$this->execAndOutput('composer install --working-dir=' . $configuration->getApacheDocumentRoot() . '/wp-content/plugins/' . $plugin_dir, $output);
|
113 |
-
$this->execAndOutput('composer install --no-dev --working-dir=' . $configuration->getApacheDocumentRoot() . '/wp-content/plugins/' . $plugin_dir, $output);
|
114 |
-
} else {
|
115 |
-
$this->execAndOutput('composer require --dev codeception/c3 --working-dir=' . $configuration->getApacheDocumentRoot() . '/wp-content/plugins/' . $plugin_dir, $output);
|
116 |
-
}
|
117 |
-
}
|
118 |
-
/**
|
119 |
-
* @param string $path
|
120 |
-
* @param bool $is_windows
|
121 |
-
*
|
122 |
-
* @return string
|
123 |
-
*/
|
124 |
-
private function preparePathForRsync($path, $is_windows)
|
125 |
-
{
|
126 |
-
if ($is_windows) {
|
127 |
-
$path = '/cygdrive/' . $path;
|
128 |
-
$path = \str_replace(':', '', $path);
|
129 |
-
$path = \str_replace('\\', '/', $path);
|
130 |
-
}
|
131 |
-
return $path;
|
132 |
-
}
|
133 |
-
/**
|
134 |
-
* @param string $plugin_slug
|
135 |
-
* @param Configuration $configuration
|
136 |
-
*
|
137 |
-
* @return string
|
138 |
-
*/
|
139 |
-
private function prepareTargetDir($plugin_slug, \FSVendor\WPDesk\Composer\Codeception\Commands\Configuration $configuration)
|
140 |
-
{
|
141 |
-
return $configuration->getApacheDocumentRoot() . '/wp-content/plugins/' . $plugin_slug;
|
142 |
-
}
|
143 |
-
/**
|
144 |
-
* @param Configuration $configuration
|
145 |
-
* @param OutputInterface $output
|
146 |
-
*/
|
147 |
-
private function prepareCommonWpWcConfiguration(\FSVendor\WPDesk\Composer\Codeception\Commands\Configuration $configuration, \FSVendor\Symfony\Component\Console\Output\OutputInterface $output)
|
148 |
-
{
|
149 |
-
$this->executeWpCliAndOutput('db reset --yes', $output, $configuration->getApacheDocumentRoot());
|
150 |
-
$this->executeWpCliAndOutput('core install --url=' . $configuration->getWptestsIp() . ' --title=Woo-tests --admin_user=admin --admin_password=admin --admin_email=grola@seostudio.pl --skip-email', $output, $configuration->getApacheDocumentRoot());
|
151 |
-
$commands = array('theme activate storefront-wpdesk-tests', 'plugin activate woocommerce');
|
152 |
-
$commands = \array_merge($commands, $this->prepareWcOptionsCommands(), $this->prepareTaxes(), $this->prepareShippingMethods(), $this->prepareWooCommercePages(), $this->prepareCustomer(), $this->prepareDisableRESTApiPermissions(), $this->prepareCreateProductsCommands(), $configuration->getPrepareDatabase());
|
153 |
-
foreach ($commands as $command) {
|
154 |
-
$this->executeWpCliAndOutput($command, $output, $configuration->getApacheDocumentRoot());
|
155 |
-
}
|
156 |
-
}
|
157 |
-
/**
|
158 |
-
* @return array
|
159 |
-
*/
|
160 |
-
private function prepareWcOptionsCommands()
|
161 |
-
{
|
162 |
-
return array('option update woocommerce_admin_notices \'{}\'', 'option update storefront_nux_dismissed 1', 'option set woocommerce_store_address "al. Jana Pawła 12"', 'option set woocommerce_store_address_2 ""', 'option set woocommerce_store_city "Warszawa"', 'option set woocommerce_default_country "PL"', 'option set woocommerce_store_postalcode "22-100"', 'option set woocommerce_currency "PLN"', 'option set woocommerce_currency_pos "right_space"', 'option set woocommerce_product_type "physical"', 'option set woocommerce_allow_tracking "no"', 'option set --format=json woocommerce_stripe_settings \'{"enabled":"no","create_account":false,"email":false}\'', 'option set --format=json woocommerce_ppec_paypal_settings \'{"reroute_requests":false,"email":false}\'', 'option set --format=json woocommerce_cheque_settings \'{"enabled":"no"}\'', 'option set --format=json woocommerce_bacs_settings \'{"enabled":"no"}\'', 'option set --format=json woocommerce_cod_settings \'{"enabled":"yes"}\'', 'option set --format=json woocommerce_onboarding_profile \'{"skipped":true}\'', 'option set --format=json wc-admin-onboarding-profiler-reminder \'{"skipped":true}\'', 'option get woocommerce_onboarding_profile', 'option set woocommerce_task_list_hidden "yes"');
|
163 |
-
}
|
164 |
-
/**
|
165 |
-
* @return string[]
|
166 |
-
*/
|
167 |
-
private function prepareTaxes()
|
168 |
-
{
|
169 |
-
return array('wc tax create --country="PL" --rate=23 --name=VAT --shipping=true --user=admin', 'option set woocommerce_calc_taxes "yes"');
|
170 |
-
}
|
171 |
-
/**
|
172 |
-
* @return string[]
|
173 |
-
*/
|
174 |
-
private function prepareShippingMethods()
|
175 |
-
{
|
176 |
-
return array('wc shipping_zone_method create 0 --method_id="flat_rate" --settings=\'{"title": "Flat rate", "cost":1, "tax_status": "taxable"}\' --enabled=true --user=admin');
|
177 |
-
}
|
178 |
-
/**
|
179 |
-
* @return string[]
|
180 |
-
*/
|
181 |
-
private function prepareWooCommercePages()
|
182 |
-
{
|
183 |
-
return array('wc --user=admin tool run install_pages');
|
184 |
-
}
|
185 |
-
/**
|
186 |
-
* @return string[]
|
187 |
-
*/
|
188 |
-
private function prepareCustomer()
|
189 |
-
{
|
190 |
-
return array('wc customer create --email=\'customer@woo.local\' --username="customer" --billing=\'{"first_name":"First","last_name":"Last","company":"WPDesk","address_1":"Street 1","city":"City","postcode": "53-030", "country": "PL", "phone": "012345678"}\' --password=\'customer\' --user=admin');
|
191 |
-
}
|
192 |
-
/**
|
193 |
-
* @return string[]
|
194 |
-
*/
|
195 |
-
private function prepareDisableRESTApiPermissions()
|
196 |
-
{
|
197 |
-
return array('option set wpdesk_rest_api_disable_permissions "1"');
|
198 |
-
}
|
199 |
-
/**
|
200 |
-
* @return array
|
201 |
-
*/
|
202 |
-
private function prepareCreateProductsCommands()
|
203 |
-
{
|
204 |
-
return array($this->prepareCreateProductCommand('100', '100'), $this->prepareCreateProductCommand('10', '10'), $this->prepareCreateProductCommand('9', '9'), $this->prepareCreateProductCommand('1', '1'), $this->prepareCreateProductCommand('09', '0.9'), $this->prepareCreateProductCommand('009', '0.09'), $this->prepareCreateProductCommand('01', '0.1'), $this->prepareCreateProductCommand('001', '0.01'), $this->prepareCreateProductCommand('0001', '0.001'), $this->prepareCreateProductCommand('00001', '0.0001'));
|
205 |
-
}
|
206 |
-
/**
|
207 |
-
* @param string $name
|
208 |
-
* @param string $price
|
209 |
-
* @param null|string $weight
|
210 |
-
* @param null|string $sku
|
211 |
-
* @param null|string $dimensions
|
212 |
-
*
|
213 |
-
* @return string
|
214 |
-
*/
|
215 |
-
private function prepareCreateProductCommand($name, $price, $weight = null, $sku = null, $dimensions = null)
|
216 |
-
{
|
217 |
-
$product_name = "Product {$name}";
|
218 |
-
$weight = $weight ? $weight : $price;
|
219 |
-
$sku = $sku ? $sku : 'product-' . $name;
|
220 |
-
$dimensions = $dimensions ? $dimensions : '{"width":"' . $price . '","length":"' . $price . '","height":"' . $price . '"}';
|
221 |
-
return "wc product create --name=\"{$product_name}\" --virtual=false --downloadable=false --type=simple --sku={$sku} --regular_price={$price} --weight={$weight} --dimensions='{$dimensions}' --user=admin";
|
222 |
-
}
|
223 |
-
/**
|
224 |
-
* @param InputInterface $input
|
225 |
-
* @param OutputInterface $output
|
226 |
-
* @param bool $coverage
|
227 |
-
*
|
228 |
-
* @throws \Composer\Downloader\FilesystemException
|
229 |
-
*/
|
230 |
-
private function prepareLocalCodeceptionTests(\FSVendor\Symfony\Component\Console\Input\InputInterface $input, \FSVendor\Symfony\Component\Console\Output\OutputInterface $output, bool $coverage = \false)
|
231 |
-
{
|
232 |
-
$configuration = $this->getWpDeskConfiguration();
|
233 |
-
$this->installPlugin($configuration->getPluginDir(), $output, $configuration, $coverage);
|
234 |
-
$this->activatePlugins($output, $configuration);
|
235 |
-
$this->prepareWpConfig($output, $configuration);
|
236 |
-
$this->copyThemeFiles($configuration->getThemeFiles(), $configuration->getApacheDocumentRoot() . '/wp-content/themes/storefront-wpdesk-tests');
|
237 |
-
$sep = \DIRECTORY_SEPARATOR;
|
238 |
-
$codecept = "vendor{$sep}bin{$sep}codecept";
|
239 |
-
$cleanOutput = $codecept . ' clean';
|
240 |
-
$this->execAndOutput($cleanOutput, $output);
|
241 |
-
}
|
242 |
-
/**
|
243 |
-
* @param array $theme_files
|
244 |
-
* @param $theme_folder
|
245 |
-
*
|
246 |
-
* @throws FilesystemException
|
247 |
-
*/
|
248 |
-
private function copyThemeFiles(array $theme_files, $theme_folder)
|
249 |
-
{
|
250 |
-
foreach ($theme_files as $theme_file) {
|
251 |
-
if (!\copy($theme_file, $this->trailingslashit($theme_folder) . \basename($theme_file))) {
|
252 |
-
throw new \FSVendor\Composer\Downloader\FilesystemException('Error copying theme file: ' . $theme_file);
|
253 |
-
}
|
254 |
-
}
|
255 |
-
}
|
256 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareCodeceptionDb.php
DELETED
@@ -1,43 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FSVendor\WPDesk\Composer\Codeception\Commands;
|
4 |
-
|
5 |
-
use FSVendor\Symfony\Component\Console\Input\InputArgument;
|
6 |
-
use FSVendor\Symfony\Component\Console\Input\InputInterface;
|
7 |
-
use FSVendor\Symfony\Component\Console\Output\OutputInterface;
|
8 |
-
use FSVendor\Symfony\Component\Yaml\Exception\ParseException;
|
9 |
-
use FSVendor\Symfony\Component\Yaml\Yaml;
|
10 |
-
/**
|
11 |
-
* Prepare Database for Codeception tests command.
|
12 |
-
*
|
13 |
-
* @package WPDesk\Composer\Codeception\Commands
|
14 |
-
*/
|
15 |
-
class PrepareCodeceptionDb extends \FSVendor\WPDesk\Composer\Codeception\Commands\BaseCommand
|
16 |
-
{
|
17 |
-
use LocalCodeceptionTrait;
|
18 |
-
/**
|
19 |
-
* Configure command.
|
20 |
-
*/
|
21 |
-
protected function configure()
|
22 |
-
{
|
23 |
-
parent::configure();
|
24 |
-
$this->setName('prepare-codeception-db')->setDescription('Prepare codeception database.');
|
25 |
-
}
|
26 |
-
/**
|
27 |
-
* Execute command.
|
28 |
-
*
|
29 |
-
* @param InputInterface $input
|
30 |
-
* @param OutputInterface $output
|
31 |
-
* @return void
|
32 |
-
*/
|
33 |
-
protected function execute(\FSVendor\Symfony\Component\Console\Input\InputInterface $input, \FSVendor\Symfony\Component\Console\Output\OutputInterface $output)
|
34 |
-
{
|
35 |
-
$configuration = $this->getWpDeskConfiguration();
|
36 |
-
$this->installPlugin($configuration->getPluginDir(), $output, $configuration);
|
37 |
-
$this->prepareCommonWpWcConfiguration($configuration, $output);
|
38 |
-
$this->prepareWpConfig($output, $configuration);
|
39 |
-
$this->executeWpCliAndOutput('plugin activate ' . $configuration->getPluginSlug(), $output, $configuration->getApacheDocumentRoot());
|
40 |
-
$this->activatePlugins($output, $configuration);
|
41 |
-
$this->executeWpCliAndOutput('db export ' . \getcwd() . '/tests/codeception/tests/_data/db.sql', $output, $configuration->getApacheDocumentRoot());
|
42 |
-
}
|
43 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareLocalCodeceptionTests.php
DELETED
@@ -1,52 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FSVendor\WPDesk\Composer\Codeception\Commands;
|
4 |
-
|
5 |
-
use FSVendor\Composer\Downloader\FilesystemException;
|
6 |
-
use FSVendor\Symfony\Component\Console\Input\InputArgument;
|
7 |
-
use FSVendor\Symfony\Component\Console\Input\InputInterface;
|
8 |
-
use FSVendor\Symfony\Component\Console\Output\OutputInterface;
|
9 |
-
use FSVendor\Symfony\Component\Yaml\Exception\ParseException;
|
10 |
-
use FSVendor\Symfony\Component\Yaml\Yaml;
|
11 |
-
/**
|
12 |
-
* Codeception tests run command.
|
13 |
-
*
|
14 |
-
* @package WPDesk\Composer\Codeception\Commands
|
15 |
-
*/
|
16 |
-
class PrepareLocalCodeceptionTests extends \FSVendor\WPDesk\Composer\Codeception\Commands\RunCodeceptionTests
|
17 |
-
{
|
18 |
-
use LocalCodeceptionTrait;
|
19 |
-
/**
|
20 |
-
* Configure command.
|
21 |
-
*/
|
22 |
-
protected function configure()
|
23 |
-
{
|
24 |
-
parent::configure();
|
25 |
-
$this->setName('prepare-local-codeception-tests')->setDescription('Prepare local codeception tests.');
|
26 |
-
}
|
27 |
-
/**
|
28 |
-
* Execute command.
|
29 |
-
*
|
30 |
-
* @param InputInterface $input
|
31 |
-
* @param OutputInterface $output
|
32 |
-
* @return void
|
33 |
-
*/
|
34 |
-
protected function execute(\FSVendor\Symfony\Component\Console\Input\InputInterface $input, \FSVendor\Symfony\Component\Console\Output\OutputInterface $output)
|
35 |
-
{
|
36 |
-
$this->prepareLocalCodeceptionTests($input, $output, \false);
|
37 |
-
}
|
38 |
-
/**
|
39 |
-
* @param array $theme_files
|
40 |
-
* @param $theme_folder
|
41 |
-
*
|
42 |
-
* @throws FilesystemException
|
43 |
-
*/
|
44 |
-
private function copyThemeFiles(array $theme_files, $theme_folder)
|
45 |
-
{
|
46 |
-
foreach ($theme_files as $theme_file) {
|
47 |
-
if (!\copy($theme_file, $this->trailingslashit($theme_folder) . \basename($theme_file))) {
|
48 |
-
throw new \FSVendor\Composer\Downloader\FilesystemException('Error copying theme file: ' . $theme_file);
|
49 |
-
}
|
50 |
-
}
|
51 |
-
}
|
52 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareLocalCodeceptionTestsWithCoverage.php
DELETED
@@ -1,41 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FSVendor\WPDesk\Composer\Codeception\Commands;
|
4 |
-
|
5 |
-
use FSVendor\Composer\Downloader\FilesystemException;
|
6 |
-
use FSVendor\Symfony\Component\Console\Input\InputArgument;
|
7 |
-
use FSVendor\Symfony\Component\Console\Input\InputInterface;
|
8 |
-
use FSVendor\Symfony\Component\Console\Output\OutputInterface;
|
9 |
-
use FSVendor\Symfony\Component\Yaml\Exception\ParseException;
|
10 |
-
use FSVendor\Symfony\Component\Yaml\Yaml;
|
11 |
-
/**
|
12 |
-
* Codeception tests run command.
|
13 |
-
*
|
14 |
-
* @package WPDesk\Composer\Codeception\Commands
|
15 |
-
*/
|
16 |
-
class PrepareLocalCodeceptionTestsWithCoverage extends \FSVendor\WPDesk\Composer\Codeception\Commands\RunCodeceptionTests
|
17 |
-
{
|
18 |
-
use LocalCodeceptionTrait;
|
19 |
-
/**
|
20 |
-
* Configure command.
|
21 |
-
*/
|
22 |
-
protected function configure()
|
23 |
-
{
|
24 |
-
parent::configure();
|
25 |
-
$this->setName('prepare-local-codeception-tests-with-coverage')->setDescription('Prepare local codeception tests.');
|
26 |
-
}
|
27 |
-
/**
|
28 |
-
* Execute command.
|
29 |
-
*
|
30 |
-
* @param InputInterface $input
|
31 |
-
* @param OutputInterface $output
|
32 |
-
* @return void
|
33 |
-
*/
|
34 |
-
protected function execute(\FSVendor\Symfony\Component\Console\Input\InputInterface $input, \FSVendor\Symfony\Component\Console\Output\OutputInterface $output)
|
35 |
-
{
|
36 |
-
$this->prepareLocalCodeceptionTests($input, $output, \true);
|
37 |
-
$configuration = $this->getWpDeskConfiguration();
|
38 |
-
$plugin_file = $configuration->getApacheDocumentRoot() . '/wp-content/plugins/' . $configuration->getPluginFile();
|
39 |
-
\file_put_contents($plugin_file, "\ndefine('C3_CODECOVERAGE_ERROR_LOG_FILE', '/tmp/c3_error.log'); include __DIR__ . '/c3.php';", \FILE_APPEND);
|
40 |
-
}
|
41 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareParallelCodeceptionTests.php
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FSVendor\WPDesk\Composer\Codeception\Commands;
|
4 |
-
|
5 |
-
use FSVendor\Symfony\Component\Console\Input\InputArgument;
|
6 |
-
use FSVendor\Symfony\Component\Console\Input\InputInterface;
|
7 |
-
use FSVendor\Symfony\Component\Console\Output\OutputInterface;
|
8 |
-
use FSVendor\Symfony\Component\Yaml\Exception\ParseException;
|
9 |
-
use FSVendor\Symfony\Component\Yaml\Yaml;
|
10 |
-
/**
|
11 |
-
* Split test to multiple directories for parallel running in CI.
|
12 |
-
*
|
13 |
-
* @package WPDesk\Composer\Codeception\Commands
|
14 |
-
*/
|
15 |
-
class PrepareParallelCodeceptionTests extends \FSVendor\WPDesk\Composer\Codeception\Commands\BaseCommand
|
16 |
-
{
|
17 |
-
const NUMBER_OF_JOBS = 'number_of_jobs';
|
18 |
-
/**
|
19 |
-
* Configure command.
|
20 |
-
*/
|
21 |
-
protected function configure()
|
22 |
-
{
|
23 |
-
parent::configure();
|
24 |
-
$this->setName('prepare-parallel-codeception-tests')->setDescription('Prepare parallel codeception tests.')->setDefinition(array(new \FSVendor\Symfony\Component\Console\Input\InputArgument(self::NUMBER_OF_JOBS, \FSVendor\Symfony\Component\Console\Input\InputArgument::OPTIONAL, 'Number of jobs.', '4')));
|
25 |
-
}
|
26 |
-
/**
|
27 |
-
* Execute command.
|
28 |
-
*
|
29 |
-
* @param InputInterface $input
|
30 |
-
* @param OutputInterface $output
|
31 |
-
* @return void
|
32 |
-
*/
|
33 |
-
protected function execute(\FSVendor\Symfony\Component\Console\Input\InputInterface $input, \FSVendor\Symfony\Component\Console\Output\OutputInterface $output)
|
34 |
-
{
|
35 |
-
$numberOfJobs = (int) $input->getArgument(self::NUMBER_OF_JOBS);
|
36 |
-
$acceptanceTestsDir = \getcwd() . '/tests/codeception/tests/acceptance';
|
37 |
-
for ($i = 1; $i <= $numberOfJobs; $i++) {
|
38 |
-
$parallelDir = $acceptanceTestsDir . '/' . $i;
|
39 |
-
if (!\file_exists($parallelDir)) {
|
40 |
-
\mkdir($parallelDir);
|
41 |
-
}
|
42 |
-
}
|
43 |
-
$currentIndex = 1;
|
44 |
-
$files = \scandir($acceptanceTestsDir);
|
45 |
-
foreach ($files as $fileName) {
|
46 |
-
$fileFullPath = $acceptanceTestsDir . '/' . $fileName;
|
47 |
-
if (!\is_dir($fileFullPath)) {
|
48 |
-
$targetPath = $acceptanceTestsDir . '/' . $currentIndex . '/' . $fileName;
|
49 |
-
\copy($fileFullPath, $targetPath);
|
50 |
-
$currentIndex++;
|
51 |
-
if ($currentIndex > $numberOfJobs) {
|
52 |
-
$currentIndex = 1;
|
53 |
-
}
|
54 |
-
}
|
55 |
-
}
|
56 |
-
}
|
57 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/PrepareWordpressForCodeception.php
DELETED
@@ -1,66 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FSVendor\WPDesk\Composer\Codeception\Commands;
|
4 |
-
|
5 |
-
use FSVendor\Symfony\Component\Console\Input\InputArgument;
|
6 |
-
use FSVendor\Symfony\Component\Console\Input\InputInterface;
|
7 |
-
use FSVendor\Symfony\Component\Console\Output\OutputInterface;
|
8 |
-
use FSVendor\Symfony\Component\Yaml\Exception\ParseException;
|
9 |
-
use FSVendor\Symfony\Component\Yaml\Yaml;
|
10 |
-
/**
|
11 |
-
* Prepare Database for Codeception tests command.
|
12 |
-
*
|
13 |
-
* @package WPDesk\Composer\Codeception\Commands
|
14 |
-
*/
|
15 |
-
class PrepareWordpressForCodeception extends \FSVendor\WPDesk\Composer\Codeception\Commands\BaseCommand
|
16 |
-
{
|
17 |
-
use LocalCodeceptionTrait;
|
18 |
-
/**
|
19 |
-
* Configure command.
|
20 |
-
*/
|
21 |
-
protected function configure()
|
22 |
-
{
|
23 |
-
parent::configure();
|
24 |
-
$this->setName('prepare-wordpress-for-codeception')->setDescription('Prepare wordpress installation for codeception tests.');
|
25 |
-
}
|
26 |
-
/**
|
27 |
-
* Execute command.
|
28 |
-
*
|
29 |
-
* @param InputInterface $input
|
30 |
-
* @param OutputInterface $output
|
31 |
-
* @return void
|
32 |
-
*/
|
33 |
-
protected function execute(\FSVendor\Symfony\Component\Console\Input\InputInterface $input, \FSVendor\Symfony\Component\Console\Output\OutputInterface $output)
|
34 |
-
{
|
35 |
-
$configuration = $this->getWpDeskConfiguration();
|
36 |
-
$this->installWP($output, $configuration);
|
37 |
-
}
|
38 |
-
/**
|
39 |
-
* @param OutputInterface $output
|
40 |
-
* @param Configuration $configuration
|
41 |
-
*/
|
42 |
-
private function installWP(\FSVendor\Symfony\Component\Console\Output\OutputInterface $output, \FSVendor\WPDesk\Composer\Codeception\Commands\Configuration $configuration)
|
43 |
-
{
|
44 |
-
if (!\file_exists($configuration->getApacheDocumentRoot())) {
|
45 |
-
\mkdir($configuration->getApacheDocumentRoot(), 0777, \true);
|
46 |
-
}
|
47 |
-
$dbhost = $configuration->getDbhost();
|
48 |
-
$dbname = $configuration->getDbname();
|
49 |
-
$dbuser = $configuration->getDbuser();
|
50 |
-
$dbpassword = $configuration->getDbpassword();
|
51 |
-
$url = $configuration->getWptestsIp();
|
52 |
-
$apache_document_root = $configuration->getApacheDocumentRoot();
|
53 |
-
$this->executeWpCliAndOutput('core download --force', $output, $apache_document_root);
|
54 |
-
$this->executeWpCliAndOutput("core config --dbhost={$dbhost} --dbname={$dbname} --dbuser={$dbuser} --dbpass={$dbpassword}", $output, $apache_document_root);
|
55 |
-
$this->executeWpCliAndOutput("core install --url={$url} --title=Woo-tests --admin_user=admin --admin_password=admin --admin_email=tests@wpdesk.dev --skip-email", $output, $apache_document_root);
|
56 |
-
\copy('./vendor/wpdesk/wp-codeception/wordpress/htaccess', $apache_document_root . '/.htaccess');
|
57 |
-
$this->executeWpCliAndOutput('rewrite structure \'/%postname%/\'', $output, $apache_document_root);
|
58 |
-
$this->executeWpCliAndOutput('plugin install woocommerce', $output, $apache_document_root);
|
59 |
-
$this->executeWpCliAndOutput('theme activate storefront', $output, $apache_document_root);
|
60 |
-
$this->executeWpCliAndOutput('theme delete storefront-wpdesk-tests', $output, $apache_document_root);
|
61 |
-
$this->executeWpCliAndOutput('theme install storefront', $output, $apache_document_root);
|
62 |
-
$this->executeWpCliAndOutput('theme install https://gitlab.com/wpdesk/storefront-wpdesk-tests/-/archive/master/storefront-wpdesk-tests-master.zip', $output, $apache_document_root);
|
63 |
-
\rename($apache_document_root . '/wp-content/themes/storefront-wpdesk-tests-master', $apache_document_root . '/wp-content/themes/storefront-wpdesk-tests');
|
64 |
-
$this->executeWpCliAndOutput('theme activate storefront-wpdesk-tests', $output, $apache_document_root);
|
65 |
-
}
|
66 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/RunCodeceptionTests.php
DELETED
@@ -1,59 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FSVendor\WPDesk\Composer\Codeception\Commands;
|
4 |
-
|
5 |
-
use FSVendor\Symfony\Component\Console\Input\InputArgument;
|
6 |
-
use FSVendor\Symfony\Component\Console\Input\InputInterface;
|
7 |
-
use FSVendor\Symfony\Component\Console\Output\OutputInterface;
|
8 |
-
/**
|
9 |
-
* Codeception tests run command.
|
10 |
-
*
|
11 |
-
* @package WPDesk\Composer\Codeception\Commands
|
12 |
-
*/
|
13 |
-
class RunCodeceptionTests extends \FSVendor\WPDesk\Composer\Codeception\Commands\BaseCommand
|
14 |
-
{
|
15 |
-
const SINGLE = 'single';
|
16 |
-
const FAST = 'fast';
|
17 |
-
const WOOCOMMERCE_VERSION = 'woo_version';
|
18 |
-
/**
|
19 |
-
* Configure command.
|
20 |
-
*/
|
21 |
-
protected function configure()
|
22 |
-
{
|
23 |
-
parent::configure();
|
24 |
-
$this->setName('run-codeception-tests')->setDescription('Run codeception tests.')->setDefinition(array(new \FSVendor\Symfony\Component\Console\Input\InputArgument(self::SINGLE, \FSVendor\Symfony\Component\Console\Input\InputArgument::OPTIONAL, 'Name of Single test to run.', 'all'), new \FSVendor\Symfony\Component\Console\Input\InputArgument(self::FAST, \FSVendor\Symfony\Component\Console\Input\InputArgument::OPTIONAL, 'Fast tests - do not shutdown docker-compose.', 'slow'), new \FSVendor\Symfony\Component\Console\Input\InputArgument(self::WOOCOMMERCE_VERSION, \FSVendor\Symfony\Component\Console\Input\InputArgument::OPTIONAL, 'WooCommerce version to install.', '')));
|
25 |
-
}
|
26 |
-
/**
|
27 |
-
* Execute command.
|
28 |
-
*
|
29 |
-
* @param InputInterface $input
|
30 |
-
* @param OutputInterface $output
|
31 |
-
* @return void
|
32 |
-
*/
|
33 |
-
protected function execute(\FSVendor\Symfony\Component\Console\Input\InputInterface $input, \FSVendor\Symfony\Component\Console\Output\OutputInterface $output)
|
34 |
-
{
|
35 |
-
$dockerComposeYaml = 'vendor/wpdesk/wp-codeception/docker/docker-compose.yaml';
|
36 |
-
$singleTest = $input->getArgument(self::SINGLE);
|
37 |
-
$fastTest = $input->getArgument(self::FAST);
|
38 |
-
$wooVersion = $input->getArgument(self::WOOCOMMERCE_VERSION);
|
39 |
-
$cache_dir = \sys_get_temp_dir() . '/codeception_cache';
|
40 |
-
if (!\file_exists($cache_dir)) {
|
41 |
-
\mkdir($cache_dir, 0777, \true);
|
42 |
-
}
|
43 |
-
\putenv('TMP_CACHE_DIR=' . $cache_dir);
|
44 |
-
$codecept_param = ' --html --verbose -f ';
|
45 |
-
$additionalParameters = ' -e CODECEPT_PARAM="' . $codecept_param . '" ';
|
46 |
-
if (!empty($singleTest) && 'all' !== $singleTest) {
|
47 |
-
$additionalParameters .= ' -e CODECEPT_PARAM="' . $codecept_param . ' acceptance ' . $singleTest . '" ';
|
48 |
-
}
|
49 |
-
if (!empty($wooVersion)) {
|
50 |
-
$additionalParameters .= ' -e WOOCOMMERCE_VERSION="' . $wooVersion . '" ';
|
51 |
-
}
|
52 |
-
$runTestsCommand = 'docker-compose -f ' . $dockerComposeYaml . ' run ' . $additionalParameters . 'codecept';
|
53 |
-
$output->writeln('Codeception command: ' . $runTestsCommand);
|
54 |
-
$this->execAndOutput($runTestsCommand, $output);
|
55 |
-
if (empty($fastTest) || self::FAST !== $fastTest) {
|
56 |
-
$this->execAndOutput('docker-compose -f ' . $dockerComposeYaml . ' down -v', $output);
|
57 |
-
}
|
58 |
-
}
|
59 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/RunLocalCodeceptionTests.php
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FSVendor\WPDesk\Composer\Codeception\Commands;
|
4 |
-
|
5 |
-
use FSVendor\Symfony\Component\Console\Input\InputArgument;
|
6 |
-
use FSVendor\Symfony\Component\Console\Input\InputInterface;
|
7 |
-
use FSVendor\Symfony\Component\Console\Output\OutputInterface;
|
8 |
-
use FSVendor\Symfony\Component\Yaml\Exception\ParseException;
|
9 |
-
use FSVendor\Symfony\Component\Yaml\Yaml;
|
10 |
-
/**
|
11 |
-
* Codeception tests run command.
|
12 |
-
*
|
13 |
-
* @package WPDesk\Composer\Codeception\Commands
|
14 |
-
*/
|
15 |
-
class RunLocalCodeceptionTests extends \FSVendor\WPDesk\Composer\Codeception\Commands\RunCodeceptionTests
|
16 |
-
{
|
17 |
-
use LocalCodeceptionTrait;
|
18 |
-
/**
|
19 |
-
* Configure command.
|
20 |
-
*/
|
21 |
-
protected function configure()
|
22 |
-
{
|
23 |
-
parent::configure();
|
24 |
-
$this->setName('run-local-codeception-tests')->setDescription('Run local codeception tests.')->setDefinition(array(new \FSVendor\Symfony\Component\Console\Input\InputArgument(self::SINGLE, \FSVendor\Symfony\Component\Console\Input\InputArgument::OPTIONAL, 'Name of Single test to run.', ' ')));
|
25 |
-
}
|
26 |
-
/**
|
27 |
-
* Execute command.
|
28 |
-
*
|
29 |
-
* @param InputInterface $input
|
30 |
-
* @param OutputInterface $output
|
31 |
-
* @return void
|
32 |
-
*/
|
33 |
-
protected function execute(\FSVendor\Symfony\Component\Console\Input\InputInterface $input, \FSVendor\Symfony\Component\Console\Output\OutputInterface $output)
|
34 |
-
{
|
35 |
-
$configuration = $this->getWpDeskConfiguration();
|
36 |
-
$this->prepareWpConfig($output, $configuration);
|
37 |
-
$singleTest = $input->getArgument(self::SINGLE);
|
38 |
-
$sep = \DIRECTORY_SEPARATOR;
|
39 |
-
$codecept = "vendor{$sep}bin{$sep}codecept";
|
40 |
-
$cleanOutput = $codecept . ' clean';
|
41 |
-
$this->execAndOutput($cleanOutput, $output);
|
42 |
-
$runLocalTests = $codecept . ' run -f --steps --html --verbose acceptance ' . $singleTest;
|
43 |
-
$this->execAndOutput($runLocalTests, $output);
|
44 |
-
}
|
45 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/RunLocalCodeceptionTestsWithCoverage.php
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FSVendor\WPDesk\Composer\Codeception\Commands;
|
4 |
-
|
5 |
-
use FSVendor\Symfony\Component\Console\Input\InputArgument;
|
6 |
-
use FSVendor\Symfony\Component\Console\Input\InputInterface;
|
7 |
-
use FSVendor\Symfony\Component\Console\Output\OutputInterface;
|
8 |
-
use FSVendor\Symfony\Component\Yaml\Exception\ParseException;
|
9 |
-
use FSVendor\Symfony\Component\Yaml\Yaml;
|
10 |
-
/**
|
11 |
-
* Codeception tests run command.
|
12 |
-
*
|
13 |
-
* @package WPDesk\Composer\Codeception\Commands
|
14 |
-
*/
|
15 |
-
class RunLocalCodeceptionTestsWithCoverage extends \FSVendor\WPDesk\Composer\Codeception\Commands\RunCodeceptionTests
|
16 |
-
{
|
17 |
-
use LocalCodeceptionTrait;
|
18 |
-
/**
|
19 |
-
* Configure command.
|
20 |
-
*/
|
21 |
-
protected function configure()
|
22 |
-
{
|
23 |
-
parent::configure();
|
24 |
-
$this->setName('run-local-codeception-tests-with-coverage')->setDescription('Run local codeception tests.')->setDefinition(array(new \FSVendor\Symfony\Component\Console\Input\InputArgument(self::SINGLE, \FSVendor\Symfony\Component\Console\Input\InputArgument::OPTIONAL, 'Name of Single test to run.', ' ')));
|
25 |
-
}
|
26 |
-
/**
|
27 |
-
* Execute command.
|
28 |
-
*
|
29 |
-
* @param InputInterface $input
|
30 |
-
* @param OutputInterface $output
|
31 |
-
* @return void
|
32 |
-
*/
|
33 |
-
protected function execute(\FSVendor\Symfony\Component\Console\Input\InputInterface $input, \FSVendor\Symfony\Component\Console\Output\OutputInterface $output)
|
34 |
-
{
|
35 |
-
$configuration = $this->getWpDeskConfiguration();
|
36 |
-
$this->prepareWpConfig($output, $configuration);
|
37 |
-
$singleTest = $input->getArgument(self::SINGLE);
|
38 |
-
$sep = \DIRECTORY_SEPARATOR;
|
39 |
-
$codecept = "vendor{$sep}bin{$sep}codecept";
|
40 |
-
$cleanOutput = $codecept . ' clean';
|
41 |
-
$this->execAndOutput($cleanOutput, $output);
|
42 |
-
$runLocalTests = $codecept . ' run -f --steps --html --coverage --coverage-xml --coverage-html --verbose acceptance ' . $singleTest;
|
43 |
-
$this->execAndOutput($runLocalTests, $output);
|
44 |
-
}
|
45 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/SedTrait.php
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FSVendor\WPDesk\Composer\Codeception\Commands;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Trait with a sed like command
|
7 |
-
* @see https://pl.wikipedia.org/wiki/Sed_(program)
|
8 |
-
*
|
9 |
-
* @package WPDesk\Composer\GitPlugin\Command
|
10 |
-
*/
|
11 |
-
trait SedTrait
|
12 |
-
{
|
13 |
-
/**
|
14 |
-
* SED.
|
15 |
-
*
|
16 |
-
* @param string $file_pattern .
|
17 |
-
* @param string $pattern .
|
18 |
-
* @param string $replace .
|
19 |
-
*
|
20 |
-
* @return string[] array of changed files
|
21 |
-
*/
|
22 |
-
private function wpdeskSed($file_pattern, $pattern, $replace)
|
23 |
-
{
|
24 |
-
$changed_files = [];
|
25 |
-
foreach (\glob($file_pattern) as $filename) {
|
26 |
-
$input = \file_get_contents($filename);
|
27 |
-
$output = \preg_replace($pattern, $replace, $input);
|
28 |
-
if ($output !== $input) {
|
29 |
-
$changed_files[] = $filename;
|
30 |
-
\file_put_contents($filename, $output);
|
31 |
-
}
|
32 |
-
}
|
33 |
-
return $changed_files;
|
34 |
-
}
|
35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Commands/SettingsException.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class SettingsException
|
5 |
-
* @package WPDesk\Composer\Codeception\Commands
|
6 |
-
*/
|
7 |
-
namespace FSVendor\WPDesk\Composer\Codeception\Commands;
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Settings Exception.
|
11 |
-
*/
|
12 |
-
class SettingsException extends \RuntimeException
|
13 |
-
{
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-codeception/src/WPDesk/Composer/Plugin.php
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace FSVendor\WPDesk\Composer\Codeception;
|
4 |
-
|
5 |
-
use FSVendor\Composer\Composer;
|
6 |
-
use FSVendor\Composer\IO\IOInterface;
|
7 |
-
use FSVendor\Composer\Plugin\Capable;
|
8 |
-
use FSVendor\Composer\Plugin\PluginInterface;
|
9 |
-
/**
|
10 |
-
* Composer plugin.
|
11 |
-
*
|
12 |
-
* @package WPDesk\Composer\Codeception
|
13 |
-
*/
|
14 |
-
class Plugin implements \FSVendor\Composer\Plugin\PluginInterface, \FSVendor\Composer\Plugin\Capable
|
15 |
-
{
|
16 |
-
/**
|
17 |
-
* @var Composer
|
18 |
-
*/
|
19 |
-
private $composer;
|
20 |
-
/**
|
21 |
-
* @var IOInterface
|
22 |
-
*/
|
23 |
-
private $io;
|
24 |
-
public function activate(\FSVendor\Composer\Composer $composer, \FSVendor\Composer\IO\IOInterface $io)
|
25 |
-
{
|
26 |
-
$this->composer = $composer;
|
27 |
-
$this->io = $io;
|
28 |
-
}
|
29 |
-
/**
|
30 |
-
* @inheritDoc
|
31 |
-
*/
|
32 |
-
public function deactivate(\FSVendor\Composer\Composer $composer, \FSVendor\Composer\IO\IOInterface $io)
|
33 |
-
{
|
34 |
-
$this->composer = $composer;
|
35 |
-
$this->io = $io;
|
36 |
-
}
|
37 |
-
/**
|
38 |
-
* @inheritDoc
|
39 |
-
*/
|
40 |
-
public function uninstall(\FSVendor\Composer\Composer $composer, \FSVendor\Composer\IO\IOInterface $io)
|
41 |
-
{
|
42 |
-
$this->composer = $composer;
|
43 |
-
$this->io = $io;
|
44 |
-
}
|
45 |
-
public function getCapabilities()
|
46 |
-
{
|
47 |
-
return [\FSVendor\Composer\Plugin\Capability\CommandProvider::class => \FSVendor\WPDesk\Composer\Codeception\CommandProvider::class];
|
48 |
-
}
|
49 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor_prefixed/wpdesk/wp-logs/src/SimpleLoggerFactory.php
CHANGED
@@ -21,7 +21,7 @@ final class SimpleLoggerFactory implements \FSVendor\WPDesk\Logger\LoggerFactory
|
|
21 |
$this->channel = $channel;
|
22 |
$this->options = $options ?? new \FSVendor\WPDesk\Logger\Settings();
|
23 |
}
|
24 |
-
public function getLogger(
|
25 |
{
|
26 |
if ($this->logger) {
|
27 |
return $this->logger;
|
21 |
$this->channel = $channel;
|
22 |
$this->options = $options ?? new \FSVendor\WPDesk\Logger\Settings();
|
23 |
}
|
24 |
+
public function getLogger($name = null) : \FSVendor\Monolog\Logger
|
25 |
{
|
26 |
if ($this->logger) {
|
27 |
return $this->logger;
|
vendor_prefixed/wpdesk/wp-wpdesk-license/src/ActivationForm/FormContentRenderer.php
CHANGED
@@ -15,6 +15,7 @@ class FormContentRenderer
|
|
15 |
const MY_ACCOUNT_API_KEYS_PL = 'moje-konto/api-keys/';
|
16 |
const DOCS_EN = 'docs/how-to-activate-licenses';
|
17 |
const DOCS_PL = 'docs/licencje-wtyczek/';
|
|
|
18 |
/**
|
19 |
* @var WPDesk_Plugin_Info
|
20 |
*/
|
@@ -98,8 +99,21 @@ class FormContentRenderer
|
|
98 |
$default = 'default';
|
99 |
$default_shop = $plugin_shops[$default] ?? '';
|
100 |
$shop_url = $plugin_shops[$locale] ?? $default_shop;
|
|
|
|
|
|
|
|
|
101 |
$docs = self::SHOP_WWW_WPDESK_PL !== $shop_url ? self::DOCS_EN : self::DOCS_PL;
|
102 |
$utms = '?utm_source=docs&utm_medium=link&utm_campaign=licenses';
|
103 |
return isset($shop_url) ? \trailingslashit($shop_url) . $docs . $utms : '';
|
104 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
}
|
15 |
const MY_ACCOUNT_API_KEYS_PL = 'moje-konto/api-keys/';
|
16 |
const DOCS_EN = 'docs/how-to-activate-licenses';
|
17 |
const DOCS_PL = 'docs/licencje-wtyczek/';
|
18 |
+
const DOCS_URLS = ['octolize.com' => 'https://octol.io/how-to-activate-plugin'];
|
19 |
/**
|
20 |
* @var WPDesk_Plugin_Info
|
21 |
*/
|
99 |
$default = 'default';
|
100 |
$default_shop = $plugin_shops[$default] ?? '';
|
101 |
$shop_url = $plugin_shops[$locale] ?? $default_shop;
|
102 |
+
$shop_domain = $this->get_shop_domain($shop_url);
|
103 |
+
if (isset(self::DOCS_URLS[$shop_domain])) {
|
104 |
+
return self::DOCS_URLS[$shop_domain];
|
105 |
+
}
|
106 |
$docs = self::SHOP_WWW_WPDESK_PL !== $shop_url ? self::DOCS_EN : self::DOCS_PL;
|
107 |
$utms = '?utm_source=docs&utm_medium=link&utm_campaign=licenses';
|
108 |
return isset($shop_url) ? \trailingslashit($shop_url) . $docs . $utms : '';
|
109 |
}
|
110 |
+
/**
|
111 |
+
* @param string $shop_url .
|
112 |
+
*
|
113 |
+
* @return string
|
114 |
+
*/
|
115 |
+
private function get_shop_domain(string $shop_url) : string
|
116 |
+
{
|
117 |
+
return \parse_url($shop_url, \PHP_URL_HOST) ?? '';
|
118 |
+
}
|
119 |
}
|