update
This commit is contained in:
@@ -84,6 +84,7 @@ if (array_key_exists('project_hash', $_GET)){
|
||||
// Set default notification to show
|
||||
$getelite_notice = get_option('woosea_getelite_notification');
|
||||
if(empty($getelite_notice['show'])){
|
||||
$getelite_notice = array();
|
||||
$getelite_notice['show'] = "yes";
|
||||
$getelite_notice['timestamp'] = date( 'd-m-Y' );
|
||||
}
|
||||
@@ -502,9 +503,22 @@ if (array_key_exists('project_hash', $_GET)){
|
||||
<td>
|
||||
<?php
|
||||
if((isset($project)) AND (array_key_exists('products_changed',$project))){
|
||||
print "<input name=\"products_changed\" type=\"checkbox\" class=\"checkbox-field\" checked>";
|
||||
print "<input name=\"products_changed\" type=\"checkbox\" class=\"checkbox-field\" checked> <a href=\"https://adtribes.io/update-product-feed-products-changed-new-ones-added/\" target=\"_blank\">Read our tutorial about this feature</a>";
|
||||
} else {
|
||||
print "<input name=\"products_changed\" type=\"checkbox\" class=\"checkbox-field\">";
|
||||
print "<input name=\"products_changed\" type=\"checkbox\" class=\"checkbox-field\"> <a href=\"https://adtribes.io/update-product-feed-products-changed-new-ones-added/\" target=\"_blank\">Read our tutorial about this feature</a>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><span><?php _e( 'Create a preview of the feed','woo-product-feed-pro' );?>:</span></td>
|
||||
<td>
|
||||
<?php
|
||||
if((isset($project)) AND (array_key_exists('preview_feed',$project))){
|
||||
print "<input name=\"preview_feed\" type=\"checkbox\" class=\"checkbox-field\" checked> <a href=\"https://adtribes.io/create-product-feed-preview/\" target=\"_blank\">Read our tutorial about this feature</a>";
|
||||
} else {
|
||||
print "<input name=\"preview_feed\" type=\"checkbox\" class=\"checkbox-field\"> <a href=\"https://adtribes.io/create-product-feed-preview/\" target=\"_blank\">Read our tutorial about this feature</a>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -1,20 +1,9 @@
|
||||
<?php
|
||||
$cron_projects = get_option( 'cron_projects' );
|
||||
$license_information = get_option( 'license_information' );
|
||||
$count_variation = wp_count_posts('product_variation');
|
||||
$count_single = wp_count_posts('product');
|
||||
$published_single = $count_single->publish;
|
||||
$published_variation = $count_variation->publish;
|
||||
$published_products = $published_single+$published_variation;
|
||||
$host = sanitize_text_field($_SERVER['HTTP_HOST']);
|
||||
$add_manipulation_support = get_option ('add_manipulation_support');
|
||||
|
||||
$product_numbers = array (
|
||||
"Single products" => $published_single,
|
||||
"Variation products" => $published_variation,
|
||||
"Total products" => $published_products
|
||||
);
|
||||
|
||||
$plugin_data = get_plugin_data( __FILE__ );
|
||||
|
||||
$versions = array (
|
||||
@@ -24,13 +13,6 @@ $versions = array (
|
||||
"WooCommerce Product Feed PRO" => WOOCOMMERCESEA_PLUGIN_VERSION
|
||||
);
|
||||
|
||||
// Get the sales from created product feeds
|
||||
//global $wpdb;
|
||||
//$charset_collate = $wpdb->get_charset_collate();
|
||||
//$table_name = $wpdb->prefix . 'adtribes_my_conversions';
|
||||
//$order_rows = $wpdb->get_results("SELECT * FROM $table_name", ARRAY_A);
|
||||
$order_rows = "";
|
||||
|
||||
/**
|
||||
* Change default footer text, asking to review our plugin
|
||||
**/
|
||||
@@ -69,6 +51,9 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
||||
$notifications_box = $notifications_obj->get_admin_notifications ( '12', 'false' );
|
||||
}
|
||||
|
||||
// create nonce
|
||||
$nonce = wp_create_nonce( 'woosea_ajax_nonce' );
|
||||
|
||||
?>
|
||||
<div class="wrap">
|
||||
<div class="woo-product-feed-pro-form-style-2">
|
||||
@@ -79,20 +64,6 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
||||
// KILL SWITCH, THIS WILL REMOVE ALL YOUR FEED PROJECTS
|
||||
// delete_option( 'cron_projects');
|
||||
|
||||
if(sanitize_text_field($_GET['debug']) == "true"){
|
||||
$external_debug_file = $notifications_obj->woosea_debug_informations ($versions, $product_numbers, $order_rows, $cron_projects);
|
||||
?>
|
||||
<div class="woo-product-feed-pro-form-style-2-heading"><?php _e( 'Debugging mode', 'woo-product-feed-pro' );?></div>
|
||||
<div class="notice notice-error is-dismissible">
|
||||
<p>
|
||||
<?php _e( 'Thank you for taking the time to help us find bugs in our plugin. It is greatly appreciated by us and your feedback will help all current and future users of this plugin. Could you please copy / paste the debug URL in the box below and send it to <a href="mailto:support@adtribes.io">support@adtribes.io</a> so we can analyse how your feed projects are configured and discover potential problems.','woo-product-feed-pro' );?><br/><br/>
|
||||
<?php
|
||||
print "<strong>Debug file:</strong><br/><a href=\"$external_debug_file\" target=\"_blank\">$external_debug_file</a>";
|
||||
?>
|
||||
</p>
|
||||
</div><br/>
|
||||
<?php
|
||||
}
|
||||
} elseif (array_key_exists('force-active', $_GET)){
|
||||
// Force active all feeds
|
||||
foreach($cron_projects as $key => $value){
|
||||
@@ -118,9 +89,10 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
||||
// Set default notification to show
|
||||
$getelite_notice = get_option('woosea_getelite_notification');
|
||||
if(empty($getelite_notice['show'])){
|
||||
$getelite_notice['show'] = "yes";
|
||||
$getelite_notice = array();
|
||||
$getelite_notice['show'] = "yes";
|
||||
$getelite_notice['timestamp'] = date( 'd-m-Y' );
|
||||
}
|
||||
}
|
||||
|
||||
if($getelite_notice['show'] <> "no"){
|
||||
?>
|
||||
@@ -129,10 +101,10 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
||||
<strong><?php _e( 'Would you like to get more out of your product feeds? Upgrade to the Elite version of the plugin and you will get:', 'woo-product-feed-pro' );?></strong><br/></br/>
|
||||
<span class="dashicons dashicons-yes"></span><?php _e( 'Priority support - we will help you to get your product feed(s) up-and-running;', 'woo-product-feed-pro' );?><br/>
|
||||
<span class="dashicons dashicons-yes"></span><?php _e( 'GTIN, Brand, MPN, EAN, Condition and more fields for your product feeds', 'woo-product-feed-pro' );?> [<a href="https://adtribes.io/add-gtin-mpn-upc-ean-product-condition-optimised-title-and-brand-attributes/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=adding%20fields" target="_blank"><?php _e( 'Read more','woo-product-feed-pro' );?></a>];<br/>
|
||||
<span class="dashicons dashicons-yes"></span><?php _e( 'Enhanched structured data on your product pages: more products approved in your Google Merchant Center', 'woo-product-feed-pro' );?> [<a href="https://adtribes.io/woocommerce-structured-data-bug/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=structured%20data%20bug" target="_blank"><?php _e( 'Read more','woo-product-feed-pro' );?></a>];<br/>
|
||||
<span class="dashicons dashicons-yes"></span><?php _e( 'Solve Googe Shopping price mismatch product disapprovals', 'woo-product-feed-pro' );?> [<a href="https://adtribes.io/woocommerce-structured-data-bug/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=structured%20data%20bug" target="_blank"><?php _e( 'Read more','woo-product-feed-pro' );?></a>];<br/>
|
||||
<span class="dashicons dashicons-yes"></span><?php _e( 'Advanced product data manipulation','woo-product-feed-pro' );?> [<a href="https://adtribes.io/feature-product-data-manipulation/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=product%20data%20manipulation" target="_blank"><?php _e( 'Read more','woo-product-feed-pro' );?></a>];<br/>
|
||||
<span class="dashicons dashicons-yes"></span><?php _e( 'WPML support - including their currency switcher','woo-product-feed-pro' );?> [<a href="https://adtribes.io/wpml-support/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=wpml%20support" target="_blank"><?php _e( 'Read more','woo-product-feed-pro' );?></a>];<br/>
|
||||
<span class="dashicons dashicons-yes"></span><?php _e( 'Aelia currency switcher support','woo-product-feed-pro' );?> [<a href="https://adtribes.io/aelia-currency-switcher-feature/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=aelia%20support" target="_blank"><?php _e( 'Read more','woo-product-feed-pro' );?></a>];<br/>
|
||||
<span class="dashicons dashicons-yes"></span><?php _e( 'Aelia & Curcy currency switcher support','woo-product-feed-pro' );?> [<a href="https://adtribes.io/aelia-currency-switcher-feature/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=aelia%20support" target="_blank"><?php _e( 'Read more','woo-product-feed-pro' );?></a>];<br/>
|
||||
<span class="dashicons dashicons-yes"></span><?php _e( 'Polylang support','woo-product-feed-pro' );?> [<a href="https://adtribes.io/polylang-support-product-feeds/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=polylang%20support" target="_blank"><?php _e( 'Read more','woo-product-feed-pro' );?></a>];<br/>
|
||||
<span class="dashicons dashicons-yes"></span><?php _e( 'Facebook pixel feature','woo-product-feed-pro' );?> [<a href="https://adtribes.io/facebook-pixel-feature/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=facebook pixel feature" target="_blank"><?php _e( 'Read more','woo-product-feed-pro' );?></a>];<br/><br/>
|
||||
<?php _e( 'Upgrade to the','woo-product-feed-pro' );?> <strong><a href="https://adtribes.io/pro-vs-elite/?utm_source=<?php print"$host";?>&utm_medium=manage-feed&utm_campaign=top-notification&utm_content=notification" target="_blank"><?php _e( 'Elite version of our plugin</a></strong> to get all these features.','woo-product-feed-pro' );?>
|
||||
@@ -142,7 +114,6 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) {
|
||||
?>
|
||||
<div class="notice notice-error is-dismissible">
|
||||
@@ -157,7 +128,26 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
||||
// Double check if the woosea_cron_hook is there, when it is not create a new one
|
||||
if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
||||
wp_schedule_event ( time(), 'hourly', 'woosea_cron_hook');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Request our plugin users to write a review
|
||||
**/
|
||||
if(!empty( $cron_projects )){
|
||||
$nr_projects = count($cron_projects);
|
||||
$first_activation = get_option ( 'woosea_first_activation' );
|
||||
$notification_interaction = get_option( 'woosea_review_interaction' );
|
||||
$current_time = time();
|
||||
$show_after = 604800; // Show only after one week
|
||||
$is_active = $current_time-$first_activation;
|
||||
$page = sanitize_text_field(basename($_SERVER['REQUEST_URI']));
|
||||
|
||||
if(($nr_projects > 0) AND ($is_active > $show_after) AND ($notification_interaction != "yes")){
|
||||
echo '<div class="notice notice-info review-notification">';
|
||||
echo '<table><tr><td></td><td><font color="green" style="font-weight:normal";><p>Hey, I noticed you have been using our plugin, <u>Product Feed PRO for WooCommerce by AdTribes.io</u>, for over a week now and have created product feed projects with it - that\'s awesome! Could you please do our support volunteers and me a BIG favor and give it a <strong>5-star rating</strong> on WordPress? Just to help us spread the word and boost our motivation. We would greatly appreciate if you would do so :)<br/>~ Adtribes.io support team<br><ul><li><span class="ui-icon ui-icon-caret-1-e" style="display: inline-block;"></span><a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="dismiss-review-notification">Ok, you deserve it</a></li><li><span class="ui-icon ui-icon-caret-1-e" style="display: inline-block;"></span><a href="#" class="dismiss-review-notification">Nope, maybe later</a></li><li><span class="ui-icon ui-icon-caret-1-e" style="display: inline-block;"></span><a href="#" class="dismiss-review-notification">I already did</a></li></ul></p></font></td></tr></table>';
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="woo-product-feed-pro-form-style-2-heading"><?php _e( 'Manage feeds','woo-product-feed-pro' );?></div>
|
||||
@@ -191,6 +181,7 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
||||
$projectname = ucfirst($val['projectname']);
|
||||
?>
|
||||
<form action="" method="post">
|
||||
<?php wp_nonce_field( 'woosea_ajax_nonce' ); ?>
|
||||
<tr class="<?php print "$class";?>">
|
||||
<td>
|
||||
<label class="woo-product-feed-pro-switch">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
$cron_projects = get_option( 'cron_projects' );
|
||||
$domain = sanitize_text_field($_SERVER['HTTP_HOST']);
|
||||
$plugin_settings = get_option( 'plugin_settings' );
|
||||
$license_information = get_option( 'license_information' );
|
||||
@@ -26,13 +27,26 @@ if(empty($license_information['license_key'])){
|
||||
$license_information['license_key'] = "";
|
||||
}
|
||||
|
||||
$count_variation = wp_count_posts('product_variation');
|
||||
$count_single = wp_count_posts('product');
|
||||
$published_single = $count_single->publish;
|
||||
$published_variation = $count_variation->publish;
|
||||
$published_products = $published_single+$published_variation;
|
||||
$product_numbers = array (
|
||||
"Single products" => $published_single,
|
||||
"Variation products" => $published_variation,
|
||||
"Total products" => $published_products
|
||||
);
|
||||
|
||||
$versions = array (
|
||||
"PHP" => (float)phpversion(),
|
||||
"Wordpress" => get_bloginfo('version'),
|
||||
"WooCommerce" => WC()->version,
|
||||
"PHP" => (float)phpversion(),
|
||||
"Wordpress" => get_bloginfo('version'),
|
||||
"WooCommerce" => WC()->version,
|
||||
"WooCommerce Product Feed PRO" => WOOCOMMERCESEA_PLUGIN_VERSION
|
||||
);
|
||||
|
||||
$order_rows = "";
|
||||
|
||||
/**
|
||||
* Create notification object and get message and message type as WooCommerce is inactive
|
||||
* also set variable allowed on 0 to disable submit button on step 1 of configuration
|
||||
@@ -121,9 +135,27 @@ if(isset($_GET["tab"])) {
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Request our plugin users to write a review
|
||||
**/
|
||||
if(!empty( $cron_projects )){
|
||||
$nr_projects = count($cron_projects);
|
||||
$first_activation = get_option ( 'woosea_first_activation' );
|
||||
$notification_interaction = get_option( 'woosea_review_interaction' );
|
||||
$current_time = time();
|
||||
$show_after = 604800; // Show only after one week
|
||||
$is_active = $current_time-$first_activation;
|
||||
$page = sanitize_text_field(basename($_SERVER['REQUEST_URI']));
|
||||
|
||||
if(($nr_projects > 0) AND ($is_active > $show_after) AND ($notification_interaction != "yes")){
|
||||
echo '<div class="notice notice-info review-notification">';
|
||||
echo '<table><tr><td></td><td><font color="green" style="font-weight:normal";><p>Hey, I noticed you have been using our plugin, <u>Product Feed PRO for WooCommerce by AdTribes.io</u>, for over a week now and have created product feed projects with it - that\'s awesome! Could you please do our support volunteers and me a BIG favor and give it a <strong>5-star rating</strong> on WordPress? Just to help us spread the word and boost our motivation. We would greatly appreciate if you would do so :)<br/>~ Adtribes.io support team<br><ul><li><span class="ui-icon ui-icon-caret-1-e" style="display: inline-block;"></span><a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="dismiss-review-notification">Ok, you deserve it</a></li><li><span class="ui-icon ui-icon-caret-1-e" style="display: inline-block;"></span><a href="#" class="dismiss-review-notification">Nope, maybe later</a></li><li><span class="ui-icon ui-icon-caret-1-e" style="display: inline-block;"></span><a href="#" class="dismiss-review-notification">I already did</a></li></ul></p></font></td></tr></table>';
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<!-- wordpress provides the styling for tabs. -->
|
||||
<h2 class="nav-tab-wrapper">
|
||||
@@ -542,6 +574,17 @@ if(isset($_GET["tab"])) {
|
||||
print "<tr><td colspan=\"2\"> </td></tr>";
|
||||
print "</table>";
|
||||
|
||||
// Display the debugging information.
|
||||
$debug_info_content = $notifications_obj->woosea_debug_informations( $versions, $product_numbers, $order_rows, $cron_projects );
|
||||
$debug_info_title = __( 'System Report', 'woo-product-feed-pro' );
|
||||
|
||||
print "<div class=\"woo-product-feed-pro-debug-info\">";
|
||||
print "<button class=\"button copy-product-feed-pro-debug-info\" type=\"button\" data-clipboard-target=\"#woo-product-feed-pro-debug-info\">Copy to clipboard</button>";
|
||||
print "<h3>{$debug_info_title}</h3>";
|
||||
print "<p>" . __( 'Copy the below text and paste to the support team when requested to help us debug any systems issues with your feeds.', 'woo-product-feed-pro' ) . "</p>";
|
||||
print "<pre id=\"woo-product-feed-pro-debug-info\">{$debug_info_content}</pre>";
|
||||
print "</div>";
|
||||
|
||||
} else {
|
||||
?>
|
||||
<table class="woo-product-feed-pro-table">
|
||||
|
||||
Reference in New Issue
Block a user