diff --git a/admin/class-paypal-for-woocommerce-multi-account-management-admin.php b/admin/class-paypal-for-woocommerce-multi-account-management-admin.php
index db47a0d..385da80 100644
--- a/admin/class-paypal-for-woocommerce-multi-account-management-admin.php
+++ b/admin/class-paypal-for-woocommerce-multi-account-management-admin.php
@@ -559,7 +559,9 @@ public function angelleye_multi_account_settings_fields() {
$global_automatic_rule_creation_testmode = get_option('global_automatic_rule_creation_testmode', '');
$angelleye_payment_load_balancer = get_option('angelleye_payment_load_balancer', '');
?>
-
+
+
angelleye_pfwma_display_marketing_sidebar();
}
public function angelleye_multi_account_tooltip_box() {
@@ -746,6 +750,7 @@ public function angelleye_multi_account_list() {
)
);
?>
+
@@ -764,6 +769,8 @@ public function angelleye_multi_account_list() {
$table->display();
echo '';
}
+ ?>
angelleye_pfwma_display_marketing_sidebar();
}
public function angelleye_save_multi_account_data() {
@@ -2343,4 +2350,18 @@ public function own_update_angelleye_multi_account() {
delete_transient( 'angelleye_multi_payflow_payment_load_balancer_synce_sandbox' );
}
+ public function angelleye_pfwma_display_marketing_sidebar() {
+ if (false === ( $html = get_transient('angelleye_dynamic_marketing_sidebar_html_pfwma') )) {
+ $response = wp_remote_get('https://8aystwpoqi.execute-api.us-east-2.amazonaws.com/AngellEyeDynamicSidebar?pluginId=18');
+ if (is_array($response) && !is_wp_error($response)) {
+ if (!empty($response['body'])) {
+ set_transient('angelleye_dynamic_marketing_sidebar_html_pfwma', $response['body'], 24 * HOUR_IN_SECONDS);
+ echo $response['body'];
+ }
+ }
+ } else {
+ echo $html;
+ }
+ }
+
}
diff --git a/admin/css/paypal-for-woocommerce-multi-account-management-admin.css b/admin/css/paypal-for-woocommerce-multi-account-management-admin.css
index a0b1492..896365a 100644
--- a/admin/css/paypal-for-woocommerce-multi-account-management-admin.css
+++ b/admin/css/paypal-for-woocommerce-multi-account-management-admin.css
@@ -155,6 +155,10 @@ select.smart_forwarding_field {
text-overflow: ellipsis;
}
+#angelleye_paypal_marketing_table table.fixed {
+ border-right: none;
+}
+
@media screen and (max-width: 782px) {
.angelleye_multi_account_left {
max-width: 100% !important;
diff --git a/includes/class-paypal-for-woocommerce-multi-account-management-wp-list-table.php b/includes/class-paypal-for-woocommerce-multi-account-management-wp-list-table.php
index 8f1b5c1..3c777d9 100644
--- a/includes/class-paypal-for-woocommerce-multi-account-management-wp-list-table.php
+++ b/includes/class-paypal-for-woocommerce-multi-account-management-wp-list-table.php
@@ -790,7 +790,8 @@ protected function pagination( $which ) {
$this->screen->render_screen_reader_content( 'heading_pagination' );
}
- $output = '
' . sprintf( _n( '%s item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '';
+ $output = '';
+ //$output = '
' . sprintf( _n( '%s item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '';
$current = $this->get_pagenum();
$removable_query_args = wp_removable_query_args();
diff --git a/includes/class-paypal-for-woocommerce-multi-account-management.php b/includes/class-paypal-for-woocommerce-multi-account-management.php
index ef506c7..d79cfe8 100644
--- a/includes/class-paypal-for-woocommerce-multi-account-management.php
+++ b/includes/class-paypal-for-woocommerce-multi-account-management.php
@@ -120,6 +120,7 @@ private function load_dependencies() {
require_once plugin_dir_path(dirname(__FILE__)) . 'admin/class-paypal-for-woocommerce-multi-account-management-admin-paypal-payflow.php';
require_once plugin_dir_path(dirname(__FILE__)) . 'admin/class-paypal-for-woocommerce-multi-account-management-admin-express-checkout.php';
//require_once plugin_dir_path(dirname(__FILE__)) . 'admin/class-paypal-for-woocommerce-multi-account-management-admin-paypal-standard.php';
+ require_once plugin_dir_path(dirname(__FILE__)) . '/template/sidebar-process.php';
$this->loader = new Paypal_For_Woocommerce_Multi_Account_Management_Loader();
}
diff --git a/template/sidebar-process.php b/template/sidebar-process.php
new file mode 100644
index 0000000..77a01d3
--- /dev/null
+++ b/template/sidebar-process.php
@@ -0,0 +1,64 @@
+request));
+ }
+ $url = 'https://sendy.angelleye.com/subscribe';
+ $response = wp_remote_post($url, array(
+ 'method' => 'POST',
+ 'timeout' => 45,
+ 'redirection' => 5,
+ 'httpversion' => '1.0',
+ 'blocking' => true,
+ 'headers' => array(),
+ 'body' => array('list' => 'pjFolYKqSdLe57i4uuUz0g',
+ 'boolean' => 'true',
+ 'email' => $_POST['email'],
+ 'gdpr' => 'true',
+ 'silent' => 'true',
+ 'api_key' => 'qFcoVlU2uG3AMYabNTrC',
+ 'referrer' => $current_url
+ ),
+ 'cookies' => array()
+ )
+ );
+ if (is_wp_error($response)) {
+ wp_send_json(wp_remote_retrieve_body($response));
+ } else {
+ $body = wp_remote_retrieve_body($response);
+ $apiResponse = strval($body);
+ switch ($apiResponse) {
+ case 'true':
+ case '1':
+ prepareResponse("true", 'Thank you for subscribing!');
+ case 'Already subscribed.':
+ prepareResponse("true", 'Already subscribed!');
+ default:
+ prepareResponse("false", $apiResponse);
+ }
+ }
+ }
+
+}
+
+if (!function_exists('prepareResponse')) {
+
+ function prepareResponse($status = false, $msg = 'Something went wrong!') {
+ $return = array(
+ 'result' => $status,
+ 'message' => $msg
+ );
+ wp_send_json($return);
+ }
+
+}
\ No newline at end of file