Skip to content

Commit

Permalink
added images
Browse files Browse the repository at this point in the history
  • Loading branch information
hmbashar committed Nov 2, 2024
1 parent 8e527df commit 7fa8a81
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 19 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified .wordpress-org/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed .wordpress-org/icon-256x256.png
Binary file not shown.
Binary file added .wordpress-org/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion cbwct.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin URI: https://wordpress.org/plugins/wc-order-tracker/
Description: Your customer can track his/her order on your WooCommerce website easily, woocommerce order tracking system with ajax
Author: Md Abul Bashar
Version: 1.2.3
Version: 1.2.4
Author URI: https://facebook.com/hmbashar
Text Domain: cbwct
Requires Plugins: woocommerce
Expand Down
44 changes: 28 additions & 16 deletions inc/custom.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,39 @@

// Show Admin notice if Woocommerce plugin isn't installed.

function cbwct_notice_for_wc_admin_notice(){

if (!class_exists( 'WooCommerce' )) {
if( ! function_exists('get_plugin_data') ){
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
}
$plugin_data = get_plugin_data( CBWCT_TRACKER_PATH .'cbwct.php' );
$woo_url = 'https://wordpress.org/plugins/woocommerce/';

printf('<div class="notice notice-error">
<p><a href="%s" target="_blank">Woocommerce</a> Is Required! Woocommerce plugin needs to activated if you want to install the <strong>"%s"</strong> plugin.</p>
</div>', $woo_url, $plugin_data['Name']);
}else {
return false;
}

function cbwct_notice_for_wc_admin_notice() {
// Check if WooCommerce is not active
if (!class_exists('WooCommerce')) {
// Include the plugin.php file if the get_plugin_data function is not available
if (!function_exists('get_plugin_data')) {
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
}

// Get plugin data
$plugin_data = get_plugin_data(CBWCT_TRACKER_PATH . 'cbwct.php');
$woo_url = 'https://wordpress.org/plugins/woocommerce/';

// Display the admin notice with proper translation and escaping
printf(
'<div class="notice notice-error">
<p>%s</p>
</div>',
sprintf(
/* translators: %1$s is the WooCommerce link, %2$s is the plugin name */
esc_html__('The %2$s plugin requires WooCommerce to be installed and activated. Please install and activate WooCommerce from %1$s.', 'cbwet'),
'<a href="' . esc_url($woo_url) . '" target="_blank">' . esc_html__('the WordPress plugin repository', 'cbwet') . '</a>',
esc_html($plugin_data['Name'])
)
);
} else {
return false;
}
}
add_action('admin_notices', 'cbwct_notice_for_wc_admin_notice');




if(!class_exists('CBWCT_ORDER_TRACKER')) {

final class CBWCT_ORDER_TRACKER {
Expand Down
4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: hmbashar
Tags: woocommerce order tracker, order tracker, shipping, delivery tracker
Requires at least: 4.7
Tested up to: 6.6
Stable tag: 1.2.3
Tested up to: 6.7
Stable tag: 1.2.4
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down

0 comments on commit 7fa8a81

Please sign in to comment.