Version Description
- 2019-04-10 =
- Removed Flexible Shipping menu
Download this release
Release Info
Developer | jablonowski |
Plugin | Flexible Shipping for WooCommerce |
Version | 3.3.4 |
Comparing to | |
See all releases |
Code changes from version 3.3.3 to 3.3.4
- classes/abtests/ab-menu-test/class-ab-variant-old.php +0 -20
- classes/abtests/ab-menu-test/class-ab-variant-with-menu.php +0 -21
- classes/abtests/ab-menu-test/class-ab-variant-without-menu.php +0 -20
- classes/abtests/ab-pointer-message-test/class-ab-variant-old.php +33 -0
- classes/abtests/ab-pointer-message-test/class-ab-variant-with-pointer-message-text.php +34 -0
- classes/abtests/ab-pointer-message-test/class-ab-variant-with-pointer-message-video.php +34 -0
- classes/abtests/ab-pointer-message-test/class-ab-variant-without-pointer-message.php +33 -0
- classes/abtests/class-ab-menu-page.php +0 -107
- classes/abtests/{class-ab-menu-test.php → class-ab-pointer-message-test.php} +34 -22
- classes/abtests/class-ab-tracker-deactivation-data.php +7 -3
- classes/class-flexible-shipping-plugin.php +8 -10
- classes/class-method-created-tracker-deactivation-data.php +101 -0
- classes/class-pointer-messages.php +100 -0
- classes/saas/class-saas-settings.php +2 -24
- classes/saas/class-saas-shipping-services-manager.php +1 -14
- classes/saas/class-saas-user-registration.php +1 -13
- classes/saas/views/html-field-saas-connection.php +11 -0
- classes/saas/views/html-shipping-method-info-description.php +1 -3
- classes/tracker.php +14 -3
- classes/views/html-pointer-message-fs-text.php +12 -0
- classes/views/html-pointer-message-fs-video.php +1 -0
- composer.lock +52 -1
- flexible-shipping.php +3 -3
- lang/flexible-shipping-pl_PL.mo +0 -0
- lang/flexible-shipping-pl_PL.po +82 -59
- readme.txt +4 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_classmap.php +11 -5
- vendor/composer/autoload_psr4.php +1 -0
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +20 -9
- vendor/composer/installed.json +53 -0
- vendor/wpdesk/wp-pointer/LICENSE.md +21 -0
- vendor/wpdesk/wp-pointer/README.md +14 -0
- vendor/wpdesk/wp-pointer/composer.json +38 -0
- vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerConditions.php +111 -0
- vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerMessage.php +326 -0
- vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerPosition.php +77 -0
- vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/PointersScripts.php +57 -0
- vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/views/html-script-pointer-message.php +28 -0
classes/abtests/ab-menu-test/class-ab-variant-old.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
use WPDesk\ABTesting\ABVariant;
|
4 |
-
|
5 |
-
class WPDesk_Flexible_Shipping_AB_Variant_Old implements ABVariant {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Define a new value for the generated variant
|
9 |
-
* @var int
|
10 |
-
*/
|
11 |
-
const VARIANT_ID = 0;
|
12 |
-
|
13 |
-
public function is_on( $functionality ) {
|
14 |
-
return !$functionality === WPDesk_Flexible_Shipping_AB_MenuTest::FS_WITH_MENU;
|
15 |
-
}
|
16 |
-
|
17 |
-
public function get_variant_id() {
|
18 |
-
return self::VARIANT_ID;
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/abtests/ab-menu-test/class-ab-variant-with-menu.php
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
use WPDesk\ABTesting\ABVariant;
|
4 |
-
|
5 |
-
class WPDesk_Flexible_Shipping_AB_Variant_With_Menu implements ABVariant {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Define a new value for the generated variant
|
9 |
-
* @var int
|
10 |
-
*/
|
11 |
-
const VARIANT_ID = 5;
|
12 |
-
|
13 |
-
public function is_on( $functionality ) {
|
14 |
-
return $functionality === WPDesk_Flexible_Shipping_AB_MenuTest::FS_WITH_MENU;
|
15 |
-
}
|
16 |
-
|
17 |
-
public function get_variant_id() {
|
18 |
-
return self::VARIANT_ID;
|
19 |
-
}
|
20 |
-
|
21 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/abtests/ab-menu-test/class-ab-variant-without-menu.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
use WPDesk\ABTesting\ABVariant;
|
4 |
-
|
5 |
-
class WPDesk_Flexible_Shipping_AB_Variant_Without_Menu implements ABVariant {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Define a new value for the generated variant
|
9 |
-
* @var int
|
10 |
-
*/
|
11 |
-
const VARIANT_ID = 6;
|
12 |
-
|
13 |
-
public function is_on( $functionality ) {
|
14 |
-
return !$functionality === WPDesk_Flexible_Shipping_AB_MenuTest::FS_WITH_MENU;
|
15 |
-
}
|
16 |
-
|
17 |
-
public function get_variant_id() {
|
18 |
-
return self::VARIANT_ID;
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/abtests/ab-pointer-message-test/class-ab-variant-old.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use WPDesk\ABTesting\ABVariant;
|
4 |
+
|
5 |
+
class WPDesk_Flexible_Shipping_AB_Variant_Old implements ABVariant {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Define a new value for the generated variant.
|
9 |
+
*
|
10 |
+
* @var int
|
11 |
+
*/
|
12 |
+
const VARIANT_ID = 0;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Is On?
|
16 |
+
*
|
17 |
+
* @param string $functionality Functionality.
|
18 |
+
*
|
19 |
+
* @return bool
|
20 |
+
*/
|
21 |
+
public function is_on( $functionality ) {
|
22 |
+
return WPDesk_Flexible_Shipping_AB_Pointer_Message_Test::FS_WITH_POINTER_MESSAGE_VIDEO === ! $functionality;
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Get variant id.
|
27 |
+
*
|
28 |
+
* @return int|string
|
29 |
+
*/
|
30 |
+
public function get_variant_id() {
|
31 |
+
return self::VARIANT_ID;
|
32 |
+
}
|
33 |
+
}
|
classes/abtests/ab-pointer-message-test/class-ab-variant-with-pointer-message-text.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use WPDesk\ABTesting\ABVariant;
|
4 |
+
|
5 |
+
class WPDesk_Flexible_Shipping_AB_Variant_With_Pointer_Message_Text implements ABVariant {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Define a new value for the generated variant
|
9 |
+
*
|
10 |
+
* @var int
|
11 |
+
*/
|
12 |
+
const VARIANT_ID = 8;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Is on?
|
16 |
+
*
|
17 |
+
* @param string $functionality Functionality.
|
18 |
+
*
|
19 |
+
* @return bool
|
20 |
+
*/
|
21 |
+
public function is_on( $functionality ) {
|
22 |
+
return WPDesk_Flexible_Shipping_AB_Pointer_Message_Test::FS_WITH_POINTER_MESSAGE_TEXT === $functionality;
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Get variant id.
|
27 |
+
*
|
28 |
+
* @return int|string
|
29 |
+
*/
|
30 |
+
public function get_variant_id() {
|
31 |
+
return self::VARIANT_ID;
|
32 |
+
}
|
33 |
+
|
34 |
+
}
|
classes/abtests/ab-pointer-message-test/class-ab-variant-with-pointer-message-video.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use WPDesk\ABTesting\ABVariant;
|
4 |
+
|
5 |
+
class WPDesk_Flexible_Shipping_AB_Variant_With_Pointer_Message_Video implements ABVariant {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Define a new value for the generated variant
|
9 |
+
*
|
10 |
+
* @var int
|
11 |
+
*/
|
12 |
+
const VARIANT_ID = 7;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Is on?
|
16 |
+
*
|
17 |
+
* @param string $functionality Functionality.
|
18 |
+
*
|
19 |
+
* @return bool
|
20 |
+
*/
|
21 |
+
public function is_on( $functionality ) {
|
22 |
+
return WPDesk_Flexible_Shipping_AB_Pointer_Message_Test::FS_WITH_POINTER_MESSAGE_VIDEO === $functionality;
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Get variant id.
|
27 |
+
*
|
28 |
+
* @return int|string
|
29 |
+
*/
|
30 |
+
public function get_variant_id() {
|
31 |
+
return self::VARIANT_ID;
|
32 |
+
}
|
33 |
+
|
34 |
+
}
|
classes/abtests/ab-pointer-message-test/class-ab-variant-without-pointer-message.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use WPDesk\ABTesting\ABVariant;
|
4 |
+
|
5 |
+
class WPDesk_Flexible_Shipping_AB_Variant_Without_Pointer_Message implements ABVariant {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Define a new value for the generated variant.
|
9 |
+
*
|
10 |
+
* @var int
|
11 |
+
*/
|
12 |
+
const VARIANT_ID = 9;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Is on?
|
16 |
+
*
|
17 |
+
* @param string $functionality Functionality.
|
18 |
+
*
|
19 |
+
* @return bool
|
20 |
+
*/
|
21 |
+
public function is_on( $functionality ) {
|
22 |
+
return ! WPDesk_Flexible_Shipping_AB_Pointer_Message_Test::FS_WITH_POINTER_MESSAGE_VIDEO === $functionality;
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Get variant ID.
|
27 |
+
*
|
28 |
+
* @return int|string
|
29 |
+
*/
|
30 |
+
public function get_variant_id() {
|
31 |
+
return self::VARIANT_ID;
|
32 |
+
}
|
33 |
+
}
|
classes/abtests/class-ab-menu-page.php
DELETED
@@ -1,107 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
use WPDesk\ABTesting\ABVariant;
|
4 |
-
|
5 |
-
class WPDesk_Flexible_Shipping_AB_MenuPage implements \WPDesk\PluginBuilder\Plugin\Hookable {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Selected variant for AB message testing.
|
9 |
-
*
|
10 |
-
* @var ABVariant
|
11 |
-
*/
|
12 |
-
private $variant;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Plugin path
|
16 |
-
*
|
17 |
-
* @var string
|
18 |
-
*/
|
19 |
-
private $plugin_path;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Menu position.
|
23 |
-
* It must be a string to set it correctly under WooCommerce
|
24 |
-
*
|
25 |
-
* @var string
|
26 |
-
*/
|
27 |
-
const MENU_POSITION = '55.7';
|
28 |
-
|
29 |
-
/**
|
30 |
-
* WPDesk_Flexible_Shipping_AB_MenuPage constructor.
|
31 |
-
*
|
32 |
-
* @param ABVariant $variant
|
33 |
-
* @param string $plugin_path
|
34 |
-
*/
|
35 |
-
public function __construct( ABVariant $variant, $plugin_path ) {
|
36 |
-
$this->variant = $variant;
|
37 |
-
$this->plugin_path = $plugin_path;
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Fires hooks
|
42 |
-
*
|
43 |
-
* @return void
|
44 |
-
*/
|
45 |
-
public function hooks() {
|
46 |
-
if ( $this->variant->is_on( WPDesk_Flexible_Shipping_AB_MenuTest::FS_WITH_MENU ) ) {
|
47 |
-
add_action( 'admin_menu', array( $this, 'add_flexible_shipping_menu_page' ), 999 );
|
48 |
-
add_action( 'admin_head', array( $this, 'add_flexible_shipping_menu_icon' ) );
|
49 |
-
add_filter( 'wpdesk_tracker_notice_screens', array(
|
50 |
-
$this,
|
51 |
-
'show_tracker_message_on_flexible_shipping_menu_page'
|
52 |
-
) );
|
53 |
-
}
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Add FS screen ID for tracker message
|
58 |
-
*
|
59 |
-
* @param $screens
|
60 |
-
*
|
61 |
-
* @return array
|
62 |
-
*/
|
63 |
-
public function show_tracker_message_on_flexible_shipping_menu_page( array $screens ) {
|
64 |
-
$screens[] = 'toplevel_page_flexible-shipping-menu';
|
65 |
-
|
66 |
-
return $screens;
|
67 |
-
}
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Add Flexible Shipping menu page near WC Products
|
71 |
-
*
|
72 |
-
* @return void
|
73 |
-
*/
|
74 |
-
public function add_flexible_shipping_menu_page() {
|
75 |
-
add_menu_page(
|
76 |
-
__( 'Flexible Shipping', 'flexible-shipping' ),
|
77 |
-
__( 'Flexible Shipping', 'flexible-shipping' ),
|
78 |
-
'edit_posts',
|
79 |
-
'flexible-shipping-menu',
|
80 |
-
array( $this, 'flexible_shipping_menu_page_wrapper' ),
|
81 |
-
null,
|
82 |
-
self::MENU_POSITION
|
83 |
-
);
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Add inline CSS for FS menu page
|
88 |
-
*
|
89 |
-
* @return void
|
90 |
-
*/
|
91 |
-
public function add_flexible_shipping_menu_icon() {
|
92 |
-
include $this->plugin_path . '/classes/views/html-menu-icon.php';
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Flexible Shipping menu page body
|
97 |
-
*
|
98 |
-
* @return void
|
99 |
-
*/
|
100 |
-
public function flexible_shipping_menu_page_wrapper() {
|
101 |
-
?>
|
102 |
-
<?php $title = __( 'Flexible Shipping', 'flexible-shipping' ); ?>
|
103 |
-
<div class="wrap">
|
104 |
-
<?php include $this->plugin_path . '/classes/saas/views/html-shipping-method-info-description-body.php'; ?>
|
105 |
-
<?php
|
106 |
-
}
|
107 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/abtests/{class-ab-menu-test.php → class-ab-pointer-message-test.php}
RENAMED
@@ -11,30 +11,38 @@ use WPDesk\ABTesting\ABVariant;
|
|
11 |
*
|
12 |
* We've created 2 groups/variants.
|
13 |
*/
|
14 |
-
class
|
15 |
-
const TEST_NAME = '
|
16 |
-
const GROUP_COUNT =
|
17 |
|
18 |
-
const
|
19 |
-
const
|
|
|
20 |
|
21 |
-
const
|
22 |
-
const FS_WITHOUT_MENU = 'no_menu';
|
23 |
-
|
24 |
-
const NEW_USER_AFTER_THIS_DATE = '2019-02-18 14:00:00';
|
25 |
|
26 |
const VARIANT_ID_FOR_OLD_INSTALLATION = 0;
|
27 |
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
public $container;
|
30 |
|
|
|
|
|
|
|
31 |
public function __construct() {
|
32 |
$container = new WordpressOptionsContainer();
|
33 |
$this->container = $container;
|
34 |
|
35 |
parent::__construct( self::GROUP_COUNT, self::TEST_NAME, $container );
|
36 |
|
37 |
-
$this->
|
38 |
}
|
39 |
|
40 |
/**
|
@@ -42,18 +50,16 @@ class WPDesk_Flexible_Shipping_AB_MenuTest extends EqualGroupsRandomABTest {
|
|
42 |
*/
|
43 |
public function reset() {
|
44 |
parent::reset();
|
45 |
-
$this->
|
46 |
}
|
47 |
|
48 |
/**
|
49 |
* If old user then should have static group
|
50 |
*
|
51 |
-
* @param PersistentContainer $container
|
52 |
-
*
|
53 |
-
* @return void
|
54 |
*/
|
55 |
-
private function
|
56 |
-
if ( $this->current_variant_id
|
57 |
$this->current_variant_id = self::VARIANT_ID_FOR_OLD_INSTALLATION;
|
58 |
$container->set( $this->get_container_key(), self::VARIANT_ID_FOR_OLD_INSTALLATION );
|
59 |
}
|
@@ -69,6 +75,8 @@ class WPDesk_Flexible_Shipping_AB_MenuTest extends EqualGroupsRandomABTest {
|
|
69 |
}
|
70 |
|
71 |
/**
|
|
|
|
|
72 |
* @return int timestamp
|
73 |
*/
|
74 |
private function activation_date_according_to_wpdesk_helper() {
|
@@ -83,16 +91,20 @@ class WPDesk_Flexible_Shipping_AB_MenuTest extends EqualGroupsRandomABTest {
|
|
83 |
}
|
84 |
|
85 |
/**
|
|
|
|
|
86 |
* @return ABVariant
|
87 |
*/
|
88 |
public function get_variant() {
|
89 |
switch ( $this->current_variant_id ) {
|
90 |
-
case self::
|
91 |
-
return new
|
92 |
-
case self::
|
93 |
-
return new
|
|
|
|
|
94 |
default:
|
95 |
return new WPDesk_Flexible_Shipping_AB_Variant_Old();
|
96 |
}
|
97 |
}
|
98 |
-
}
|
11 |
*
|
12 |
* We've created 2 groups/variants.
|
13 |
*/
|
14 |
+
class WPDesk_Flexible_Shipping_AB_Pointer_Message_Test extends EqualGroupsRandomABTest {
|
15 |
+
const TEST_NAME = 'pointer-message-test';
|
16 |
+
const GROUP_COUNT = 3;
|
17 |
|
18 |
+
const VARIANT_WITH_POINTER_MESSAGE_VIDEO = 1;
|
19 |
+
const VARIANT_WITH_POINTER_MESSAGE_TEXT = 2;
|
20 |
+
const VARIANT_WITHOUT_POINTER_MESSAGE = 3;
|
21 |
|
22 |
+
const NEW_USER_AFTER_THIS_DATE = '2019-04-11 01:00:00';
|
|
|
|
|
|
|
23 |
|
24 |
const VARIANT_ID_FOR_OLD_INSTALLATION = 0;
|
25 |
|
26 |
+
const FS_WITH_POINTER_MESSAGE_VIDEO = 'message_video';
|
27 |
+
const FS_WITH_POINTER_MESSAGE_TEXT = 'message_text';
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Persistent container
|
31 |
+
*
|
32 |
+
* @var PersistentContainer
|
33 |
+
*/
|
34 |
public $container;
|
35 |
|
36 |
+
/**
|
37 |
+
* WPDesk_Flexible_Shipping_AB_Pointer_Message_Test constructor.
|
38 |
+
*/
|
39 |
public function __construct() {
|
40 |
$container = new WordpressOptionsContainer();
|
41 |
$this->container = $container;
|
42 |
|
43 |
parent::__construct( self::GROUP_COUNT, self::TEST_NAME, $container );
|
44 |
|
45 |
+
$this->override_id_for_old_user( $container );
|
46 |
}
|
47 |
|
48 |
/**
|
50 |
*/
|
51 |
public function reset() {
|
52 |
parent::reset();
|
53 |
+
$this->override_id_for_old_user( $this->container );
|
54 |
}
|
55 |
|
56 |
/**
|
57 |
* If old user then should have static group
|
58 |
*
|
59 |
+
* @param PersistentContainer $container Persistent container.
|
|
|
|
|
60 |
*/
|
61 |
+
private function override_id_for_old_user( PersistentContainer $container ) {
|
62 |
+
if ( self::VARIANT_ID_FOR_OLD_INSTALLATION !== $this->current_variant_id && $this->is_old_installation() ) {
|
63 |
$this->current_variant_id = self::VARIANT_ID_FOR_OLD_INSTALLATION;
|
64 |
$container->set( $this->get_container_key(), self::VARIANT_ID_FOR_OLD_INSTALLATION );
|
65 |
}
|
75 |
}
|
76 |
|
77 |
/**
|
78 |
+
* Activation date according to wpdesk helper.
|
79 |
+
*
|
80 |
* @return int timestamp
|
81 |
*/
|
82 |
private function activation_date_according_to_wpdesk_helper() {
|
91 |
}
|
92 |
|
93 |
/**
|
94 |
+
* Get variant.
|
95 |
+
*
|
96 |
* @return ABVariant
|
97 |
*/
|
98 |
public function get_variant() {
|
99 |
switch ( $this->current_variant_id ) {
|
100 |
+
case self::VARIANT_WITH_POINTER_MESSAGE_VIDEO:
|
101 |
+
return new WPDesk_Flexible_Shipping_AB_Variant_With_Pointer_Message_Video();
|
102 |
+
case self::VARIANT_WITH_POINTER_MESSAGE_TEXT:
|
103 |
+
return new WPDesk_Flexible_Shipping_AB_Variant_With_Pointer_Message_Text();
|
104 |
+
case self::VARIANT_WITHOUT_POINTER_MESSAGE:
|
105 |
+
return new WPDesk_Flexible_Shipping_AB_Variant_Without_Pointer_Message();
|
106 |
default:
|
107 |
return new WPDesk_Flexible_Shipping_AB_Variant_Old();
|
108 |
}
|
109 |
}
|
110 |
+
}
|
classes/abtests/class-ab-tracker-deactivation-data.php
CHANGED
@@ -10,6 +10,8 @@ use WPDesk\ABTesting\ABVariant;
|
|
10 |
class WPDesk_Flexible_Shipping_AB_Tracker_Deactivation_Data implements \WPDesk\PluginBuilder\Plugin\Hookable {
|
11 |
|
12 |
/**
|
|
|
|
|
13 |
* @var ABVariant
|
14 |
*/
|
15 |
protected $variant;
|
@@ -17,7 +19,7 @@ class WPDesk_Flexible_Shipping_AB_Tracker_Deactivation_Data implements \WPDesk\P
|
|
17 |
/**
|
18 |
* WPDesk_Flexible_Shipping_AB_Tracker_Deactivation_Data constructor.
|
19 |
*
|
20 |
-
* @param ABVariant $variant
|
21 |
*/
|
22 |
public function __construct( ABVariant $variant ) {
|
23 |
$this->variant = $variant;
|
@@ -35,12 +37,14 @@ class WPDesk_Flexible_Shipping_AB_Tracker_Deactivation_Data implements \WPDesk\P
|
|
35 |
/**
|
36 |
* Set variant ID to data array
|
37 |
*
|
38 |
-
* @param array $data
|
39 |
*
|
40 |
* @return array
|
41 |
*/
|
42 |
public function append_variant_id_to_data( array $data ) {
|
43 |
-
$data
|
|
|
|
|
44 |
return $data;
|
45 |
}
|
46 |
|
10 |
class WPDesk_Flexible_Shipping_AB_Tracker_Deactivation_Data implements \WPDesk\PluginBuilder\Plugin\Hookable {
|
11 |
|
12 |
/**
|
13 |
+
* Variant.
|
14 |
+
*
|
15 |
* @var ABVariant
|
16 |
*/
|
17 |
protected $variant;
|
19 |
/**
|
20 |
* WPDesk_Flexible_Shipping_AB_Tracker_Deactivation_Data constructor.
|
21 |
*
|
22 |
+
* @param ABVariant $variant Variant.
|
23 |
*/
|
24 |
public function __construct( ABVariant $variant ) {
|
25 |
$this->variant = $variant;
|
37 |
/**
|
38 |
* Set variant ID to data array
|
39 |
*
|
40 |
+
* @param array $data Data.
|
41 |
*
|
42 |
* @return array
|
43 |
*/
|
44 |
public function append_variant_id_to_data( array $data ) {
|
45 |
+
if ( WPDesk_Flexible_Shipping_Tracker::is_plugin_flexible_shipping_in_data( $data ) ) {
|
46 |
+
$data['variant_id'] = $this->variant->get_variant_id();
|
47 |
+
}
|
48 |
return $data;
|
49 |
}
|
50 |
|
classes/class-flexible-shipping-plugin.php
CHANGED
@@ -97,21 +97,19 @@ class Flexible_Shipping_Plugin
|
|
97 |
|
98 |
$this->admin_notices = new WPDesk_Flexible_Shipping_Admin_Notices( $this );
|
99 |
|
100 |
-
$abtesting = new
|
101 |
$this->variant = $abtesting->get_variant();
|
102 |
|
103 |
$this->add_hookable( new WPDesk_Flexible_Shipping_AB_Tracker_Deactivation_Data( $this->variant ) );
|
104 |
|
105 |
-
$this->add_hookable( new WPDesk_Flexible_Shipping_AB_MenuPage( $this->variant, $this->plugin_info->get_plugin_dir() ) );
|
106 |
-
|
107 |
$this->add_hookable( new WPDesk_Flexible_Shipping_Add_Shipping( ) );
|
108 |
|
109 |
$connection = new WPDesk_Flexible_Shipping_SaaS_Connection( $this->logger, $this->saas_platform_links );
|
110 |
$this->add_hookable( $connection );
|
111 |
|
112 |
-
$this->add_hookable( new WPDesk_Flexible_Shipping_SaaS_User_Registration( $connection, $this->saas_platform_links
|
113 |
|
114 |
-
$services_manager = new WPDesk_Flexible_Shipping_SaaS_Services_Manager( $connection, $this->saas_platform_links, $this->renderer, $this->
|
115 |
$this->add_hookable( $services_manager );
|
116 |
|
117 |
if ( $services_manager->is_require_uk_states() ) {
|
@@ -141,6 +139,10 @@ class Flexible_Shipping_Plugin
|
|
141 |
|
142 |
$this->add_hookable( new WPDesk_Flexible_Shipping_Shipment_Saas_Attachments_Ajax() );
|
143 |
|
|
|
|
|
|
|
|
|
144 |
}
|
145 |
|
146 |
/**
|
@@ -443,11 +445,7 @@ class Flexible_Shipping_Plugin
|
|
443 |
|
444 |
$docs_link .= '??utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=&utm_content=fs-plugins-docs';
|
445 |
|
446 |
-
|
447 |
-
$settings_url = admin_url( 'admin.php?page=wc-settings&tab=shipping§ion=' . WPDesk_Flexible_Shipping_SaaS_Settings::METHOD_ID );
|
448 |
-
} else {
|
449 |
-
$settings_url = admin_url( 'admin.php?page=flexible-shipping-menu' );
|
450 |
-
}
|
451 |
|
452 |
|
453 |
$plugin_links = array(
|
97 |
|
98 |
$this->admin_notices = new WPDesk_Flexible_Shipping_Admin_Notices( $this );
|
99 |
|
100 |
+
$abtesting = new WPDesk_Flexible_Shipping_AB_Pointer_Message_Test();
|
101 |
$this->variant = $abtesting->get_variant();
|
102 |
|
103 |
$this->add_hookable( new WPDesk_Flexible_Shipping_AB_Tracker_Deactivation_Data( $this->variant ) );
|
104 |
|
|
|
|
|
105 |
$this->add_hookable( new WPDesk_Flexible_Shipping_Add_Shipping( ) );
|
106 |
|
107 |
$connection = new WPDesk_Flexible_Shipping_SaaS_Connection( $this->logger, $this->saas_platform_links );
|
108 |
$this->add_hookable( $connection );
|
109 |
|
110 |
+
$this->add_hookable( new WPDesk_Flexible_Shipping_SaaS_User_Registration( $connection, $this->saas_platform_links ) );
|
111 |
|
112 |
+
$services_manager = new WPDesk_Flexible_Shipping_SaaS_Services_Manager( $connection, $this->saas_platform_links, $this->renderer, $this->logger );
|
113 |
$this->add_hookable( $services_manager );
|
114 |
|
115 |
if ( $services_manager->is_require_uk_states() ) {
|
139 |
|
140 |
$this->add_hookable( new WPDesk_Flexible_Shipping_Shipment_Saas_Attachments_Ajax() );
|
141 |
|
142 |
+
$this->add_hookable( new WPDesk_Flexible_Shipping_Pointer_Messages( $this->variant ) );
|
143 |
+
|
144 |
+
$this->add_hookable( new WPDesk_Flexible_Shipping_Method_Created_Tracker_Deactivation_Data() );
|
145 |
+
|
146 |
}
|
147 |
|
148 |
/**
|
445 |
|
446 |
$docs_link .= '??utm_campaign=flexible-shipping&utm_source=user-site&utm_medium=link&utm_term=&utm_content=fs-plugins-docs';
|
447 |
|
448 |
+
$settings_url = admin_url( 'admin.php?page=wc-settings&tab=shipping§ion=' . WPDesk_Flexible_Shipping_SaaS_Settings::METHOD_ID );
|
|
|
|
|
|
|
|
|
449 |
|
450 |
|
451 |
$plugin_links = array(
|
classes/class-method-created-tracker-deactivation-data.php
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class by which we can push created methods data to the deactivation filter
|
5 |
+
*/
|
6 |
+
class WPDesk_Flexible_Shipping_Method_Created_Tracker_Deactivation_Data implements \WPDesk\PluginBuilder\Plugin\Hookable {
|
7 |
+
|
8 |
+
const OPTION_FS_METHOD_CREATED_TRACKER = 'fs_method_created_tracker';
|
9 |
+
|
10 |
+
const TRACK_USERS_AFTER_THIS_DATE = '2019-04-11 01:00:00';
|
11 |
+
|
12 |
+
const NO_ACTION_WITH_FS = 0;
|
13 |
+
const FLEXIBLE_SHIPPING_METHOD_ADDED_TO_ZONE = 1;
|
14 |
+
const FLEXIBLE_SHIPPING_METHOD_ADDED_TO_FS = 2;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Fires hooks
|
18 |
+
*/
|
19 |
+
public function hooks() {
|
20 |
+
add_filter( 'wpdesk_tracker_deactivation_data', array( $this, 'append_variant_id_to_data' ) );
|
21 |
+
add_action( 'woocommerce_shipping_zone_method_added', array( $this, 'maybe_update_option_on_zone_method_added' ), 10, 3 );
|
22 |
+
add_filter( 'flexible_shipping_process_admin_options', array( $this, 'maybe_update_option_on_fs_method_saved' ) );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Maybe update option on FS method saved.
|
27 |
+
*
|
28 |
+
* @param array $shipping_method Shipping method.
|
29 |
+
*
|
30 |
+
* @return array
|
31 |
+
*/
|
32 |
+
public function maybe_update_option_on_fs_method_saved( array $shipping_method ) {
|
33 |
+
if ( ! $this->is_old_installation() ) {
|
34 |
+
$option_value = intval( get_option( self::OPTION_FS_METHOD_CREATED_TRACKER, '0' ) );
|
35 |
+
if ( self::FLEXIBLE_SHIPPING_METHOD_ADDED_TO_FS !== $option_value ) {
|
36 |
+
update_option( self::OPTION_FS_METHOD_CREATED_TRACKER, self::FLEXIBLE_SHIPPING_METHOD_ADDED_TO_FS );
|
37 |
+
}
|
38 |
+
}
|
39 |
+
return $shipping_method;
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Maybe update option on zone method added action.
|
44 |
+
*
|
45 |
+
* @param int $instance_id Instance ID.
|
46 |
+
* @param string $type Type.
|
47 |
+
* @param int $zone_id Zone ID.
|
48 |
+
*/
|
49 |
+
public function maybe_update_option_on_zone_method_added( $instance_id, $type, $zone_id ) {
|
50 |
+
if ( 'flexible_shipping' === $type ) {
|
51 |
+
if ( ! $this->is_old_installation() ) {
|
52 |
+
$option_value = intval( get_option( self::OPTION_FS_METHOD_CREATED_TRACKER, '0' ) );
|
53 |
+
if ( self::NO_ACTION_WITH_FS === $option_value ) {
|
54 |
+
update_option( self::OPTION_FS_METHOD_CREATED_TRACKER, self::FLEXIBLE_SHIPPING_METHOD_ADDED_TO_ZONE );
|
55 |
+
}
|
56 |
+
}
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* If this a old user? If so then FS should work like always.
|
62 |
+
*
|
63 |
+
* @return bool
|
64 |
+
*/
|
65 |
+
private function is_old_installation() {
|
66 |
+
return strtotime( self::TRACK_USERS_AFTER_THIS_DATE ) > $this->activation_date_according_to_wpdesk_helper();
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Activation date according to wpdesk helper.
|
71 |
+
*
|
72 |
+
* @return int timestamp
|
73 |
+
*/
|
74 |
+
private function activation_date_according_to_wpdesk_helper() {
|
75 |
+
$option_name = 'plugin_activation_flexible-shipping/flexible-shipping.php';
|
76 |
+
$activation_date = get_option( $option_name, current_time( 'mysql' ) );
|
77 |
+
|
78 |
+
if ( ! $activation_date ) {
|
79 |
+
return time();
|
80 |
+
}
|
81 |
+
|
82 |
+
return strtotime( $activation_date );
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Set fs_method_created option value to data array
|
87 |
+
*
|
88 |
+
* @param array $data Data.
|
89 |
+
*
|
90 |
+
* @return array
|
91 |
+
*/
|
92 |
+
public function append_variant_id_to_data( array $data ) {
|
93 |
+
if ( ! $this->is_old_installation() ) {
|
94 |
+
if ( WPDesk_Flexible_Shipping_Tracker::is_plugin_flexible_shipping_in_data( $data ) ) {
|
95 |
+
$data['fs_method_created'] = intval( get_option( self::OPTION_FS_METHOD_CREATED_TRACKER, '0' ) );
|
96 |
+
}
|
97 |
+
}
|
98 |
+
return $data;
|
99 |
+
}
|
100 |
+
|
101 |
+
}
|
classes/class-pointer-messages.php
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Adds pointer messages in admin area.
|
5 |
+
*/
|
6 |
+
class WPDesk_Flexible_Shipping_Pointer_Messages implements \WPDesk\PluginBuilder\Plugin\Hookable {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Variant.
|
10 |
+
*
|
11 |
+
* @var \WPDesk\ABTesting\ABVariant
|
12 |
+
*/
|
13 |
+
private $variant;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* WPDesk_Flexible_Shipping_Pointer_Messages constructor.
|
17 |
+
*
|
18 |
+
* @param \WPDesk\ABTesting\ABVariant $variant Variant.
|
19 |
+
*/
|
20 |
+
public function __construct( \WPDesk\ABTesting\ABVariant $variant ) {
|
21 |
+
$this->variant = $variant;
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Hooks.
|
26 |
+
*/
|
27 |
+
public function hooks() {
|
28 |
+
add_action( 'admin_init', array( $this, 'maybe_add_pointer_messages' ) );
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Maybe add pointer messages.
|
33 |
+
*/
|
34 |
+
public function maybe_add_pointer_messages() {
|
35 |
+
if ( $this->variant->is_on( WPDesk_Flexible_Shipping_AB_Pointer_Message_Test::FS_WITH_POINTER_MESSAGE_VIDEO ) ) {
|
36 |
+
$this->add_pointer_message_video();
|
37 |
+
} elseif ( $this->variant->is_on( WPDesk_Flexible_Shipping_AB_Pointer_Message_Test::FS_WITH_POINTER_MESSAGE_TEXT ) ) {
|
38 |
+
$this->add_pointer_message_text();
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Add pointer message with video.
|
44 |
+
*/
|
45 |
+
private function add_pointer_message_video() {
|
46 |
+
ob_start();
|
47 |
+
include 'views/html-pointer-message-fs-video.php';
|
48 |
+
$content = trim( ob_get_contents() );
|
49 |
+
ob_end_clean();
|
50 |
+
|
51 |
+
$this->add_pointer_message(
|
52 |
+
'fs_how_to_video',
|
53 |
+
__( 'Watch how to use Flexible Shipping', 'flexible-shipping' ),
|
54 |
+
$content
|
55 |
+
);
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Add pointer message with text.
|
60 |
+
*/
|
61 |
+
private function add_pointer_message_text() {
|
62 |
+
$shipping_zones_url = admin_url( 'admin.php?page=wc-settings&tab=shipping' );
|
63 |
+
$shipping_methods_url = get_locale() === 'pl_PL' ? 'https://www.wpdesk.pl/docs/flexible-shipping-pro-woocommerce-docs/#Metody_wysylki' : 'https://docs.flexibleshipping.com/article/29-shipping-methods';
|
64 |
+
ob_start();
|
65 |
+
include 'views/html-pointer-message-fs-text.php';
|
66 |
+
$content = trim( ob_get_contents() );
|
67 |
+
ob_end_clean();
|
68 |
+
|
69 |
+
$this->add_pointer_message(
|
70 |
+
'fs_how_to_text',
|
71 |
+
__( 'How to start with Flexible Shipping', 'flexible-shipping' ),
|
72 |
+
$content
|
73 |
+
);
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Add pointer message.
|
78 |
+
*
|
79 |
+
* @param string $id ID.
|
80 |
+
* @param string $title Title.
|
81 |
+
* @param string $content Content.
|
82 |
+
*/
|
83 |
+
private function add_pointer_message( $id, $title, $content ) {
|
84 |
+
$pointer_scripts = new \WPDesk\Pointer\PointersScripts( array( 'plugins' ) );
|
85 |
+
$pointer_scripts->hooks();
|
86 |
+
|
87 |
+
$pointer_conditions = new \WPDesk\Pointer\PointerConditions( 'plugins', 'manage_woocommerce' );
|
88 |
+
$pointer_message = new \WPDesk\Pointer\PointerMessage(
|
89 |
+
$id,
|
90 |
+
'#toplevel_page_woocommerce',
|
91 |
+
$title,
|
92 |
+
$content,
|
93 |
+
new \WPDesk\Pointer\PointerPosition( \WPDesk\Pointer\PointerPosition::LEFT, \WPDesk\Pointer\PointerPosition::LEFT ),
|
94 |
+
'wp-pointer',
|
95 |
+
480,
|
96 |
+
$pointer_conditions
|
97 |
+
);
|
98 |
+
}
|
99 |
+
|
100 |
+
}
|
classes/saas/class-saas-settings.php
CHANGED
@@ -4,8 +4,6 @@
|
|
4 |
* Class WPDesk_Flexible_Shipping_SaaS_Settings
|
5 |
*/
|
6 |
|
7 |
-
use WPDesk\ABTesting\ABVariant;
|
8 |
-
|
9 |
class WPDesk_Flexible_Shipping_SaaS_Settings extends WC_Shipping_Method implements WPDesk_Flexible_Shipping_Saas_Connection_Aware {
|
10 |
|
11 |
const METHOD_ID = 'flexible_shipping_connect';
|
@@ -60,13 +58,6 @@ class WPDesk_Flexible_Shipping_SaaS_Settings extends WC_Shipping_Method implemen
|
|
60 |
*/
|
61 |
private $new_courier_settings_section;
|
62 |
|
63 |
-
/**
|
64 |
-
* Selected variant for AB message testing.
|
65 |
-
*
|
66 |
-
* @var ABVariant
|
67 |
-
*/
|
68 |
-
private $variant;
|
69 |
-
|
70 |
/**
|
71 |
* WPDesk_Flexible_Shipping_Connect constructor.
|
72 |
*
|
@@ -79,19 +70,13 @@ class WPDesk_Flexible_Shipping_SaaS_Settings extends WC_Shipping_Method implemen
|
|
79 |
$instance_id = 0,
|
80 |
$saas_connection = null,
|
81 |
WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links = null,
|
82 |
-
$shipping_methods_manager = null
|
83 |
-
ABVariant $variant
|
84 |
|
85 |
) {
|
86 |
parent::__construct( $instance_id );
|
87 |
$this->id = self::METHOD_ID;
|
88 |
$this->enabled = 'no';
|
89 |
$this->method_title = __( 'Flexible Shipping', 'flexible-shipping' );
|
90 |
-
$this->variant = $variant;
|
91 |
-
|
92 |
-
if( $this->variant->is_on( WPDesk_Flexible_Shipping_AB_MenuTest::FS_WITH_MENU ) ) {
|
93 |
-
$this->method_title = __( 'FS Connect', 'flexible-shipping' );
|
94 |
-
}
|
95 |
|
96 |
$this->supports = array(
|
97 |
'settings',
|
@@ -291,21 +276,14 @@ class WPDesk_Flexible_Shipping_SaaS_Settings extends WC_Shipping_Method implemen
|
|
291 |
*/
|
292 |
public function init_form_fields() {
|
293 |
$this->form_fields = array(
|
294 |
-
'fsconnect' => array(
|
295 |
-
'type' => 'fsconnect',
|
296 |
-
),
|
297 |
'flexible_shipping' => array(
|
298 |
'type' => 'flexible_shipping',
|
299 |
),
|
300 |
-
'saas_connection'
|
301 |
'type' => 'saas_connection',
|
302 |
),
|
303 |
);
|
304 |
|
305 |
-
if( !$this->variant->is_on( WPDesk_Flexible_Shipping_AB_MenuTest::FS_WITH_MENU ) ) {
|
306 |
-
unset( $this->form_fields['fsconnect'] );
|
307 |
-
}
|
308 |
-
|
309 |
if ( $this->is_in_settings() ) {
|
310 |
if ( $this->saas_connection->is_connected() ) {
|
311 |
$shipping_providers_from_platform = $this->get_shipping_services_from_platform();
|
4 |
* Class WPDesk_Flexible_Shipping_SaaS_Settings
|
5 |
*/
|
6 |
|
|
|
|
|
7 |
class WPDesk_Flexible_Shipping_SaaS_Settings extends WC_Shipping_Method implements WPDesk_Flexible_Shipping_Saas_Connection_Aware {
|
8 |
|
9 |
const METHOD_ID = 'flexible_shipping_connect';
|
58 |
*/
|
59 |
private $new_courier_settings_section;
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
/**
|
62 |
* WPDesk_Flexible_Shipping_Connect constructor.
|
63 |
*
|
70 |
$instance_id = 0,
|
71 |
$saas_connection = null,
|
72 |
WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links = null,
|
73 |
+
$shipping_methods_manager = null
|
|
|
74 |
|
75 |
) {
|
76 |
parent::__construct( $instance_id );
|
77 |
$this->id = self::METHOD_ID;
|
78 |
$this->enabled = 'no';
|
79 |
$this->method_title = __( 'Flexible Shipping', 'flexible-shipping' );
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
$this->supports = array(
|
82 |
'settings',
|
276 |
*/
|
277 |
public function init_form_fields() {
|
278 |
$this->form_fields = array(
|
|
|
|
|
|
|
279 |
'flexible_shipping' => array(
|
280 |
'type' => 'flexible_shipping',
|
281 |
),
|
282 |
+
'saas_connection' => array(
|
283 |
'type' => 'saas_connection',
|
284 |
),
|
285 |
);
|
286 |
|
|
|
|
|
|
|
|
|
287 |
if ( $this->is_in_settings() ) {
|
288 |
if ( $this->saas_connection->is_connected() ) {
|
289 |
$shipping_providers_from_platform = $this->get_shipping_services_from_platform();
|
classes/saas/class-saas-shipping-services-manager.php
CHANGED
@@ -3,8 +3,6 @@
|
|
3 |
* Class WPDesk_Flexible_Shipping_Shipping_Methods_Manager
|
4 |
*/
|
5 |
|
6 |
-
use WPDesk\ABTesting\ABVariant;
|
7 |
-
|
8 |
class WPDesk_Flexible_Shipping_SaaS_Services_Manager
|
9 |
implements \WPDesk\PluginBuilder\Plugin\HookablePluginDependant, \WPDesk\PluginBuilder\Plugin\HookableCollection
|
10 |
{
|
@@ -79,30 +77,20 @@ class WPDesk_Flexible_Shipping_SaaS_Services_Manager
|
|
79 |
*/
|
80 |
private $logger;
|
81 |
|
82 |
-
/**
|
83 |
-
* Selected variant for AB message testing.
|
84 |
-
*
|
85 |
-
* @var ABVariant
|
86 |
-
*/
|
87 |
-
private $variant;
|
88 |
-
|
89 |
/**
|
90 |
* WPDesk_Flexible_Shipping_Services constructor.
|
91 |
*
|
92 |
* @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection Connection.
|
93 |
* @param WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links Links.
|
94 |
* @param WPDesk\View\Renderer\Renderer $renderer Renderer.
|
95 |
-
* @param ABVariant $variant AB tests variant.
|
96 |
* @param \Psr\Log\LoggerInterface $logger Logger.
|
97 |
*/
|
98 |
public function __construct(
|
99 |
WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection,
|
100 |
WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links,
|
101 |
WPDesk\View\Renderer\Renderer $renderer,
|
102 |
-
ABVariant $variant,
|
103 |
\Psr\Log\LoggerInterface $logger = null
|
104 |
) {
|
105 |
-
$this->variant = $variant;
|
106 |
$this->saas_connection = $saas_connection;
|
107 |
$this->renderer = $renderer;
|
108 |
if ( null !== $logger ) {
|
@@ -409,8 +397,7 @@ class WPDesk_Flexible_Shipping_SaaS_Services_Manager
|
|
409 |
0,
|
410 |
$this->saas_connection,
|
411 |
$this->saas_platform_links,
|
412 |
-
null
|
413 |
-
$this->variant
|
414 |
);
|
415 |
$this->shipping_method_connect->set_shipping_methods_manager( $this );
|
416 |
}
|
3 |
* Class WPDesk_Flexible_Shipping_Shipping_Methods_Manager
|
4 |
*/
|
5 |
|
|
|
|
|
6 |
class WPDesk_Flexible_Shipping_SaaS_Services_Manager
|
7 |
implements \WPDesk\PluginBuilder\Plugin\HookablePluginDependant, \WPDesk\PluginBuilder\Plugin\HookableCollection
|
8 |
{
|
77 |
*/
|
78 |
private $logger;
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
/**
|
81 |
* WPDesk_Flexible_Shipping_Services constructor.
|
82 |
*
|
83 |
* @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection Connection.
|
84 |
* @param WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links Links.
|
85 |
* @param WPDesk\View\Renderer\Renderer $renderer Renderer.
|
|
|
86 |
* @param \Psr\Log\LoggerInterface $logger Logger.
|
87 |
*/
|
88 |
public function __construct(
|
89 |
WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection,
|
90 |
WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links,
|
91 |
WPDesk\View\Renderer\Renderer $renderer,
|
|
|
92 |
\Psr\Log\LoggerInterface $logger = null
|
93 |
) {
|
|
|
94 |
$this->saas_connection = $saas_connection;
|
95 |
$this->renderer = $renderer;
|
96 |
if ( null !== $logger ) {
|
397 |
0,
|
398 |
$this->saas_connection,
|
399 |
$this->saas_platform_links,
|
400 |
+
null
|
|
|
401 |
);
|
402 |
$this->shipping_method_connect->set_shipping_methods_manager( $this );
|
403 |
}
|
classes/saas/class-saas-user-registration.php
CHANGED
@@ -1,7 +1,5 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
use WPDesk\ABTesting\ABVariant;
|
4 |
-
|
5 |
if ( ! defined( 'ABSPATH' ) ) {
|
6 |
exit;
|
7 |
} // Exit if accessed directly
|
@@ -62,28 +60,18 @@ if ( ! class_exists( 'WPDesk_Flexible_Shipping_SaaS_User_Registration' ) ) {
|
|
62 |
*/
|
63 |
private $saas_platform_links;
|
64 |
|
65 |
-
/**
|
66 |
-
* Selected variant for AB message testing.
|
67 |
-
*
|
68 |
-
* @var ABVariant
|
69 |
-
*/
|
70 |
-
private $variant;
|
71 |
-
|
72 |
/**
|
73 |
* WPDesk_Flexible_Shipping_Services constructor.
|
74 |
*
|
75 |
* @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection Connection.
|
76 |
* @param WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links Links.
|
77 |
-
* @param ABVariant $variant .
|
78 |
*/
|
79 |
public function __construct(
|
80 |
WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection,
|
81 |
-
WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links
|
82 |
-
ABVariant $variant
|
83 |
) {
|
84 |
$this->saas_connection = $saas_connection;
|
85 |
$this->saas_platform_links = $saas_platform_links;
|
86 |
-
$this->variant = $variant;
|
87 |
|
88 |
if ( ! $this->saas_connection->is_connected() && ! $this->is_on_setings_page() ) {
|
89 |
$this->add_hookable( new WPDesk_Flexible_Shipping_SaaS_Registration_Second_Notice( self::FS_CONNECT_FIRST_NOTICE_NAME ) );
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
exit;
|
5 |
} // Exit if accessed directly
|
60 |
*/
|
61 |
private $saas_platform_links;
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
/**
|
64 |
* WPDesk_Flexible_Shipping_Services constructor.
|
65 |
*
|
66 |
* @param WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection Connection.
|
67 |
* @param WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links Links.
|
|
|
68 |
*/
|
69 |
public function __construct(
|
70 |
WPDesk_Flexible_Shipping_SaaS_Connection $saas_connection,
|
71 |
+
WPDesk_Flexible_Shipping_SaaS_Platform_Links $saas_platform_links
|
|
|
72 |
) {
|
73 |
$this->saas_connection = $saas_connection;
|
74 |
$this->saas_platform_links = $saas_platform_links;
|
|
|
75 |
|
76 |
if ( ! $this->saas_connection->is_connected() && ! $this->is_on_setings_page() ) {
|
77 |
$this->add_hookable( new WPDesk_Flexible_Shipping_SaaS_Registration_Second_Notice( self::FS_CONNECT_FIRST_NOTICE_NAME ) );
|
classes/saas/views/html-field-saas-connection.php
CHANGED
@@ -5,6 +5,17 @@
|
|
5 |
<h3 class="wc-settings-sub-title"><?php _e( 'Flexible Shipping Connect', 'flexible-shipping' ); ?></h3>
|
6 |
|
7 |
<?php if ( ! $saas_connected ) : ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
<p>
|
9 |
<?php printf(
|
10 |
/* Translators: url */
|
5 |
<h3 class="wc-settings-sub-title"><?php _e( 'Flexible Shipping Connect', 'flexible-shipping' ); ?></h3>
|
6 |
|
7 |
<?php if ( ! $saas_connected ) : ?>
|
8 |
+
<p>
|
9 |
+
<?php
|
10 |
+
printf(
|
11 |
+
/* Translators: url */
|
12 |
+
__( 'Find out more about the possibilities of %1$sFlexible Shipping Connect%2$s.', 'flexible-shipping' ),
|
13 |
+
'<a target="_blank" href="https://flexibleshipping.com/connect/">',
|
14 |
+
'</a>'
|
15 |
+
);
|
16 |
+
?>
|
17 |
+
</p>
|
18 |
+
<p></p>
|
19 |
<p>
|
20 |
<?php printf(
|
21 |
/* Translators: url */
|
classes/saas/views/html-shipping-method-info-description.php
CHANGED
@@ -1,9 +1,7 @@
|
|
1 |
</table>
|
2 |
<div class="fs-page-wrap">
|
3 |
<?php
|
4 |
-
|
5 |
-
require 'html-shipping-method-info-description-body.php';
|
6 |
-
}
|
7 |
?>
|
8 |
</div>
|
9 |
<table>
|
1 |
</table>
|
2 |
<div class="fs-page-wrap">
|
3 |
<?php
|
4 |
+
require 'html-shipping-method-info-description-body.php';
|
|
|
|
|
5 |
?>
|
6 |
</div>
|
7 |
<table>
|
classes/tracker.php
CHANGED
@@ -8,6 +8,17 @@
|
|
8 |
class WPDesk_Flexible_Shipping_Tracker {
|
9 |
|
10 |
const PLUGIN_ACTION_LINKS_FILTER_NAME = 'plugin_action_links_flexible-shipping/flexible-shipping.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
/**
|
13 |
* Hooks.
|
@@ -28,7 +39,7 @@ class WPDesk_Flexible_Shipping_Tracker {
|
|
28 |
* @return mixed
|
29 |
*/
|
30 |
public function wpdesk_track_plugin_deactivation( $plugins ) {
|
31 |
-
$plugins[
|
32 |
|
33 |
return $plugins;
|
34 |
}
|
@@ -206,10 +217,10 @@ class WPDesk_Flexible_Shipping_Tracker {
|
|
206 |
}
|
207 |
$plugin_links = array();
|
208 |
if ( '0' === $options['wpdesk_tracker_agree'] ) {
|
209 |
-
$opt_in_link = admin_url( 'admin.php?page=wpdesk_tracker&plugin=
|
210 |
$plugin_links[] = '<a href="' . $opt_in_link . '">' . __( 'Opt-in', 'flexible-shipping' ) . '</a>';
|
211 |
} else {
|
212 |
-
$opt_in_link = admin_url( 'plugins.php?wpdesk_tracker_opt_out=1&plugin=
|
213 |
$plugin_links[] = '<a href="' . $opt_in_link . '">' . __( 'Opt-out', 'flexible-shipping' ) . '</a>';
|
214 |
}
|
215 |
|
8 |
class WPDesk_Flexible_Shipping_Tracker {
|
9 |
|
10 |
const PLUGIN_ACTION_LINKS_FILTER_NAME = 'plugin_action_links_flexible-shipping/flexible-shipping.php';
|
11 |
+
const FLEXIBLE_SHIPPING_PLUGIN_FILE = 'flexible-shipping/flexible-shipping.php';
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Is plugin flexible shipping in data.
|
15 |
+
*
|
16 |
+
* @param array $data Data.
|
17 |
+
* @return bool
|
18 |
+
*/
|
19 |
+
public static function is_plugin_flexible_shipping_in_data( $data ) {
|
20 |
+
return is_array( $data ) && isset( $data['plugin'] ) && self::FLEXIBLE_SHIPPING_PLUGIN_FILE === $data['plugin'];
|
21 |
+
}
|
22 |
|
23 |
/**
|
24 |
* Hooks.
|
39 |
* @return mixed
|
40 |
*/
|
41 |
public function wpdesk_track_plugin_deactivation( $plugins ) {
|
42 |
+
$plugins[ self::FLEXIBLE_SHIPPING_PLUGIN_FILE ] = self::FLEXIBLE_SHIPPING_PLUGIN_FILE;
|
43 |
|
44 |
return $plugins;
|
45 |
}
|
217 |
}
|
218 |
$plugin_links = array();
|
219 |
if ( '0' === $options['wpdesk_tracker_agree'] ) {
|
220 |
+
$opt_in_link = admin_url( 'admin.php?page=wpdesk_tracker&plugin=' . self::FLEXIBLE_SHIPPING_PLUGIN_FILE );
|
221 |
$plugin_links[] = '<a href="' . $opt_in_link . '">' . __( 'Opt-in', 'flexible-shipping' ) . '</a>';
|
222 |
} else {
|
223 |
+
$opt_in_link = admin_url( 'plugins.php?wpdesk_tracker_opt_out=1&plugin=' . self::FLEXIBLE_SHIPPING_PLUGIN_FILE );
|
224 |
$plugin_links[] = '<a href="' . $opt_in_link . '">' . __( 'Opt-out', 'flexible-shipping' ) . '</a>';
|
225 |
}
|
226 |
|
classes/views/html-pointer-message-fs-text.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @var string $shipping_zones_url
|
4 |
+
* @var string $shipping_methods_url
|
5 |
+
*/
|
6 |
+
echo sprintf(
|
7 |
+
__( 'To add first Flexible Shipping method go to %1$sShipping zones%2$s and add Flexible Shipping to a shipping zone. More info about %3$sshipping methods%4$s.', 'flexible-shipping' ),
|
8 |
+
'<a href="' . $shipping_zones_url . '">',
|
9 |
+
'</a>',
|
10 |
+
'<a target="_blank" href="' . $shipping_methods_url . '">',
|
11 |
+
'</a>'
|
12 |
+
);
|
classes/views/html-pointer-message-fs-video.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<iframe width="440" height="246" src="https://www.youtube.com/embed/qsFvYoiNDgU?rel=0&showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
|
composer.lock
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
5 |
"This file is @generated automatically"
|
6 |
],
|
7 |
-
"content-hash": "
|
8 |
"packages": [
|
9 |
{
|
10 |
"name": "moneyphp/money",
|
@@ -603,6 +603,57 @@
|
|
603 |
],
|
604 |
"time": "2019-02-01T09:01:34+00:00"
|
605 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
606 |
{
|
607 |
"name": "wpdesk/wp-saas-platform-client",
|
608 |
"version": "1.10",
|
4 |
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
5 |
"This file is @generated automatically"
|
6 |
],
|
7 |
+
"content-hash": "96af9846f6ab4000fb7474b34f137fef",
|
8 |
"packages": [
|
9 |
{
|
10 |
"name": "moneyphp/money",
|
603 |
],
|
604 |
"time": "2019-02-01T09:01:34+00:00"
|
605 |
},
|
606 |
+
{
|
607 |
+
"name": "wpdesk/wp-pointer",
|
608 |
+
"version": "1.0.2",
|
609 |
+
"source": {
|
610 |
+
"type": "git",
|
611 |
+
"url": "https://gitlab.com/wpdesk/wp-pointer.git",
|
612 |
+
"reference": "5fcf88cab27c4a5903caae884044d9285f8d8cd5"
|
613 |
+
},
|
614 |
+
"dist": {
|
615 |
+
"type": "zip",
|
616 |
+
"url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-pointer/repository/archive.zip?sha=5fcf88cab27c4a5903caae884044d9285f8d8cd5",
|
617 |
+
"reference": "5fcf88cab27c4a5903caae884044d9285f8d8cd5",
|
618 |
+
"shasum": ""
|
619 |
+
},
|
620 |
+
"require": {
|
621 |
+
"php": ">=5.5",
|
622 |
+
"wpdesk/wp-builder": "^1.1"
|
623 |
+
},
|
624 |
+
"require-dev": {
|
625 |
+
"10up/wp_mock": "*",
|
626 |
+
"mockery/mockery": "*",
|
627 |
+
"phpunit/phpunit": "<7",
|
628 |
+
"squizlabs/php_codesniffer": "^3.0.2",
|
629 |
+
"wimg/php-compatibility": "^8",
|
630 |
+
"wp-coding-standards/wpcs": "^0.14.1"
|
631 |
+
},
|
632 |
+
"type": "library",
|
633 |
+
"autoload": {
|
634 |
+
"psr-4": {
|
635 |
+
"WPDesk\\Pointer\\": "src/WPDesk/Pointer/"
|
636 |
+
}
|
637 |
+
},
|
638 |
+
"notification-url": "https://packagist.org/downloads/",
|
639 |
+
"license": [
|
640 |
+
"MIT"
|
641 |
+
],
|
642 |
+
"authors": [
|
643 |
+
{
|
644 |
+
"name": "grola",
|
645 |
+
"email": "grola@wpdesk.net"
|
646 |
+
}
|
647 |
+
],
|
648 |
+
"description": "Library for displaying Wordpress pointer messages.",
|
649 |
+
"homepage": "https://gitlab.com/wpdesk/wp-pointer",
|
650 |
+
"keywords": [
|
651 |
+
"admin",
|
652 |
+
"pointer",
|
653 |
+
"wordpress"
|
654 |
+
],
|
655 |
+
"time": "2019-04-08T11:33:03+00:00"
|
656 |
+
},
|
657 |
{
|
658 |
"name": "wpdesk/wp-saas-platform-client",
|
659 |
"version": "1.10",
|
flexible-shipping.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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: 3.3.
|
7 |
Author: WP Desk
|
8 |
Author URI: https://www.wpdesk.net/
|
9 |
Text Domain: flexible-shipping
|
@@ -43,8 +43,8 @@ if ( ! class_exists( 'WPDesk_Basic_Requirement_Checker' ) ) {
|
|
43 |
}
|
44 |
|
45 |
/* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
|
46 |
-
$plugin_version = '3.3.
|
47 |
-
$plugin_release_timestamp = '2019-04-
|
48 |
|
49 |
$plugin_name = 'Flexible Shipping';
|
50 |
$plugin_class_name = 'Flexible_Shipping_Plugin';
|
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: 3.3.4
|
7 |
Author: WP Desk
|
8 |
Author URI: https://www.wpdesk.net/
|
9 |
Text Domain: flexible-shipping
|
43 |
}
|
44 |
|
45 |
/* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
|
46 |
+
$plugin_version = '3.3.4';
|
47 |
+
$plugin_release_timestamp = '2019-04-10';
|
48 |
|
49 |
$plugin_name = 'Flexible Shipping';
|
50 |
$plugin_class_name = 'Flexible_Shipping_Plugin';
|
lang/flexible-shipping-pl_PL.mo
CHANGED
Binary file
|
lang/flexible-shipping-pl_PL.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Flexible Shipping\n"
|
4 |
-
"POT-Creation-Date: 2019-04-
|
5 |
-
"PO-Revision-Date: 2019-04-
|
6 |
"Last-Translator: Piotr Jabłonowski <piotr.jablonowski@wpdesk.net>\n"
|
7 |
"Language-Team: Maciej Swoboda <maciej.swoboda@gmail.com>\n"
|
8 |
"Language: pl_PL\n"
|
@@ -22,18 +22,6 @@ msgstr ""
|
|
22 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
23 |
"X-Poedit-SearchPathExcluded-1: vendor\n"
|
24 |
|
25 |
-
#: classes/abtests/class-ab-menu-page.php:76
|
26 |
-
#: classes/abtests/class-ab-menu-page.php:77
|
27 |
-
#: classes/abtests/class-ab-menu-page.php:102 classes/multilingual.php:44
|
28 |
-
#: classes/multilingual.php:47 classes/multilingual.php:50
|
29 |
-
#: classes/saas/class-saas-settings.php:89
|
30 |
-
#: classes/settings/flexible-shipping.php:16
|
31 |
-
#: classes/settings/flexible-shipping.php:30
|
32 |
-
#: classes/settings/shipping-method-form.php:79 classes/shipping-method.php:27
|
33 |
-
#: classes/shipping-method.php:28 classes/shipping-method.php:46
|
34 |
-
msgid "Flexible Shipping"
|
35 |
-
msgstr "Flexible Shipping"
|
36 |
-
|
37 |
#: classes/admin-notices.php:164
|
38 |
#, php-format
|
39 |
msgid ""
|
@@ -187,19 +175,19 @@ msgstr ""
|
|
187 |
msgid "Bulk shipping manifest - processed orders: %d"
|
188 |
msgstr "Zbiorcze tworzenie protokołów nadania - przetworzone zamówienia: %d"
|
189 |
|
190 |
-
#: classes/class-flexible-shipping-plugin.php:
|
191 |
msgid "Settings"
|
192 |
msgstr "Ustawienia"
|
193 |
|
194 |
-
#: classes/class-flexible-shipping-plugin.php:
|
195 |
msgid "Docs"
|
196 |
msgstr "Docs"
|
197 |
|
198 |
-
#: classes/class-flexible-shipping-plugin.php:
|
199 |
msgid "Support"
|
200 |
msgstr "Wsparcie"
|
201 |
|
202 |
-
#: classes/class-flexible-shipping-plugin.php:
|
203 |
msgid "Upgrade"
|
204 |
msgstr "Kup PRO"
|
205 |
|
@@ -221,6 +209,14 @@ msgstr "Wybierz integrację"
|
|
221 |
msgid "Add shipping"
|
222 |
msgstr "Dodaj przesyłkę"
|
223 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
#: classes/csv/class-csv-importer.php:86
|
225 |
msgid ""
|
226 |
"Sorry, there has been an error. The CSV is invalid or incorrect file type."
|
@@ -404,6 +400,15 @@ msgstr "Przesyłka"
|
|
404 |
msgid "Order"
|
405 |
msgstr "Zamówienie"
|
406 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
407 |
#: classes/saas/checkout-fields/class-saas-checkout-field-collection-points.php:123
|
408 |
msgid "Select point from map"
|
409 |
msgstr "Wybierz punkt z mapy"
|
@@ -593,15 +598,11 @@ msgstr "Przejdź do ustawień %s</a>"
|
|
593 |
msgid "%1$s%2$s (new)%3$s"
|
594 |
msgstr "%1$s%2$s (nowość)%3$s"
|
595 |
|
596 |
-
#: classes/saas/class-saas-settings.php:
|
597 |
-
msgid "FS Connect"
|
598 |
-
msgstr "FS Connect"
|
599 |
-
|
600 |
-
#: classes/saas/class-saas-settings.php:258
|
601 |
msgid "Connect Services"
|
602 |
msgstr "Usługi Connect"
|
603 |
|
604 |
-
#: classes/saas/class-saas-settings.php:
|
605 |
msgid ""
|
606 |
"Enable services to automate shipping and print labels with Flexible Shipping "
|
607 |
"Connect."
|
@@ -609,7 +610,7 @@ msgstr ""
|
|
609 |
"Włącz usługi, aby automatyzować wysyłkę i pobierać etykiety dzięki Flexible "
|
610 |
"Shipping Connect."
|
611 |
|
612 |
-
#: classes/saas/class-saas-settings.php:
|
613 |
msgid "Advanced settings"
|
614 |
msgstr "Ustawienia zaawansowane"
|
615 |
|
@@ -722,7 +723,7 @@ msgstr ""
|
|
722 |
msgid "You need to configure the service. %1$sGo to %2$s settings.%3$s"
|
723 |
msgstr "Musisz skonfigurować usługę. %1$sPrzejdź do %2$s ustawień.%3$s"
|
724 |
|
725 |
-
#: classes/saas/class-saas-shipping-services-manager.php:
|
726 |
#, php-format
|
727 |
msgid "%1$sYour settings have been saved.%2$s"
|
728 |
msgstr "%1$sUstawienia zostały zapisane.%2$s"
|
@@ -731,22 +732,22 @@ msgstr "%1$sUstawienia zostały zapisane.%2$s"
|
|
731 |
msgid "Services"
|
732 |
msgstr "Usługi"
|
733 |
|
734 |
-
#: classes/saas/class-saas-user-registration.php:
|
735 |
-
#: classes/saas/class-saas-user-registration.php:
|
736 |
msgid "Flexible Shipping Connect Registration"
|
737 |
msgstr "Rejestracja Flexible Shipping Connect"
|
738 |
|
739 |
-
#: classes/saas/class-saas-user-registration.php:
|
740 |
msgid ""
|
741 |
"There are some connection problems. Please try again in few minutes. Thanks!"
|
742 |
msgstr ""
|
743 |
"Chwilowe problemy z połączeniem. Spróbuj ponownie za kilka minut. Dziękujemy!"
|
744 |
|
745 |
-
#: classes/saas/class-saas-user-registration.php:
|
746 |
msgid "Please enter a valid email!"
|
747 |
msgstr "Proszę podać poprawny adres e-mail!"
|
748 |
|
749 |
-
#: classes/saas/class-saas-user-registration.php:
|
750 |
#, php-format
|
751 |
msgid ""
|
752 |
"%1$sAccount created, please check your email and click the activation link "
|
@@ -757,7 +758,7 @@ msgstr ""
|
|
757 |
"połączyć (%3$s).%2$s Jeśli nie otrzymałeś e-maila, proszę %4$sskontaktuj się "
|
758 |
"z nami%5$s."
|
759 |
|
760 |
-
#: classes/saas/class-saas-user-registration.php:
|
761 |
#, php-format
|
762 |
msgid ""
|
763 |
"Your store (%1$s) is already registered with another account! You can "
|
@@ -768,7 +769,7 @@ msgstr ""
|
|
768 |
"zarejestrować swoją domenę za pomocą jednego konta. Jeśli masz pytania, "
|
769 |
"%2$sskontaktuj się z nami%3$s."
|
770 |
|
771 |
-
#: classes/saas/class-saas-user-registration.php:
|
772 |
#, php-format
|
773 |
msgid ""
|
774 |
"Our demo does not support Flexible Shipping Connect registration. Try FS "
|
@@ -777,7 +778,7 @@ msgstr ""
|
|
777 |
"Nasze demo nie obsługuje rejestracji Flexible Shipping Connect. Wypróbuj FS "
|
778 |
"Connect za darmo. %1$sSprawdź teraz →%2$s"
|
779 |
|
780 |
-
#: classes/saas/class-saas-user-registration.php:
|
781 |
#, php-format
|
782 |
msgid ""
|
783 |
"Account with this email is already registered! We emailed your Connect Key "
|
@@ -788,7 +789,7 @@ msgstr ""
|
|
788 |
"kluczem Connect do %1$s.<br>Wpisz klucz %2$stutaj%4$s. Możesz również "
|
789 |
"uzyskać klucz logując się na %3$sswoje konto%4$s."
|
790 |
|
791 |
-
#: classes/saas/class-saas-user-registration.php:
|
792 |
#, php-format
|
793 |
msgid "Unknown response code from Flexible Shipping Connect API (%s)."
|
794 |
msgstr "Nieznany kod odpowiedzi z API Flexible Shipping Connect (%s)."
|
@@ -917,7 +918,15 @@ msgstr "Zarejestruj się teraz!"
|
|
917 |
msgid "Flexible Shipping Connect"
|
918 |
msgstr "Flexible Shipping Connect"
|
919 |
|
920 |
-
#: classes/saas/views/html-field-saas-connection.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
921 |
#, php-format
|
922 |
msgid ""
|
923 |
"%1$sRegister%3$s for a new Flexible Shipping Connect account or log in to "
|
@@ -926,7 +935,7 @@ msgstr ""
|
|
926 |
"%1$sZarejestruj%3$s nowe konto Flexible Shipping Connect lub zaloguj się do "
|
927 |
"%2$sswojego konta%3$s, aby otrzymać klucz."
|
928 |
|
929 |
-
#: classes/saas/views/html-field-saas-connection.php:
|
930 |
msgid "Check how to start with FS Connect →"
|
931 |
msgstr "Sprawdź jak zacząć z FS Connect →"
|
932 |
|
@@ -1129,7 +1138,7 @@ msgid "See how to %sconfigure Flexible Shipping%s."
|
|
1129 |
msgstr "Zobacz jak %sskonfigurować Flexible Shipping%s."
|
1130 |
|
1131 |
#: classes/settings/flexible-shipping.php:21
|
1132 |
-
#: classes/settings/shipping-method-form.php:70 classes/shipping-method.php:
|
1133 |
msgid "Enable/Disable"
|
1134 |
msgstr "Włącz/Wyłącz"
|
1135 |
|
@@ -1195,11 +1204,11 @@ msgstr ""
|
|
1195 |
"Wysyłaj zamówienia szybciej z %1$sFlexible Shipping Connect%2$s%3$s"
|
1196 |
"%4$sZarejestruj się teraz!%5$s"
|
1197 |
|
1198 |
-
#: classes/settings/shipping-method-form.php:54 classes/shipping-method.php:
|
1199 |
msgid "Free"
|
1200 |
msgstr "Bezpłatnie"
|
1201 |
|
1202 |
-
#: classes/settings/shipping-method-form.php:73 classes/shipping-method.php:
|
1203 |
msgid "Enable this shipment method"
|
1204 |
msgstr "Włącz tę metodę wysyłki"
|
1205 |
|
@@ -1207,7 +1216,7 @@ msgstr "Włącz tę metodę wysyłki"
|
|
1207 |
msgid "Method Title"
|
1208 |
msgstr "Tytuł metody"
|
1209 |
|
1210 |
-
#: classes/settings/shipping-method-form.php:78 classes/shipping-method.php:
|
1211 |
msgid "This controls the title which the user sees during checkout."
|
1212 |
msgstr "Tytuł, który widzi użytkownik podczas składania zamówienia."
|
1213 |
|
@@ -1485,7 +1494,7 @@ msgstr "Załączniki zostały wysłane"
|
|
1485 |
msgid "%1$s notice"
|
1486 |
msgstr "%1$s komunikat"
|
1487 |
|
1488 |
-
#: classes/shipment/saas/class-shipment-saas-metabox-attachments.php:
|
1489 |
msgid "Attachments"
|
1490 |
msgstr "Załączniki"
|
1491 |
|
@@ -1543,33 +1552,33 @@ msgstr "%1$sKoszt przesyłki:%2$s %3$s"
|
|
1543 |
msgid "%1$sShipment status:%2$s %3$s"
|
1544 |
msgstr "%1$s Status przesyłki: %2$s %3$s"
|
1545 |
|
1546 |
-
#: classes/shipment/saas/views/order-metabox-shipment-attachments.php:
|
1547 |
msgid "Type"
|
1548 |
msgstr "Typ"
|
1549 |
|
1550 |
-
#: classes/shipment/saas/views/order-metabox-shipment-attachments.php:
|
1551 |
msgid "Filename"
|
1552 |
msgstr "Nazwa pliku"
|
1553 |
|
1554 |
-
#: classes/shipment/saas/views/order-metabox-shipment-attachments.php:
|
1555 |
msgid "Sent"
|
1556 |
msgstr "Wysłany"
|
1557 |
|
1558 |
-
#: classes/shipment/saas/views/order-metabox-shipment-attachments.php:
|
1559 |
msgid "No"
|
1560 |
msgstr "Nie"
|
1561 |
|
1562 |
-
#: classes/shipment/saas/views/order-metabox-shipment-attachments.php:
|
1563 |
msgid "Yes"
|
1564 |
msgstr ""
|
1565 |
"T\n"
|
1566 |
"ak"
|
1567 |
|
1568 |
-
#: classes/shipment/saas/views/order-metabox-shipment-attachments.php:
|
1569 |
msgid "Send"
|
1570 |
msgstr "Wysłany"
|
1571 |
|
1572 |
-
#: classes/shipment/saas/views/order-metabox-shipment-attachments.php:
|
1573 |
#: classes/views/html-order-add_shipping-metabox.php:15
|
1574 |
msgid "Add"
|
1575 |
msgstr "Dodaj"
|
@@ -1578,47 +1587,47 @@ msgstr "Dodaj"
|
|
1578 |
msgid "Delete"
|
1579 |
msgstr "Usuń"
|
1580 |
|
1581 |
-
#: classes/shipping-method.php:
|
1582 |
msgid "Shipping Title"
|
1583 |
msgstr "Tytuł"
|
1584 |
|
1585 |
-
#: classes/shipping-method.php:
|
1586 |
#: classes/views/html-shipping-method-rules.php:240
|
1587 |
msgid "Add New"
|
1588 |
msgstr "Dodaj nową"
|
1589 |
|
1590 |
-
#: classes/shipping-method.php:
|
1591 |
msgid "New Shipping Method"
|
1592 |
msgstr "Nowa metoda wysyłki"
|
1593 |
|
1594 |
-
#: classes/shipping-method.php:
|
1595 |
msgid "Edit Shipping Method"
|
1596 |
msgstr "Edytuj metodę wysyłki"
|
1597 |
|
1598 |
-
#: classes/shipping-method.php:
|
1599 |
#, php-format
|
1600 |
msgid "Shipping method %s added."
|
1601 |
msgstr "Metoda wysyłki dodana: %s."
|
1602 |
|
1603 |
-
#: classes/shipping-method.php:
|
1604 |
#, php-format
|
1605 |
msgid "Shipping method %s deleted."
|
1606 |
msgstr "Metoda wysyłki usunięta: %s."
|
1607 |
|
1608 |
-
#: classes/shipping-method.php:
|
1609 |
msgid "Shipping method not found."
|
1610 |
msgstr "Metoda wysyłki nie znaleziona."
|
1611 |
|
1612 |
-
#: classes/shipping-method.php:
|
1613 |
#, php-format
|
1614 |
msgid "Shipping method %s updated."
|
1615 |
msgstr "Metoda wysyłki zaktualizowana: %s."
|
1616 |
|
1617 |
-
#: classes/tracker.php:
|
1618 |
msgid "Opt-in"
|
1619 |
msgstr "Opt-in"
|
1620 |
|
1621 |
-
#: classes/tracker.php:
|
1622 |
msgid "Opt-out"
|
1623 |
msgstr "Opt-out"
|
1624 |
|
@@ -1684,6 +1693,17 @@ msgstr "Wszystkie przesyłki"
|
|
1684 |
msgid "Shipment status"
|
1685 |
msgstr "Status przesyłki"
|
1686 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1687 |
#: classes/views/html-shipping-method-rules.php:8
|
1688 |
msgid "Price"
|
1689 |
msgstr "Cena"
|
@@ -1966,6 +1986,9 @@ msgstr ""
|
|
1966 |
msgid "Track shipment: "
|
1967 |
msgstr "Śledź przesyłkę: "
|
1968 |
|
|
|
|
|
|
|
1969 |
#~ msgid "Max value %s is not valid number. Row number %d."
|
1970 |
#~ msgstr "Wartość Maks %s jest niepoprawna. Numer wiersza %d."
|
1971 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Flexible Shipping\n"
|
4 |
+
"POT-Creation-Date: 2019-04-10 09:34+0200\n"
|
5 |
+
"PO-Revision-Date: 2019-04-10 09:40+0200\n"
|
6 |
"Last-Translator: Piotr Jabłonowski <piotr.jablonowski@wpdesk.net>\n"
|
7 |
"Language-Team: Maciej Swoboda <maciej.swoboda@gmail.com>\n"
|
8 |
"Language: pl_PL\n"
|
22 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
23 |
"X-Poedit-SearchPathExcluded-1: vendor\n"
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
#: classes/admin-notices.php:164
|
26 |
#, php-format
|
27 |
msgid ""
|
175 |
msgid "Bulk shipping manifest - processed orders: %d"
|
176 |
msgstr "Zbiorcze tworzenie protokołów nadania - przetworzone zamówienia: %d"
|
177 |
|
178 |
+
#: classes/class-flexible-shipping-plugin.php:452
|
179 |
msgid "Settings"
|
180 |
msgstr "Ustawienia"
|
181 |
|
182 |
+
#: classes/class-flexible-shipping-plugin.php:454
|
183 |
msgid "Docs"
|
184 |
msgstr "Docs"
|
185 |
|
186 |
+
#: classes/class-flexible-shipping-plugin.php:455
|
187 |
msgid "Support"
|
188 |
msgstr "Wsparcie"
|
189 |
|
190 |
+
#: classes/class-flexible-shipping-plugin.php:461
|
191 |
msgid "Upgrade"
|
192 |
msgstr "Kup PRO"
|
193 |
|
209 |
msgid "Add shipping"
|
210 |
msgstr "Dodaj przesyłkę"
|
211 |
|
212 |
+
#: classes/class-pointer-messages.php:53
|
213 |
+
msgid "Watch how to use Flexible Shipping"
|
214 |
+
msgstr "Obejrzyj konfigurację Flexible Shipping"
|
215 |
+
|
216 |
+
#: classes/class-pointer-messages.php:71
|
217 |
+
msgid "How to start with Flexible Shipping"
|
218 |
+
msgstr "Jak zacząć z Flexible Shipping?"
|
219 |
+
|
220 |
#: classes/csv/class-csv-importer.php:86
|
221 |
msgid ""
|
222 |
"Sorry, there has been an error. The CSV is invalid or incorrect file type."
|
400 |
msgid "Order"
|
401 |
msgstr "Zamówienie"
|
402 |
|
403 |
+
#: classes/multilingual.php:44 classes/multilingual.php:47
|
404 |
+
#: classes/multilingual.php:50 classes/saas/class-saas-settings.php:79
|
405 |
+
#: classes/settings/flexible-shipping.php:16
|
406 |
+
#: classes/settings/flexible-shipping.php:30
|
407 |
+
#: classes/settings/shipping-method-form.php:79 classes/shipping-method.php:34
|
408 |
+
#: classes/shipping-method.php:35 classes/shipping-method.php:53
|
409 |
+
msgid "Flexible Shipping"
|
410 |
+
msgstr "Flexible Shipping"
|
411 |
+
|
412 |
#: classes/saas/checkout-fields/class-saas-checkout-field-collection-points.php:123
|
413 |
msgid "Select point from map"
|
414 |
msgstr "Wybierz punkt z mapy"
|
598 |
msgid "%1$s%2$s (new)%3$s"
|
599 |
msgstr "%1$s%2$s (nowość)%3$s"
|
600 |
|
601 |
+
#: classes/saas/class-saas-settings.php:243
|
|
|
|
|
|
|
|
|
602 |
msgid "Connect Services"
|
603 |
msgstr "Usługi Connect"
|
604 |
|
605 |
+
#: classes/saas/class-saas-settings.php:244
|
606 |
msgid ""
|
607 |
"Enable services to automate shipping and print labels with Flexible Shipping "
|
608 |
"Connect."
|
610 |
"Włącz usługi, aby automatyzować wysyłkę i pobierać etykiety dzięki Flexible "
|
611 |
"Shipping Connect."
|
612 |
|
613 |
+
#: classes/saas/class-saas-settings.php:297
|
614 |
msgid "Advanced settings"
|
615 |
msgstr "Ustawienia zaawansowane"
|
616 |
|
723 |
msgid "You need to configure the service. %1$sGo to %2$s settings.%3$s"
|
724 |
msgstr "Musisz skonfigurować usługę. %1$sPrzejdź do %2$s ustawień.%3$s"
|
725 |
|
726 |
+
#: classes/saas/class-saas-shipping-services-manager.php:165
|
727 |
#, php-format
|
728 |
msgid "%1$sYour settings have been saved.%2$s"
|
729 |
msgstr "%1$sUstawienia zostały zapisane.%2$s"
|
732 |
msgid "Services"
|
733 |
msgstr "Usługi"
|
734 |
|
735 |
+
#: classes/saas/class-saas-user-registration.php:128
|
736 |
+
#: classes/saas/class-saas-user-registration.php:129
|
737 |
msgid "Flexible Shipping Connect Registration"
|
738 |
msgstr "Rejestracja Flexible Shipping Connect"
|
739 |
|
740 |
+
#: classes/saas/class-saas-user-registration.php:203
|
741 |
msgid ""
|
742 |
"There are some connection problems. Please try again in few minutes. Thanks!"
|
743 |
msgstr ""
|
744 |
"Chwilowe problemy z połączeniem. Spróbuj ponownie za kilka minut. Dziękujemy!"
|
745 |
|
746 |
+
#: classes/saas/class-saas-user-registration.php:212
|
747 |
msgid "Please enter a valid email!"
|
748 |
msgstr "Proszę podać poprawny adres e-mail!"
|
749 |
|
750 |
+
#: classes/saas/class-saas-user-registration.php:225
|
751 |
#, php-format
|
752 |
msgid ""
|
753 |
"%1$sAccount created, please check your email and click the activation link "
|
758 |
"połączyć (%3$s).%2$s Jeśli nie otrzymałeś e-maila, proszę %4$sskontaktuj się "
|
759 |
"z nami%5$s."
|
760 |
|
761 |
+
#: classes/saas/class-saas-user-registration.php:249
|
762 |
#, php-format
|
763 |
msgid ""
|
764 |
"Your store (%1$s) is already registered with another account! You can "
|
769 |
"zarejestrować swoją domenę za pomocą jednego konta. Jeśli masz pytania, "
|
770 |
"%2$sskontaktuj się z nami%3$s."
|
771 |
|
772 |
+
#: classes/saas/class-saas-user-registration.php:271
|
773 |
#, php-format
|
774 |
msgid ""
|
775 |
"Our demo does not support Flexible Shipping Connect registration. Try FS "
|
778 |
"Nasze demo nie obsługuje rejestracji Flexible Shipping Connect. Wypróbuj FS "
|
779 |
"Connect za darmo. %1$sSprawdź teraz →%2$s"
|
780 |
|
781 |
+
#: classes/saas/class-saas-user-registration.php:298
|
782 |
#, php-format
|
783 |
msgid ""
|
784 |
"Account with this email is already registered! We emailed your Connect Key "
|
789 |
"kluczem Connect do %1$s.<br>Wpisz klucz %2$stutaj%4$s. Możesz również "
|
790 |
"uzyskać klucz logując się na %3$sswoje konto%4$s."
|
791 |
|
792 |
+
#: classes/saas/class-saas-user-registration.php:316
|
793 |
#, php-format
|
794 |
msgid "Unknown response code from Flexible Shipping Connect API (%s)."
|
795 |
msgstr "Nieznany kod odpowiedzi z API Flexible Shipping Connect (%s)."
|
918 |
msgid "Flexible Shipping Connect"
|
919 |
msgstr "Flexible Shipping Connect"
|
920 |
|
921 |
+
#: classes/saas/views/html-field-saas-connection.php:12
|
922 |
+
#, php-format
|
923 |
+
msgid ""
|
924 |
+
"Find out more about the possibilities of %1$sFlexible Shipping Connect%2$s."
|
925 |
+
msgstr ""
|
926 |
+
"Dowiedz się więcej o możliwościach związanych z %1$sFlexible Shipping Connect"
|
927 |
+
"%2$s."
|
928 |
+
|
929 |
+
#: classes/saas/views/html-field-saas-connection.php:22
|
930 |
#, php-format
|
931 |
msgid ""
|
932 |
"%1$sRegister%3$s for a new Flexible Shipping Connect account or log in to "
|
935 |
"%1$sZarejestruj%3$s nowe konto Flexible Shipping Connect lub zaloguj się do "
|
936 |
"%2$sswojego konta%3$s, aby otrzymać klucz."
|
937 |
|
938 |
+
#: classes/saas/views/html-field-saas-connection.php:29
|
939 |
msgid "Check how to start with FS Connect →"
|
940 |
msgstr "Sprawdź jak zacząć z FS Connect →"
|
941 |
|
1138 |
msgstr "Zobacz jak %sskonfigurować Flexible Shipping%s."
|
1139 |
|
1140 |
#: classes/settings/flexible-shipping.php:21
|
1141 |
+
#: classes/settings/shipping-method-form.php:70 classes/shipping-method.php:44
|
1142 |
msgid "Enable/Disable"
|
1143 |
msgstr "Włącz/Wyłącz"
|
1144 |
|
1204 |
"Wysyłaj zamówienia szybciej z %1$sFlexible Shipping Connect%2$s%3$s"
|
1205 |
"%4$sZarejestruj się teraz!%5$s"
|
1206 |
|
1207 |
+
#: classes/settings/shipping-method-form.php:54 classes/shipping-method.php:749
|
1208 |
msgid "Free"
|
1209 |
msgstr "Bezpłatnie"
|
1210 |
|
1211 |
+
#: classes/settings/shipping-method-form.php:73 classes/shipping-method.php:46
|
1212 |
msgid "Enable this shipment method"
|
1213 |
msgstr "Włącz tę metodę wysyłki"
|
1214 |
|
1216 |
msgid "Method Title"
|
1217 |
msgstr "Tytuł metody"
|
1218 |
|
1219 |
+
#: classes/settings/shipping-method-form.php:78 classes/shipping-method.php:52
|
1220 |
msgid "This controls the title which the user sees during checkout."
|
1221 |
msgstr "Tytuł, który widzi użytkownik podczas składania zamówienia."
|
1222 |
|
1494 |
msgid "%1$s notice"
|
1495 |
msgstr "%1$s komunikat"
|
1496 |
|
1497 |
+
#: classes/shipment/saas/class-shipment-saas-metabox-attachments.php:37
|
1498 |
msgid "Attachments"
|
1499 |
msgstr "Załączniki"
|
1500 |
|
1552 |
msgid "%1$sShipment status:%2$s %3$s"
|
1553 |
msgstr "%1$s Status przesyłki: %2$s %3$s"
|
1554 |
|
1555 |
+
#: classes/shipment/saas/views/order-metabox-shipment-attachments.php:23
|
1556 |
msgid "Type"
|
1557 |
msgstr "Typ"
|
1558 |
|
1559 |
+
#: classes/shipment/saas/views/order-metabox-shipment-attachments.php:24
|
1560 |
msgid "Filename"
|
1561 |
msgstr "Nazwa pliku"
|
1562 |
|
1563 |
+
#: classes/shipment/saas/views/order-metabox-shipment-attachments.php:25
|
1564 |
msgid "Sent"
|
1565 |
msgstr "Wysłany"
|
1566 |
|
1567 |
+
#: classes/shipment/saas/views/order-metabox-shipment-attachments.php:37
|
1568 |
msgid "No"
|
1569 |
msgstr "Nie"
|
1570 |
|
1571 |
+
#: classes/shipment/saas/views/order-metabox-shipment-attachments.php:37
|
1572 |
msgid "Yes"
|
1573 |
msgstr ""
|
1574 |
"T\n"
|
1575 |
"ak"
|
1576 |
|
1577 |
+
#: classes/shipment/saas/views/order-metabox-shipment-attachments.php:46
|
1578 |
msgid "Send"
|
1579 |
msgstr "Wysłany"
|
1580 |
|
1581 |
+
#: classes/shipment/saas/views/order-metabox-shipment-attachments.php:72
|
1582 |
#: classes/views/html-order-add_shipping-metabox.php:15
|
1583 |
msgid "Add"
|
1584 |
msgstr "Dodaj"
|
1587 |
msgid "Delete"
|
1588 |
msgstr "Usuń"
|
1589 |
|
1590 |
+
#: classes/shipping-method.php:50
|
1591 |
msgid "Shipping Title"
|
1592 |
msgstr "Tytuł"
|
1593 |
|
1594 |
+
#: classes/shipping-method.php:122
|
1595 |
#: classes/views/html-shipping-method-rules.php:240
|
1596 |
msgid "Add New"
|
1597 |
msgstr "Dodaj nową"
|
1598 |
|
1599 |
+
#: classes/shipping-method.php:391
|
1600 |
msgid "New Shipping Method"
|
1601 |
msgstr "Nowa metoda wysyłki"
|
1602 |
|
1603 |
+
#: classes/shipping-method.php:394
|
1604 |
msgid "Edit Shipping Method"
|
1605 |
msgstr "Edytuj metodę wysyłki"
|
1606 |
|
1607 |
+
#: classes/shipping-method.php:404 classes/shipping-method.php:446
|
1608 |
#, php-format
|
1609 |
msgid "Shipping method %s added."
|
1610 |
msgstr "Metoda wysyłki dodana: %s."
|
1611 |
|
1612 |
+
#: classes/shipping-method.php:429
|
1613 |
#, php-format
|
1614 |
msgid "Shipping method %s deleted."
|
1615 |
msgstr "Metoda wysyłki usunięta: %s."
|
1616 |
|
1617 |
+
#: classes/shipping-method.php:432
|
1618 |
msgid "Shipping method not found."
|
1619 |
msgstr "Metoda wysyłki nie znaleziona."
|
1620 |
|
1621 |
+
#: classes/shipping-method.php:458
|
1622 |
#, php-format
|
1623 |
msgid "Shipping method %s updated."
|
1624 |
msgstr "Metoda wysyłki zaktualizowana: %s."
|
1625 |
|
1626 |
+
#: classes/tracker.php:221
|
1627 |
msgid "Opt-in"
|
1628 |
msgstr "Opt-in"
|
1629 |
|
1630 |
+
#: classes/tracker.php:224
|
1631 |
msgid "Opt-out"
|
1632 |
msgstr "Opt-out"
|
1633 |
|
1693 |
msgid "Shipment status"
|
1694 |
msgstr "Status przesyłki"
|
1695 |
|
1696 |
+
#: classes/views/html-pointer-message-fs-text.php:7
|
1697 |
+
#, php-format
|
1698 |
+
msgid ""
|
1699 |
+
"To add first Flexible Shipping method go to %1$sShipping zones%2$s and add "
|
1700 |
+
"Flexible Shipping to a shipping zone. More info about %3$sshipping methods"
|
1701 |
+
"%4$s."
|
1702 |
+
msgstr ""
|
1703 |
+
"Aby dodać pierwszą metodę Flexible Shipping przejdź do zakładki %1$sStrefy "
|
1704 |
+
"wysyłki%2$s i dodaj Flexible Shipping do strefy wysyłki. Dowiedz się więcej "
|
1705 |
+
"o %3$smetodach wysyłki%4$s."
|
1706 |
+
|
1707 |
#: classes/views/html-shipping-method-rules.php:8
|
1708 |
msgid "Price"
|
1709 |
msgstr "Cena"
|
1986 |
msgid "Track shipment: "
|
1987 |
msgstr "Śledź przesyłkę: "
|
1988 |
|
1989 |
+
#~ msgid "FS Connect"
|
1990 |
+
#~ msgstr "FS Connect"
|
1991 |
+
|
1992 |
#~ msgid "Max value %s is not valid number. Row number %d."
|
1993 |
#~ msgstr "Wartość Maks %s jest niepoprawna. Numer wiersza %d."
|
1994 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://flexibleshipping.com/table-rate/
|
|
4 |
Tags: table rate, table rate 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
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 5.1.0
|
7 |
-
Stable tag: 3.3.
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv3 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -175,6 +175,9 @@ If you are upgrading from the old Flexible Shipping version (1.3.2, woo-flexible
|
|
175 |
|
176 |
== Changelog ==
|
177 |
|
|
|
|
|
|
|
178 |
= 3.3.3 - 2019-04-04 =
|
179 |
* Fixed notices in order meta box
|
180 |
* Fixed changelog entries
|
4 |
Tags: table rate, table rate 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
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 5.1.0
|
7 |
+
Stable tag: 3.3.4
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv3 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
175 |
|
176 |
== Changelog ==
|
177 |
|
178 |
+
= 3.3.4 - 2019-04-10 =
|
179 |
+
* Removed Flexible Shipping menu
|
180 |
+
|
181 |
= 3.3.3 - 2019-04-04 =
|
182 |
* Fixed notices in order meta box
|
183 |
* Fixed changelog entries
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit78bf5b5bb4027bd78b5809db6acbea96::getLoader();
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -198,6 +198,10 @@ return array(
|
|
198 |
'WPDesk\\PluginBuilder\\Storage\\PluginStorage' => $vendorDir . '/wpdesk/wp-builder/src/Storage/PluginStorage.php',
|
199 |
'WPDesk\\PluginBuilder\\Storage\\StaticStorage' => $vendorDir . '/wpdesk/wp-builder/src/Storage/StaticStorage.php',
|
200 |
'WPDesk\\PluginBuilder\\Storage\\StorageFactory' => $vendorDir . '/wpdesk/wp-builder/src/Storage/StorageFactory.php',
|
|
|
|
|
|
|
|
|
201 |
'WPDesk\\SaasPlatformClient\\ApiClient\\CachedClient' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/ApiClient/CachedClient.php',
|
202 |
'WPDesk\\SaasPlatformClient\\ApiClient\\Client' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/ApiClient/Client.php',
|
203 |
'WPDesk\\SaasPlatformClient\\ApiClient\\ClientFactory' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/ApiClient/ClientFactory.php',
|
@@ -344,12 +348,12 @@ return array(
|
|
344 |
'WPDesk\\View\\Resolver\\Resolver' => $vendorDir . '/wpdesk/wp-view/src/Resolver/Resolver.php',
|
345 |
'WPDesk\\View\\Resolver\\WPThemeResolver' => $vendorDir . '/wpdesk/wp-view/src/Resolver/WPThemeResolver.php',
|
346 |
'WPDesk_Flexible_Shipping' => $baseDir . '/classes/shipping-method.php',
|
347 |
-
'
|
348 |
-
'WPDesk_Flexible_Shipping_AB_MenuTest' => $baseDir . '/classes/abtests/class-ab-menu-test.php',
|
349 |
'WPDesk_Flexible_Shipping_AB_Tracker_Deactivation_Data' => $baseDir . '/classes/abtests/class-ab-tracker-deactivation-data.php',
|
350 |
-
'WPDesk_Flexible_Shipping_AB_Variant_Old' => $baseDir . '/classes/abtests/ab-
|
351 |
-
'
|
352 |
-
'
|
|
|
353 |
'WPDesk_Flexible_Shipping_Add_Shipping' => $baseDir . '/classes/class-order-add-shipping.php',
|
354 |
'WPDesk_Flexible_Shipping_Admin_Notices' => $baseDir . '/classes/admin-notices.php',
|
355 |
'WPDesk_Flexible_Shipping_Bulk_Actions' => $baseDir . '/classes/bulk-actions.php',
|
@@ -365,9 +369,11 @@ return array(
|
|
365 |
'WPDesk_Flexible_Shipping_Manifest_FS' => $baseDir . '/classes/manifest/class-manifest-fs.php',
|
366 |
'WPDesk_Flexible_Shipping_Manifest_Interface' => $baseDir . '/classes/manifest/interface-manifest.php',
|
367 |
'WPDesk_Flexible_Shipping_Menu' => $baseDir . '/classes/class-menu.php',
|
|
|
368 |
'WPDesk_Flexible_Shipping_Money_Formatter' => $baseDir . '/classes/shipment/class-money-formatter.php',
|
369 |
'WPDesk_Flexible_Shipping_Multicurrency' => $baseDir . '/classes/multicurrency.php',
|
370 |
'WPDesk_Flexible_Shipping_Multilingual' => $baseDir . '/classes/multilingual.php',
|
|
|
371 |
'WPDesk_Flexible_Shipping_SaaS_Add_Shipping_Handler' => $baseDir . '/classes/saas/class-saas-add-shipping-handler.php',
|
372 |
'WPDesk_Flexible_Shipping_SaaS_Auth_Params' => $baseDir . '/classes/saas/class-saas-auth-params.php',
|
373 |
'WPDesk_Flexible_Shipping_SaaS_Auth_Platform_Factory' => $baseDir . '/classes/saas/class-saas-platform-factory.php',
|
198 |
'WPDesk\\PluginBuilder\\Storage\\PluginStorage' => $vendorDir . '/wpdesk/wp-builder/src/Storage/PluginStorage.php',
|
199 |
'WPDesk\\PluginBuilder\\Storage\\StaticStorage' => $vendorDir . '/wpdesk/wp-builder/src/Storage/StaticStorage.php',
|
200 |
'WPDesk\\PluginBuilder\\Storage\\StorageFactory' => $vendorDir . '/wpdesk/wp-builder/src/Storage/StorageFactory.php',
|
201 |
+
'WPDesk\\Pointer\\PointerConditions' => $vendorDir . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerConditions.php',
|
202 |
+
'WPDesk\\Pointer\\PointerMessage' => $vendorDir . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerMessage.php',
|
203 |
+
'WPDesk\\Pointer\\PointerPosition' => $vendorDir . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerPosition.php',
|
204 |
+
'WPDesk\\Pointer\\PointersScripts' => $vendorDir . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointersScripts.php',
|
205 |
'WPDesk\\SaasPlatformClient\\ApiClient\\CachedClient' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/ApiClient/CachedClient.php',
|
206 |
'WPDesk\\SaasPlatformClient\\ApiClient\\Client' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/ApiClient/Client.php',
|
207 |
'WPDesk\\SaasPlatformClient\\ApiClient\\ClientFactory' => $vendorDir . '/wpdesk/wp-saas-platform-client/src/ApiClient/ClientFactory.php',
|
348 |
'WPDesk\\View\\Resolver\\Resolver' => $vendorDir . '/wpdesk/wp-view/src/Resolver/Resolver.php',
|
349 |
'WPDesk\\View\\Resolver\\WPThemeResolver' => $vendorDir . '/wpdesk/wp-view/src/Resolver/WPThemeResolver.php',
|
350 |
'WPDesk_Flexible_Shipping' => $baseDir . '/classes/shipping-method.php',
|
351 |
+
'WPDesk_Flexible_Shipping_AB_Pointer_Message_Test' => $baseDir . '/classes/abtests/class-ab-pointer-message-test.php',
|
|
|
352 |
'WPDesk_Flexible_Shipping_AB_Tracker_Deactivation_Data' => $baseDir . '/classes/abtests/class-ab-tracker-deactivation-data.php',
|
353 |
+
'WPDesk_Flexible_Shipping_AB_Variant_Old' => $baseDir . '/classes/abtests/ab-pointer-message-test/class-ab-variant-old.php',
|
354 |
+
'WPDesk_Flexible_Shipping_AB_Variant_With_Pointer_Message_Text' => $baseDir . '/classes/abtests/ab-pointer-message-test/class-ab-variant-with-pointer-message-text.php',
|
355 |
+
'WPDesk_Flexible_Shipping_AB_Variant_With_Pointer_Message_Video' => $baseDir . '/classes/abtests/ab-pointer-message-test/class-ab-variant-with-pointer-message-video.php',
|
356 |
+
'WPDesk_Flexible_Shipping_AB_Variant_Without_Pointer_Message' => $baseDir . '/classes/abtests/ab-pointer-message-test/class-ab-variant-without-pointer-message.php',
|
357 |
'WPDesk_Flexible_Shipping_Add_Shipping' => $baseDir . '/classes/class-order-add-shipping.php',
|
358 |
'WPDesk_Flexible_Shipping_Admin_Notices' => $baseDir . '/classes/admin-notices.php',
|
359 |
'WPDesk_Flexible_Shipping_Bulk_Actions' => $baseDir . '/classes/bulk-actions.php',
|
369 |
'WPDesk_Flexible_Shipping_Manifest_FS' => $baseDir . '/classes/manifest/class-manifest-fs.php',
|
370 |
'WPDesk_Flexible_Shipping_Manifest_Interface' => $baseDir . '/classes/manifest/interface-manifest.php',
|
371 |
'WPDesk_Flexible_Shipping_Menu' => $baseDir . '/classes/class-menu.php',
|
372 |
+
'WPDesk_Flexible_Shipping_Method_Created_Tracker_Deactivation_Data' => $baseDir . '/classes/class-method-created-tracker-deactivation-data.php',
|
373 |
'WPDesk_Flexible_Shipping_Money_Formatter' => $baseDir . '/classes/shipment/class-money-formatter.php',
|
374 |
'WPDesk_Flexible_Shipping_Multicurrency' => $baseDir . '/classes/multicurrency.php',
|
375 |
'WPDesk_Flexible_Shipping_Multilingual' => $baseDir . '/classes/multilingual.php',
|
376 |
+
'WPDesk_Flexible_Shipping_Pointer_Messages' => $baseDir . '/classes/class-pointer-messages.php',
|
377 |
'WPDesk_Flexible_Shipping_SaaS_Add_Shipping_Handler' => $baseDir . '/classes/saas/class-saas-add-shipping-handler.php',
|
378 |
'WPDesk_Flexible_Shipping_SaaS_Auth_Params' => $baseDir . '/classes/saas/class-saas-auth-params.php',
|
379 |
'WPDesk_Flexible_Shipping_SaaS_Auth_Platform_Factory' => $baseDir . '/classes/saas/class-saas-platform-factory.php',
|
vendor/composer/autoload_psr4.php
CHANGED
@@ -8,6 +8,7 @@ $baseDir = dirname($vendorDir);
|
|
8 |
return array(
|
9 |
'WPDesk\\View\\' => array($vendorDir . '/wpdesk/wp-view/src'),
|
10 |
'WPDesk\\SaasPlatformClient\\' => array($vendorDir . '/wpdesk/wp-saas-platform-client/src'),
|
|
|
11 |
'WPDesk\\PluginBuilder\\' => array($vendorDir . '/wpdesk/wp-builder/src'),
|
12 |
'WPDesk\\Persistence\\' => array($vendorDir . '/wpdesk/wp-persistence/src'),
|
13 |
'WPDesk\\Notice\\' => array($vendorDir . '/wpdesk/wp-notice/src/WPDesk/Notice'),
|
8 |
return array(
|
9 |
'WPDesk\\View\\' => array($vendorDir . '/wpdesk/wp-view/src'),
|
10 |
'WPDesk\\SaasPlatformClient\\' => array($vendorDir . '/wpdesk/wp-saas-platform-client/src'),
|
11 |
+
'WPDesk\\Pointer\\' => array($vendorDir . '/wpdesk/wp-pointer/src/WPDesk/Pointer'),
|
12 |
'WPDesk\\PluginBuilder\\' => array($vendorDir . '/wpdesk/wp-builder/src'),
|
13 |
'WPDesk\\Persistence\\' => array($vendorDir . '/wpdesk/wp-persistence/src'),
|
14 |
'WPDesk\\Notice\\' => array($vendorDir . '/wpdesk/wp-notice/src/WPDesk/Notice'),
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit8a4e70223d7dc54e60bb6eb464631f2f
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit8a4e70223d7dc54e60bb6eb464631f2f
|
|
48 |
$loader->register(true);
|
49 |
|
50 |
if ($useStaticLoader) {
|
51 |
-
$includeFiles = Composer\Autoload\
|
52 |
} else {
|
53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
54 |
}
|
55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
56 |
-
|
57 |
}
|
58 |
|
59 |
return $loader;
|
60 |
}
|
61 |
}
|
62 |
|
63 |
-
function
|
64 |
{
|
65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
66 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit78bf5b5bb4027bd78b5809db6acbea96
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit78bf5b5bb4027bd78b5809db6acbea96', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit78bf5b5bb4027bd78b5809db6acbea96', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit78bf5b5bb4027bd78b5809db6acbea96::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
48 |
$loader->register(true);
|
49 |
|
50 |
if ($useStaticLoader) {
|
51 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit78bf5b5bb4027bd78b5809db6acbea96::$files;
|
52 |
} else {
|
53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
54 |
}
|
55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
56 |
+
composerRequire78bf5b5bb4027bd78b5809db6acbea96($fileIdentifier, $file);
|
57 |
}
|
58 |
|
59 |
return $loader;
|
60 |
}
|
61 |
}
|
62 |
|
63 |
+
function composerRequire78bf5b5bb4027bd78b5809db6acbea96($fileIdentifier, $file)
|
64 |
{
|
65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
66 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'46ae4ad8c3479aabff48f598a0e4b93f' => __DIR__ . '/..' . '/wpdesk/wp-mutex/src/WPDesk/functions.php',
|
@@ -16,6 +16,7 @@ class ComposerStaticInit8a4e70223d7dc54e60bb6eb464631f2f
|
|
16 |
array (
|
17 |
'WPDesk\\View\\' => 12,
|
18 |
'WPDesk\\SaasPlatformClient\\' => 26,
|
|
|
19 |
'WPDesk\\PluginBuilder\\' => 21,
|
20 |
'WPDesk\\Persistence\\' => 19,
|
21 |
'WPDesk\\Notice\\' => 14,
|
@@ -44,6 +45,10 @@ class ComposerStaticInit8a4e70223d7dc54e60bb6eb464631f2f
|
|
44 |
array (
|
45 |
0 => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src',
|
46 |
),
|
|
|
|
|
|
|
|
|
47 |
'WPDesk\\PluginBuilder\\' =>
|
48 |
array (
|
49 |
0 => __DIR__ . '/..' . '/wpdesk/wp-builder/src',
|
@@ -279,6 +284,10 @@ class ComposerStaticInit8a4e70223d7dc54e60bb6eb464631f2f
|
|
279 |
'WPDesk\\PluginBuilder\\Storage\\PluginStorage' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Storage/PluginStorage.php',
|
280 |
'WPDesk\\PluginBuilder\\Storage\\StaticStorage' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Storage/StaticStorage.php',
|
281 |
'WPDesk\\PluginBuilder\\Storage\\StorageFactory' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Storage/StorageFactory.php',
|
|
|
|
|
|
|
|
|
282 |
'WPDesk\\SaasPlatformClient\\ApiClient\\CachedClient' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/ApiClient/CachedClient.php',
|
283 |
'WPDesk\\SaasPlatformClient\\ApiClient\\Client' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/ApiClient/Client.php',
|
284 |
'WPDesk\\SaasPlatformClient\\ApiClient\\ClientFactory' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/ApiClient/ClientFactory.php',
|
@@ -425,12 +434,12 @@ class ComposerStaticInit8a4e70223d7dc54e60bb6eb464631f2f
|
|
425 |
'WPDesk\\View\\Resolver\\Resolver' => __DIR__ . '/..' . '/wpdesk/wp-view/src/Resolver/Resolver.php',
|
426 |
'WPDesk\\View\\Resolver\\WPThemeResolver' => __DIR__ . '/..' . '/wpdesk/wp-view/src/Resolver/WPThemeResolver.php',
|
427 |
'WPDesk_Flexible_Shipping' => __DIR__ . '/../..' . '/classes/shipping-method.php',
|
428 |
-
'
|
429 |
-
'WPDesk_Flexible_Shipping_AB_MenuTest' => __DIR__ . '/../..' . '/classes/abtests/class-ab-menu-test.php',
|
430 |
'WPDesk_Flexible_Shipping_AB_Tracker_Deactivation_Data' => __DIR__ . '/../..' . '/classes/abtests/class-ab-tracker-deactivation-data.php',
|
431 |
-
'WPDesk_Flexible_Shipping_AB_Variant_Old' => __DIR__ . '/../..' . '/classes/abtests/ab-
|
432 |
-
'
|
433 |
-
'
|
|
|
434 |
'WPDesk_Flexible_Shipping_Add_Shipping' => __DIR__ . '/../..' . '/classes/class-order-add-shipping.php',
|
435 |
'WPDesk_Flexible_Shipping_Admin_Notices' => __DIR__ . '/../..' . '/classes/admin-notices.php',
|
436 |
'WPDesk_Flexible_Shipping_Bulk_Actions' => __DIR__ . '/../..' . '/classes/bulk-actions.php',
|
@@ -446,9 +455,11 @@ class ComposerStaticInit8a4e70223d7dc54e60bb6eb464631f2f
|
|
446 |
'WPDesk_Flexible_Shipping_Manifest_FS' => __DIR__ . '/../..' . '/classes/manifest/class-manifest-fs.php',
|
447 |
'WPDesk_Flexible_Shipping_Manifest_Interface' => __DIR__ . '/../..' . '/classes/manifest/interface-manifest.php',
|
448 |
'WPDesk_Flexible_Shipping_Menu' => __DIR__ . '/../..' . '/classes/class-menu.php',
|
|
|
449 |
'WPDesk_Flexible_Shipping_Money_Formatter' => __DIR__ . '/../..' . '/classes/shipment/class-money-formatter.php',
|
450 |
'WPDesk_Flexible_Shipping_Multicurrency' => __DIR__ . '/../..' . '/classes/multicurrency.php',
|
451 |
'WPDesk_Flexible_Shipping_Multilingual' => __DIR__ . '/../..' . '/classes/multilingual.php',
|
|
|
452 |
'WPDesk_Flexible_Shipping_SaaS_Add_Shipping_Handler' => __DIR__ . '/../..' . '/classes/saas/class-saas-add-shipping-handler.php',
|
453 |
'WPDesk_Flexible_Shipping_SaaS_Auth_Params' => __DIR__ . '/../..' . '/classes/saas/class-saas-auth-params.php',
|
454 |
'WPDesk_Flexible_Shipping_SaaS_Auth_Platform_Factory' => __DIR__ . '/../..' . '/classes/saas/class-saas-platform-factory.php',
|
@@ -551,9 +562,9 @@ class ComposerStaticInit8a4e70223d7dc54e60bb6eb464631f2f
|
|
551 |
public static function getInitializer(ClassLoader $loader)
|
552 |
{
|
553 |
return \Closure::bind(function () use ($loader) {
|
554 |
-
$loader->prefixLengthsPsr4 =
|
555 |
-
$loader->prefixDirsPsr4 =
|
556 |
-
$loader->classMap =
|
557 |
|
558 |
}, null, ClassLoader::class);
|
559 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit78bf5b5bb4027bd78b5809db6acbea96
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'46ae4ad8c3479aabff48f598a0e4b93f' => __DIR__ . '/..' . '/wpdesk/wp-mutex/src/WPDesk/functions.php',
|
16 |
array (
|
17 |
'WPDesk\\View\\' => 12,
|
18 |
'WPDesk\\SaasPlatformClient\\' => 26,
|
19 |
+
'WPDesk\\Pointer\\' => 15,
|
20 |
'WPDesk\\PluginBuilder\\' => 21,
|
21 |
'WPDesk\\Persistence\\' => 19,
|
22 |
'WPDesk\\Notice\\' => 14,
|
45 |
array (
|
46 |
0 => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src',
|
47 |
),
|
48 |
+
'WPDesk\\Pointer\\' =>
|
49 |
+
array (
|
50 |
+
0 => __DIR__ . '/..' . '/wpdesk/wp-pointer/src/WPDesk/Pointer',
|
51 |
+
),
|
52 |
'WPDesk\\PluginBuilder\\' =>
|
53 |
array (
|
54 |
0 => __DIR__ . '/..' . '/wpdesk/wp-builder/src',
|
284 |
'WPDesk\\PluginBuilder\\Storage\\PluginStorage' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Storage/PluginStorage.php',
|
285 |
'WPDesk\\PluginBuilder\\Storage\\StaticStorage' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Storage/StaticStorage.php',
|
286 |
'WPDesk\\PluginBuilder\\Storage\\StorageFactory' => __DIR__ . '/..' . '/wpdesk/wp-builder/src/Storage/StorageFactory.php',
|
287 |
+
'WPDesk\\Pointer\\PointerConditions' => __DIR__ . '/..' . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerConditions.php',
|
288 |
+
'WPDesk\\Pointer\\PointerMessage' => __DIR__ . '/..' . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerMessage.php',
|
289 |
+
'WPDesk\\Pointer\\PointerPosition' => __DIR__ . '/..' . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerPosition.php',
|
290 |
+
'WPDesk\\Pointer\\PointersScripts' => __DIR__ . '/..' . '/wpdesk/wp-pointer/src/WPDesk/Pointer/PointersScripts.php',
|
291 |
'WPDesk\\SaasPlatformClient\\ApiClient\\CachedClient' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/ApiClient/CachedClient.php',
|
292 |
'WPDesk\\SaasPlatformClient\\ApiClient\\Client' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/ApiClient/Client.php',
|
293 |
'WPDesk\\SaasPlatformClient\\ApiClient\\ClientFactory' => __DIR__ . '/..' . '/wpdesk/wp-saas-platform-client/src/ApiClient/ClientFactory.php',
|
434 |
'WPDesk\\View\\Resolver\\Resolver' => __DIR__ . '/..' . '/wpdesk/wp-view/src/Resolver/Resolver.php',
|
435 |
'WPDesk\\View\\Resolver\\WPThemeResolver' => __DIR__ . '/..' . '/wpdesk/wp-view/src/Resolver/WPThemeResolver.php',
|
436 |
'WPDesk_Flexible_Shipping' => __DIR__ . '/../..' . '/classes/shipping-method.php',
|
437 |
+
'WPDesk_Flexible_Shipping_AB_Pointer_Message_Test' => __DIR__ . '/../..' . '/classes/abtests/class-ab-pointer-message-test.php',
|
|
|
438 |
'WPDesk_Flexible_Shipping_AB_Tracker_Deactivation_Data' => __DIR__ . '/../..' . '/classes/abtests/class-ab-tracker-deactivation-data.php',
|
439 |
+
'WPDesk_Flexible_Shipping_AB_Variant_Old' => __DIR__ . '/../..' . '/classes/abtests/ab-pointer-message-test/class-ab-variant-old.php',
|
440 |
+
'WPDesk_Flexible_Shipping_AB_Variant_With_Pointer_Message_Text' => __DIR__ . '/../..' . '/classes/abtests/ab-pointer-message-test/class-ab-variant-with-pointer-message-text.php',
|
441 |
+
'WPDesk_Flexible_Shipping_AB_Variant_With_Pointer_Message_Video' => __DIR__ . '/../..' . '/classes/abtests/ab-pointer-message-test/class-ab-variant-with-pointer-message-video.php',
|
442 |
+
'WPDesk_Flexible_Shipping_AB_Variant_Without_Pointer_Message' => __DIR__ . '/../..' . '/classes/abtests/ab-pointer-message-test/class-ab-variant-without-pointer-message.php',
|
443 |
'WPDesk_Flexible_Shipping_Add_Shipping' => __DIR__ . '/../..' . '/classes/class-order-add-shipping.php',
|
444 |
'WPDesk_Flexible_Shipping_Admin_Notices' => __DIR__ . '/../..' . '/classes/admin-notices.php',
|
445 |
'WPDesk_Flexible_Shipping_Bulk_Actions' => __DIR__ . '/../..' . '/classes/bulk-actions.php',
|
455 |
'WPDesk_Flexible_Shipping_Manifest_FS' => __DIR__ . '/../..' . '/classes/manifest/class-manifest-fs.php',
|
456 |
'WPDesk_Flexible_Shipping_Manifest_Interface' => __DIR__ . '/../..' . '/classes/manifest/interface-manifest.php',
|
457 |
'WPDesk_Flexible_Shipping_Menu' => __DIR__ . '/../..' . '/classes/class-menu.php',
|
458 |
+
'WPDesk_Flexible_Shipping_Method_Created_Tracker_Deactivation_Data' => __DIR__ . '/../..' . '/classes/class-method-created-tracker-deactivation-data.php',
|
459 |
'WPDesk_Flexible_Shipping_Money_Formatter' => __DIR__ . '/../..' . '/classes/shipment/class-money-formatter.php',
|
460 |
'WPDesk_Flexible_Shipping_Multicurrency' => __DIR__ . '/../..' . '/classes/multicurrency.php',
|
461 |
'WPDesk_Flexible_Shipping_Multilingual' => __DIR__ . '/../..' . '/classes/multilingual.php',
|
462 |
+
'WPDesk_Flexible_Shipping_Pointer_Messages' => __DIR__ . '/../..' . '/classes/class-pointer-messages.php',
|
463 |
'WPDesk_Flexible_Shipping_SaaS_Add_Shipping_Handler' => __DIR__ . '/../..' . '/classes/saas/class-saas-add-shipping-handler.php',
|
464 |
'WPDesk_Flexible_Shipping_SaaS_Auth_Params' => __DIR__ . '/../..' . '/classes/saas/class-saas-auth-params.php',
|
465 |
'WPDesk_Flexible_Shipping_SaaS_Auth_Platform_Factory' => __DIR__ . '/../..' . '/classes/saas/class-saas-platform-factory.php',
|
562 |
public static function getInitializer(ClassLoader $loader)
|
563 |
{
|
564 |
return \Closure::bind(function () use ($loader) {
|
565 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit78bf5b5bb4027bd78b5809db6acbea96::$prefixLengthsPsr4;
|
566 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit78bf5b5bb4027bd78b5809db6acbea96::$prefixDirsPsr4;
|
567 |
+
$loader->classMap = ComposerStaticInit78bf5b5bb4027bd78b5809db6acbea96::$classMap;
|
568 |
|
569 |
}, null, ClassLoader::class);
|
570 |
}
|
vendor/composer/installed.json
CHANGED
@@ -620,6 +620,59 @@
|
|
620 |
}
|
621 |
]
|
622 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
623 |
{
|
624 |
"name": "wpdesk/wp-saas-platform-client",
|
625 |
"version": "1.10",
|
620 |
}
|
621 |
]
|
622 |
},
|
623 |
+
{
|
624 |
+
"name": "wpdesk/wp-pointer",
|
625 |
+
"version": "1.0.2",
|
626 |
+
"version_normalized": "1.0.2.0",
|
627 |
+
"source": {
|
628 |
+
"type": "git",
|
629 |
+
"url": "https://gitlab.com/wpdesk/wp-pointer.git",
|
630 |
+
"reference": "5fcf88cab27c4a5903caae884044d9285f8d8cd5"
|
631 |
+
},
|
632 |
+
"dist": {
|
633 |
+
"type": "zip",
|
634 |
+
"url": "https://gitlab.com/api/v4/projects/wpdesk%2Fwp-pointer/repository/archive.zip?sha=5fcf88cab27c4a5903caae884044d9285f8d8cd5",
|
635 |
+
"reference": "5fcf88cab27c4a5903caae884044d9285f8d8cd5",
|
636 |
+
"shasum": ""
|
637 |
+
},
|
638 |
+
"require": {
|
639 |
+
"php": ">=5.5",
|
640 |
+
"wpdesk/wp-builder": "^1.1"
|
641 |
+
},
|
642 |
+
"require-dev": {
|
643 |
+
"10up/wp_mock": "*",
|
644 |
+
"mockery/mockery": "*",
|
645 |
+
"phpunit/phpunit": "<7",
|
646 |
+
"squizlabs/php_codesniffer": "^3.0.2",
|
647 |
+
"wimg/php-compatibility": "^8",
|
648 |
+
"wp-coding-standards/wpcs": "^0.14.1"
|
649 |
+
},
|
650 |
+
"time": "2019-04-08T11:33:03+00:00",
|
651 |
+
"type": "library",
|
652 |
+
"installation-source": "dist",
|
653 |
+
"autoload": {
|
654 |
+
"psr-4": {
|
655 |
+
"WPDesk\\Pointer\\": "src/WPDesk/Pointer/"
|
656 |
+
}
|
657 |
+
},
|
658 |
+
"notification-url": "https://packagist.org/downloads/",
|
659 |
+
"license": [
|
660 |
+
"MIT"
|
661 |
+
],
|
662 |
+
"authors": [
|
663 |
+
{
|
664 |
+
"name": "grola",
|
665 |
+
"email": "grola@wpdesk.net"
|
666 |
+
}
|
667 |
+
],
|
668 |
+
"description": "Library for displaying Wordpress pointer messages.",
|
669 |
+
"homepage": "https://gitlab.com/wpdesk/wp-pointer",
|
670 |
+
"keywords": [
|
671 |
+
"admin",
|
672 |
+
"pointer",
|
673 |
+
"wordpress"
|
674 |
+
]
|
675 |
+
},
|
676 |
{
|
677 |
"name": "wpdesk/wp-saas-platform-client",
|
678 |
"version": "1.10",
|
vendor/wpdesk/wp-pointer/LICENSE.md
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
MIT License
|
2 |
+
|
3 |
+
Copyright (c) 2018 WP Desk
|
4 |
+
|
5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
+
of this software and associated documentation files (the "Software"), to deal
|
7 |
+
in the Software without restriction, including without limitation the rights
|
8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
+
copies of the Software, and to permit persons to whom the Software is
|
10 |
+
furnished to do so, subject to the following conditions:
|
11 |
+
|
12 |
+
The above copyright notice and this permission notice shall be included in all
|
13 |
+
copies or substantial portions of the Software.
|
14 |
+
|
15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21 |
+
SOFTWARE.
|
vendor/wpdesk/wp-pointer/README.md
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[![pipeline status](https://gitlab.com/wpdesk/wp-pointer/badges/master/pipeline.svg)](https://gitlab.com/wpdesk/wp-pointer/pipelines)
|
2 |
+
[![coverage report](https://gitlab.com/wpdesk/wp-pointer/badges/master/coverage.svg?job=integration+test+lastest+coverage)](https://gitlab.com/wpdesk/wp-pointer/commits/master)
|
3 |
+
[![Latest Stable Version](https://poser.pugx.org/wpdesk/wp-pointer/v/stable)](https://packagist.org/packages/wpdesk/wp-pointer)
|
4 |
+
[![Total Downloads](https://poser.pugx.org/wpdesk/wp-pointer/downloads)](https://packagist.org/packages/wpdesk/wp-pointer)
|
5 |
+
[![Latest Unstable Version](https://poser.pugx.org/wpdesk/wp-pointer/v/unstable)](https://packagist.org/packages/wpdesk/wp-pointer)
|
6 |
+
[![License](https://poser.pugx.org/wpdesk/wp-pointer/license)](https://packagist.org/packages/wpdesk/wp-pointer)
|
7 |
+
|
8 |
+
|
9 |
+
WordPress Library to display pointer messages in admin area.
|
10 |
+
===================================================
|
11 |
+
|
12 |
+
## Project documentation
|
13 |
+
|
14 |
+
PHPDoc: https://wpdesk.gitlab.io/wp-pointer/index.html
|
vendor/wpdesk/wp-pointer/composer.json
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "wpdesk/wp-pointer",
|
3 |
+
"description": "Library for displaying Wordpress pointer messages.",
|
4 |
+
"license": "MIT",
|
5 |
+
"keywords": ["wordpress", "pointer", "admin"],
|
6 |
+
"homepage": "https://gitlab.com/wpdesk/wp-pointer",
|
7 |
+
"minimum-stability": "stable",
|
8 |
+
"authors": [
|
9 |
+
{
|
10 |
+
"name": "grola",
|
11 |
+
"email": "grola@wpdesk.net"
|
12 |
+
}
|
13 |
+
],
|
14 |
+
"require": {
|
15 |
+
"php": ">=5.5",
|
16 |
+
"wpdesk/wp-builder": "^1.1"
|
17 |
+
},
|
18 |
+
"require-dev": {
|
19 |
+
"phpunit/phpunit": "<7",
|
20 |
+
"wp-coding-standards/wpcs": "^0.14.1",
|
21 |
+
"squizlabs/php_codesniffer": "^3.0.2",
|
22 |
+
"mockery/mockery": "*",
|
23 |
+
"10up/wp_mock": "*",
|
24 |
+
"wimg/php-compatibility": "^8"
|
25 |
+
},
|
26 |
+
"autoload": {
|
27 |
+
"psr-4": {"WPDesk\\Pointer\\": "src/WPDesk/Pointer/"}
|
28 |
+
},
|
29 |
+
"autoload-dev": {
|
30 |
+
},
|
31 |
+
"scripts": {
|
32 |
+
"phpcs": "phpcs",
|
33 |
+
"phpunit-unit": "phpunit --configuration phpunit-unit.xml --coverage-text --colors=never",
|
34 |
+
"phpunit-unit-fast": "phpunit --configuration phpunit-unit.xml --no-coverage",
|
35 |
+
"phpunit-integration": "phpunit --configuration phpunit-integration.xml --coverage-text --colors=never",
|
36 |
+
"phpunit-integration-fast": "phpunit --configuration phpunit-integration.xml --no-coverage"
|
37 |
+
}
|
38 |
+
}
|
vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerConditions.php
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPDesk\Pointer;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Pointer conditions.
|
7 |
+
*
|
8 |
+
* @package WPDesk\Pointer
|
9 |
+
*/
|
10 |
+
class PointerConditions
|
11 |
+
{
|
12 |
+
|
13 |
+
/**
|
14 |
+
* @var null|string|array
|
15 |
+
*/
|
16 |
+
private $screenId;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @var null|string
|
20 |
+
*/
|
21 |
+
private $capability;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* PointerConditions constructor.
|
25 |
+
*
|
26 |
+
* @param null|string|array $screenId Screen id. null or empty string - all screens.
|
27 |
+
* @param null|string $capability User capability. null or empty string for all capabilities.
|
28 |
+
*/
|
29 |
+
public function __construct(
|
30 |
+
$screenId = null,
|
31 |
+
$capability = null
|
32 |
+
) {
|
33 |
+
$this->screenId = $screenId;
|
34 |
+
$this->capability = $capability;
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* @return array|string|null
|
39 |
+
*/
|
40 |
+
public function getScreenId()
|
41 |
+
{
|
42 |
+
return $this->screenId;
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* @param array|string|null $screenId
|
47 |
+
*/
|
48 |
+
public function setScreenId($screenId)
|
49 |
+
{
|
50 |
+
$this->screenId = $screenId;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* @return string
|
55 |
+
*/
|
56 |
+
public function getCapability()
|
57 |
+
{
|
58 |
+
return $this->capability;
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* @param string $capability
|
63 |
+
*/
|
64 |
+
public function setCapability($capability)
|
65 |
+
{
|
66 |
+
$this->capability = $capability;
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* @return bool
|
71 |
+
*/
|
72 |
+
private function areScreenIdMet()
|
73 |
+
{
|
74 |
+
$screenIdMet = false;
|
75 |
+
if (!empty($this->screenId)) {
|
76 |
+
if (!is_array($this->screenId)) {
|
77 |
+
$this->screenId = array($this->screenId);
|
78 |
+
}
|
79 |
+
$screen = get_current_screen();
|
80 |
+
if (null !== $screen && in_array($screen->id, $this->screenId, true)) {
|
81 |
+
$screenIdMet = true;
|
82 |
+
}
|
83 |
+
} else {
|
84 |
+
$screenIdMet = true;
|
85 |
+
}
|
86 |
+
return $screenIdMet;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* @return bool
|
91 |
+
*/
|
92 |
+
private function areCapabilityMet()
|
93 |
+
{
|
94 |
+
if (!empty($this->capability)) {
|
95 |
+
$capabilityMet = current_user_can($this->capability);
|
96 |
+
} else {
|
97 |
+
$capabilityMet = true;
|
98 |
+
}
|
99 |
+
return $capabilityMet;
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* @return bool
|
104 |
+
*/
|
105 |
+
public function areConditionsMet()
|
106 |
+
{
|
107 |
+
return $this->areCapabilityMet() && $this->areScreenIdMet();
|
108 |
+
}
|
109 |
+
|
110 |
+
}
|
111 |
+
|
vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerMessage.php
ADDED
@@ -0,0 +1,326 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPDesk\Pointer;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* WordPress admin pointer message.
|
7 |
+
*
|
8 |
+
* @package WPDesk\Pointer
|
9 |
+
*/
|
10 |
+
class PointerMessage
|
11 |
+
{
|
12 |
+
const USER_META_DISMISSED_WP_POINTERS = 'dismissed_wp_pointers';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Is action added?
|
16 |
+
* @var bool
|
17 |
+
*/
|
18 |
+
private $actionAdded = false;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @var string
|
22 |
+
*/
|
23 |
+
private $id;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @var string
|
27 |
+
*/
|
28 |
+
private $anchor;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @var string
|
32 |
+
*/
|
33 |
+
private $content;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @var string
|
37 |
+
*/
|
38 |
+
private $title;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @var PointerPosition
|
42 |
+
*/
|
43 |
+
private $position;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* @var string|array
|
47 |
+
*/
|
48 |
+
private $pointerClass;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* @var int
|
52 |
+
*/
|
53 |
+
private $pointerWidth;
|
54 |
+
|
55 |
+
/**
|
56 |
+
* @var PointerConditions
|
57 |
+
*/
|
58 |
+
private $conditions;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* PointerMessage constructor.
|
62 |
+
*
|
63 |
+
* @param string $id
|
64 |
+
* @param string $anchor
|
65 |
+
* @param string $title
|
66 |
+
* @param string $content
|
67 |
+
* @param PointerPosition $position
|
68 |
+
* @param string pointerClass
|
69 |
+
* @param int $pointerWidth
|
70 |
+
* @param null|PointerConditions $conditions Pointer conditions.
|
71 |
+
*/
|
72 |
+
public function __construct(
|
73 |
+
$id,
|
74 |
+
$anchor,
|
75 |
+
$title,
|
76 |
+
$content,
|
77 |
+
$position = null,
|
78 |
+
$pointerClass = 'wp-pointer',
|
79 |
+
$pointerWidth = 320,
|
80 |
+
$conditions = null
|
81 |
+
) {
|
82 |
+
$this->id = $id;
|
83 |
+
$this->anchor = $anchor;
|
84 |
+
$this->title = $title;
|
85 |
+
$this->content = $content;
|
86 |
+
if ($position === null) {
|
87 |
+
$position = new PointerPosition();
|
88 |
+
}
|
89 |
+
$this->position = $position;
|
90 |
+
$this->pointerClass = $pointerClass;
|
91 |
+
$this->pointerWidth = $pointerWidth;
|
92 |
+
if (null === $conditions) {
|
93 |
+
$this->conditions = new PointerConditions();
|
94 |
+
} else {
|
95 |
+
$this->conditions = $conditions;
|
96 |
+
}
|
97 |
+
$this->addAction();
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Enqueue scripts.
|
102 |
+
*/
|
103 |
+
public function enqueueScripts()
|
104 |
+
{
|
105 |
+
wp_enqueue_style('wp-pointer');
|
106 |
+
wp_enqueue_script('wp-pointer');
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Add notice action.
|
111 |
+
*/
|
112 |
+
protected function addAction()
|
113 |
+
{
|
114 |
+
if (!$this->actionAdded) {
|
115 |
+
add_action('admin_print_footer_scripts', array($this, 'maybeRenderJavascript'));
|
116 |
+
add_action('admin_enqueue_scripts', array($this, 'enqueueScripts'));
|
117 |
+
$this->actionAdded = true;
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Remove action.
|
123 |
+
*/
|
124 |
+
public function removeAction()
|
125 |
+
{
|
126 |
+
if ($this->actionAdded) {
|
127 |
+
remove_action('admin_print_footer_scripts', array($this, 'maybeRenderJavascript'));
|
128 |
+
remove_action('admin_enqueue_scripts', array($this, 'enqueueScripts'));
|
129 |
+
$this->actionAdded = false;
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
|
134 |
+
/**
|
135 |
+
* @return string
|
136 |
+
*/
|
137 |
+
public function getId()
|
138 |
+
{
|
139 |
+
return $this->id;
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* @param string $id
|
144 |
+
*/
|
145 |
+
public function setId($id)
|
146 |
+
{
|
147 |
+
$this->id = $id;
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* @return string
|
152 |
+
*/
|
153 |
+
public function getAnchor()
|
154 |
+
{
|
155 |
+
return $this->anchor;
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* @param string $anchor
|
160 |
+
*/
|
161 |
+
public function setAnchor($anchor)
|
162 |
+
{
|
163 |
+
$this->anchor = $anchor;
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* @return string
|
168 |
+
*/
|
169 |
+
public function getContent()
|
170 |
+
{
|
171 |
+
return $this->content;
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* @param string $content
|
176 |
+
*/
|
177 |
+
public function setContent($content)
|
178 |
+
{
|
179 |
+
$this->content = $content;
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* @return string
|
184 |
+
*/
|
185 |
+
public function getTitle()
|
186 |
+
{
|
187 |
+
return $this->title;
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* @param string $title
|
192 |
+
*/
|
193 |
+
public function setTitle($title)
|
194 |
+
{
|
195 |
+
$this->title = $title;
|
196 |
+
}
|
197 |
+
|
198 |
+
/**
|
199 |
+
* @return array|string
|
200 |
+
*/
|
201 |
+
public function getPosition()
|
202 |
+
{
|
203 |
+
return $this->position;
|
204 |
+
}
|
205 |
+
|
206 |
+
/**
|
207 |
+
* @param array|string $position
|
208 |
+
*/
|
209 |
+
public function setPosition($position)
|
210 |
+
{
|
211 |
+
$this->position = $position;
|
212 |
+
}
|
213 |
+
|
214 |
+
/**
|
215 |
+
* @return array|string
|
216 |
+
*/
|
217 |
+
public function getPointerClass()
|
218 |
+
{
|
219 |
+
return $this->pointerClass;
|
220 |
+
}
|
221 |
+
|
222 |
+
/**
|
223 |
+
* @param array|string $pointerClass
|
224 |
+
*/
|
225 |
+
public function setPointerClass($pointerClass)
|
226 |
+
{
|
227 |
+
$this->pointerClass = $pointerClass;
|
228 |
+
}
|
229 |
+
|
230 |
+
/**
|
231 |
+
* @return int
|
232 |
+
*/
|
233 |
+
public function getPointerWidth()
|
234 |
+
{
|
235 |
+
return $this->pointerWidth;
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
* @param int $pointerWidth
|
240 |
+
*/
|
241 |
+
public function setPointerWidth($pointerWidth)
|
242 |
+
{
|
243 |
+
$this->pointerWidth = $pointerWidth;
|
244 |
+
}
|
245 |
+
|
246 |
+
/**
|
247 |
+
* @return PointerConditions
|
248 |
+
*/
|
249 |
+
public function getConditions()
|
250 |
+
{
|
251 |
+
return $this->conditions;
|
252 |
+
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
* @param PointerConditions $conditions
|
256 |
+
*/
|
257 |
+
public function setConditions($conditions)
|
258 |
+
{
|
259 |
+
$this->conditions = $conditions;
|
260 |
+
}
|
261 |
+
|
262 |
+
/**
|
263 |
+
* Render Java Script for pointer message.
|
264 |
+
*/
|
265 |
+
public function renderJavaScript()
|
266 |
+
{
|
267 |
+
$pointerAnchor = $this->getAnchor();
|
268 |
+
$pointerClass = $this->getPointerClass();
|
269 |
+
$pointerContentId = 'wpdesk_pointer_content_' . $this->getId();
|
270 |
+
$pointerWidth = $this->getPointerWidth();
|
271 |
+
$pointerContent = sprintf(
|
272 |
+
'<h3>%1$s</h3><p id="%2$s">%3$s</p>',
|
273 |
+
$this->title,
|
274 |
+
$pointerContentId,
|
275 |
+
$this->content
|
276 |
+
);
|
277 |
+
$pointerPosition = $this->getPosition();
|
278 |
+
$pointerId = $this->getId();
|
279 |
+
include 'views/html-script-pointer-message.php';
|
280 |
+
}
|
281 |
+
|
282 |
+
/**
|
283 |
+
* Meybe render Java Script for pointer message.
|
284 |
+
*/
|
285 |
+
public function maybeRenderJavascript()
|
286 |
+
{
|
287 |
+
if ($this->conditions->areConditionsMet() && !$this->isDismissed()) {
|
288 |
+
$this->renderJavaScript();
|
289 |
+
}
|
290 |
+
}
|
291 |
+
|
292 |
+
/**
|
293 |
+
* Is pointer message already dismissed?
|
294 |
+
*
|
295 |
+
* @return bool
|
296 |
+
*/
|
297 |
+
private function isDismissed()
|
298 |
+
{
|
299 |
+
$dismissedPointerMessages = array_filter(
|
300 |
+
explode(',', (string) get_user_meta(get_current_user_id(), self::USER_META_DISMISSED_WP_POINTERS, true))
|
301 |
+
);
|
302 |
+
return in_array($this->id, $dismissedPointerMessages, true);
|
303 |
+
}
|
304 |
+
|
305 |
+
/**
|
306 |
+
* Un dismiss pointer message.
|
307 |
+
*/
|
308 |
+
public function unDismiss()
|
309 |
+
{
|
310 |
+
$dismissedPointerMessages = array_filter(
|
311 |
+
explode(',', (string) get_user_meta(get_current_user_id(), self::USER_META_DISMISSED_WP_POINTERS, true))
|
312 |
+
);
|
313 |
+
foreach ($dismissedPointerMessages as $key => $value) {
|
314 |
+
if ($value === $this->getId()) {
|
315 |
+
unset($dismissedPointerMessages[$key]);
|
316 |
+
update_user_meta(
|
317 |
+
get_current_user_id(),
|
318 |
+
self::USER_META_DISMISSED_WP_POINTERS,
|
319 |
+
implode(',', $dismissedPointerMessages)
|
320 |
+
);
|
321 |
+
}
|
322 |
+
}
|
323 |
+
}
|
324 |
+
|
325 |
+
}
|
326 |
+
|
vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/PointerPosition.php
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPDesk\Pointer;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* WordPress admin pointer message position.
|
7 |
+
*
|
8 |
+
* @package WPDesk\Pointer
|
9 |
+
*/
|
10 |
+
class PointerPosition
|
11 |
+
{
|
12 |
+
|
13 |
+
const TOP = 'top';
|
14 |
+
const RIGHT = 'right';
|
15 |
+
const BOTTOM = 'bottom';
|
16 |
+
const LEFT = 'left';
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @var string
|
20 |
+
*/
|
21 |
+
private $edge = false;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @var string
|
25 |
+
*/
|
26 |
+
private $align;
|
27 |
+
|
28 |
+
public function __construct(
|
29 |
+
$edge = 'left',
|
30 |
+
$align = 'top'
|
31 |
+
) {
|
32 |
+
$this->edge = $edge;
|
33 |
+
$this->align = $align;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @return string
|
38 |
+
*/
|
39 |
+
public function getEdge()
|
40 |
+
{
|
41 |
+
return $this->edge;
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* @param string $edge
|
46 |
+
*/
|
47 |
+
public function setEdge($edge)
|
48 |
+
{
|
49 |
+
$this->edge = $edge;
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* @return string
|
54 |
+
*/
|
55 |
+
public function getAlign()
|
56 |
+
{
|
57 |
+
return $this->align;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @param string $align
|
62 |
+
*/
|
63 |
+
public function setAlign($align)
|
64 |
+
{
|
65 |
+
$this->align = $align;
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Render as JSON.
|
70 |
+
*/
|
71 |
+
public function render()
|
72 |
+
{
|
73 |
+
echo json_encode(array('edge' => $this->edge, 'align' => $this->align));
|
74 |
+
}
|
75 |
+
|
76 |
+
}
|
77 |
+
|
vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/PointersScripts.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPDesk\Pointer;
|
4 |
+
|
5 |
+
use WPDesk\PluginBuilder\Plugin\Hookable;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Pointers handler.
|
9 |
+
*
|
10 |
+
* @package WPDesk\Pointer
|
11 |
+
*/
|
12 |
+
class PointersScripts implements Hookable
|
13 |
+
{
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @var array
|
17 |
+
*/
|
18 |
+
private $enqueueOnScreens = array();
|
19 |
+
|
20 |
+
/**
|
21 |
+
* PointersScripts constructor.
|
22 |
+
*
|
23 |
+
* @param null|string|array $enqueueOnScreens Empty for all screens.
|
24 |
+
*/
|
25 |
+
public function __construct($enqueueOnScreens = array())
|
26 |
+
{
|
27 |
+
if (null === $enqueueOnScreens) {
|
28 |
+
$enqueueOnScreens = array();
|
29 |
+
}
|
30 |
+
if (!is_array($enqueueOnScreens)) {
|
31 |
+
$enqueueOnScreens = array($enqueueOnScreens);
|
32 |
+
}
|
33 |
+
$this->enqueueOnScreens = $enqueueOnScreens;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Hooks.
|
38 |
+
*/
|
39 |
+
public function hooks()
|
40 |
+
{
|
41 |
+
add_action('admin_enqueue_scripts', array($this, 'enqueueScripts'));
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Enqueue scripts.
|
46 |
+
*
|
47 |
+
* @param string $hook
|
48 |
+
*/
|
49 |
+
public function enqueueScripts($hook)
|
50 |
+
{
|
51 |
+
if (count($this->enqueueOnScreens) === 0 || in_array($hook, $this->enqueueOnScreens, true)) {
|
52 |
+
wp_enqueue_style('wp-pointer');
|
53 |
+
wp_enqueue_script('wp-pointer');
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
}
|
vendor/wpdesk/wp-pointer/src/WPDesk/Pointer/views/html-script-pointer-message.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @var string $pointerAnchor
|
4 |
+
* @var string $pointerContent
|
5 |
+
* @var \WPDesk\Pointer\PointerPosition $pointerPosition
|
6 |
+
* @var string $pointerId
|
7 |
+
* @var string $pointerContentId
|
8 |
+
* @var int $pointerWidth
|
9 |
+
*/
|
10 |
+
?>
|
11 |
+
<script type="text/javascript">
|
12 |
+
jQuery(document).ready( function($) {
|
13 |
+
if(typeof(jQuery().pointer) != 'undefined') {
|
14 |
+
$('<?php echo $pointerAnchor; ?>').pointer({
|
15 |
+
pointerWidth: <?php echo $pointerWidth; ?>,
|
16 |
+
content: <?php echo json_encode($pointerContent); ?>,
|
17 |
+
position: <?php echo $pointerPosition->render(); ?>,
|
18 |
+
close: function() {
|
19 |
+
$('#<?php echo $pointerContentId; ?>').remove();
|
20 |
+
$.post(ajaxurl, {
|
21 |
+
pointer: '<?php echo $pointerId; ?>',
|
22 |
+
action: 'dismiss-wp-pointer'
|
23 |
+
});
|
24 |
+
},
|
25 |
+
}).pointer('open');
|
26 |
+
}
|
27 |
+
});
|
28 |
+
</script>
|