This commit is contained in:
2026-04-26 23:47:49 +02:00
parent 1b95f03d1e
commit b073e009d8
5288 changed files with 1112699 additions and 55536 deletions

View File

@@ -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\">&nbsp;</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">