Skip to content

Commit

Permalink
Added install and activation woocommerce link in notice if it is not …
Browse files Browse the repository at this point in the history
…activated.

Updated plugin version to 1.0.1
  • Loading branch information
dineshyadav4wp committed Jan 23, 2024
1 parent 25574e4 commit dbbfaff
Show file tree
Hide file tree
Showing 10 changed files with 82 additions and 36 deletions.
2 changes: 1 addition & 1 deletion includes/admin/class-wkmp-admin-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public function wkmp_admin_footer_text( $text ) {
$wk_page = \WK_Caching::wk_get_request_data( 'page' );

if ( ! empty( $wk_page ) && 0 === stripos( $wk_page, 'wk-marketplace' ) ) {
$text = wp_sprintf( __( 'If you like <strong>Marketplace</strong> please leave us a <a href="https://store.webkul.com/woocommerce-multivendor-marketplace.html" target="_blank" class="wc-rating-link" data-rated="Thanks :)">★★★★★</a> rating. A lot of thanks in advance!', 'wk-marketplace' ) );
$text = wp_sprintf( __( 'If you like <strong>Marketplace</strong> please leave us a <a href="https://wordpress.org/support/plugin/multi-vendor-marketplace-lite-for-woocommerce/reviews/?filter=5#new-post" target="_blank" class="wc-rating-link" data-rated="Thanks :)">★★★★★</a> rating. A lot of thanks in advance!', 'wk-marketplace' ) );
}

return $text;
Expand Down
12 changes: 11 additions & 1 deletion includes/class-wkmarketplace.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,17 @@ public function wkmp_load_plugin() {
* @return void
*/
public function wkmp_show_wc_not_installed_notice() {
$message = wp_sprintf( /* Translators: %s woocommerce links */ esc_html__( 'Marketplace plugin depends on the last version of %s or later to work!', 'wk-marketplace' ), '<a href="http://www.woothemes.com/woocommerce/" target="_blank">' . esc_html__( 'WooCommerce', 'wk-marketplace' ) . '</a>' );
$plugin = defined( 'WC_PLUGIN_BASENAME' ) ? WC_PLUGIN_BASENAME : 'woocommerce/woocommerce.php';

$activate_wc_url = wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $plugin . '&amp;plugin_status=all&amp;paged=1&amp;s', 'activate-plugin_' . $plugin );
$message = wp_sprintf( /* Translators: %1$s Marketplace Lite Plugin Name, %2$s: Woocommerce Activation link, %3$s: Closing anchor. */ esc_html__( '%1$s plugin depends on the latest version of WooCommerce. %2$s Click Here to Activate it Now %3$s', 'wk-marketplace' ), '<b>Multi-Vendor Marketplace Lite for WooCommerce</b>', '<a href=' . esc_url( $activate_wc_url ) . '>', '<a>' );

if ( ! wkmp_is_woocommerce_installed() ) {
$install_wc_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=woocommerce' ), 'install-plugin_woocommerce' );

$message = wp_sprintf( /* Translators: %1$s Marketplace Lite Plugin Name, %2$s: Woocommerce Install link, %3$s: Closing anchor. */ esc_html__( '%1$s plugin depends on the latest version of WooCommerce. %2$s Click Here to Install it Now %3$s', 'wk-marketplace' ), '<b>Multi-Vendor Marketplace Lite for WooCommerce</b>', '<a href=' . esc_url( $install_wc_url ) . '>', '<a>' );
}

self::wkmp_show_notice_on_admin( $message, 'error' );
}

Expand Down
14 changes: 14 additions & 0 deletions includes/woo-includes/class-wkmp-wc-dependencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,20 @@ public static function init() {
}
}

/**
* Woocommerce active check.
*
* @return bool
*/
public static function woocommerce_install_check() {
if ( ! function_exists( 'get_plugins' ) ) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
$installed_plugins = get_plugins();

return isset( $installed_plugins['woocommerce/woocommerce.php'] );
}

/**
* Woocommerce active check.
*
Expand Down
14 changes: 14 additions & 0 deletions includes/woo-includes/woo-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@
require_once __DIR__ . '/class-wkmp-wc-dependencies.php';
}

/**
* WC Detection.
*/
if ( ! function_exists( 'wkmp_is_woocommerce_installed' ) ) {
/**
* Checking if woocommere is active.
*
* @return bool
*/
function wkmp_is_woocommerce_installed() {
return WKMP_WC_Dependencies::woocommerce_install_check();
}
}

/**
* WC Detection.
*/
Expand Down
35 changes: 19 additions & 16 deletions languages/wk-marketplace.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the GPLv3.
msgid ""
msgstr ""
"Project-Id-Version: Multi-Vendor Marketplace Lite for WooCommerce 1.0.0\n"
"Project-Id-Version: Multi-Vendor Marketplace Lite for WooCommerce 1.0.1\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wk-marketplace\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2024-01-22T08:41:35+00:00\n"
"POT-Creation-Date: 2024-01-23T07:02:45+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.6.0\n"
"X-Domain: wk-marketplace\n"
Expand All @@ -19,7 +19,7 @@ msgid "Multi-Vendor Marketplace Lite for WooCommerce"
msgstr ""

#. Plugin URI of the plugin
msgid "https://wordpress.org/plugins/multi-vendor-marketplace-lite-for-woocommerce"
msgid "https://store.webkul.com/woocommerce-plugins.html"
msgstr ""

#. Description of the plugin
Expand Down Expand Up @@ -260,7 +260,7 @@ msgid "Product Per Page"
msgstr ""

#: includes/admin/class-wkmp-admin-functions.php:387
msgid "If you like <strong>Marketplace</strong> please leave us a <a href=\"https://store.webkul.com/woocommerce-multivendor-marketplace.html\" target=\"_blank\" class=\"wc-rating-link\" data-rated=\"Thanks :)\">★★★★★</a> rating. A lot of thanks in advance!"
msgid "If you like <strong>Marketplace</strong> please leave us a <a href=\"https://wordpress.org/support/plugin/multi-vendor-marketplace-lite-for-woocommerce/reviews/?filter=5#new-post\" target=\"_blank\" class=\"wc-rating-link\" data-rated=\"Thanks :)\">★★★★★</a> rating. A lot of thanks in advance!"
msgstr ""

#: includes/admin/class-wkmp-admin-functions.php:417
Expand Down Expand Up @@ -465,38 +465,37 @@ msgstr ""
msgid "Upgrade to Pro Now"
msgstr ""

#. Translators: %s woocommerce links
#: includes/class-wkmarketplace.php:248
msgid "Marketplace plugin depends on the last version of %s or later to work!"
#. Translators: %1$s Marketplace Lite Plugin Name, %2$s: Woocommerce Activation link, %3$s: Closing anchor.
#: includes/class-wkmarketplace.php:251
msgid "%1$s plugin depends on the latest version of WooCommerce. %2$s Click Here to Activate it Now %3$s"
msgstr ""

#. Translators: %s woocommerce links
#: includes/class-wkmarketplace.php:248
#: templates/front/seller/orders/wkmp-order-views.php:629
msgid "WooCommerce"
#. Translators: %1$s Marketplace Lite Plugin Name, %2$s: Woocommerce Install link, %3$s: Closing anchor.
#: includes/class-wkmarketplace.php:256
msgid "%1$s plugin depends on the latest version of WooCommerce. %2$s Click Here to Install it Now %3$s"
msgstr ""

#. Translators: %s Marketplace Pro module link.
#: includes/class-wkmarketplace.php:258
#: includes/class-wkmarketplace.php:268
msgid "This version of Multi-Vendor Marketplace for WooCommerce Lite plugin requires %1$s or later version of %2$s to work! Please consider upgrading it."
msgstr ""

#. Translators: %s Marketplace Pro module link.
#: includes/class-wkmarketplace.php:258
#: includes/class-wkmarketplace.php:268
msgid "Multi-Vendor Marketplace for WooCommerce"
msgstr ""

#. translators: %d: Seller id.
#: includes/class-wkmarketplace.php:505
#: includes/class-wkmarketplace.php:515
msgid "Seller %d"
msgstr ""

#. translators: %d total, %d limit, %d offset.
#: includes/class-wkmarketplace.php:541
#: includes/class-wkmarketplace.php:551
msgid "Showing %1$d to %2$d of %3$d (%4$d Pages)"
msgstr ""

#: includes/class-wkmarketplace.php:867
#: includes/class-wkmarketplace.php:877
msgid "Anonymous User"
msgstr ""

Expand Down Expand Up @@ -3516,6 +3515,10 @@ msgstr ""
msgid "added on %1$s at %2$s"
msgstr ""

#: templates/front/seller/orders/wkmp-order-views.php:629
msgid "WooCommerce"
msgstr ""

#. translators: %s: Author.
#: templates/front/seller/orders/wkmp-order-views.php:630
msgid " by %s"
Expand Down
8 changes: 4 additions & 4 deletions multi-vendor-marketplace-lite-for-woocommerce.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/**
* Plugin Name: Multi-Vendor Marketplace Lite for WooCommerce
* Plugin URI: https://wordpress.org/plugins/multi-vendor-marketplace-lite-for-woocommerce
* Plugin URI: https://store.webkul.com/woocommerce-plugins.html
* Description: This plugin converts the WooCommerce store into multi-vendor store. Using this plugin, the seller can manage the inventory, shipment, seller profile page, seller collection page and much more.
* Version: 1.0.0
* Version: 1.0.1
* Author: Webkul
* Author URI: https://webkul.com
* Text Domain: wk-marketplace
Expand Down Expand Up @@ -50,8 +50,8 @@
defined( 'WKMP_LITE_FILE' ) || define( 'WKMP_LITE_FILE', __FILE__ );
defined( 'WKMP_LITE_PLUGIN_FILE' ) || define( 'WKMP_LITE_PLUGIN_FILE', plugin_dir_path( __FILE__ ) );
defined( 'WKMP_LITE_PLUGIN_URL' ) || define( 'WKMP_LITE_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
defined( 'WKMP_LITE_SCRIPT_VERSION' ) || define( 'WKMP_LITE_SCRIPT_VERSION', '1.0.0' );
defined( 'WKMP_LITE_VERSION' ) || define( 'WKMP_LITE_VERSION', '1.0.0' );
defined( 'WKMP_LITE_SCRIPT_VERSION' ) || define( 'WKMP_LITE_SCRIPT_VERSION', '1.0.1' );
defined( 'WKMP_LITE_VERSION' ) || define( 'WKMP_LITE_VERSION', '1.0.1' );
defined( 'WKMP_LITE_DB_VERSION' ) || define( 'WKMP_LITE_DB_VERSION', '5.3.6' );
defined( 'WKMP_LITE_PLUGIN_BASENAME' ) || define( 'WKMP_LITE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
defined( 'WKMP_LITE_WK_CACHING_VERSION' ) || define( 'WKMP_LITE_WK_CACHING_VERSION', '1.0.8' );
Expand Down
9 changes: 6 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: webkul
Tags: b2c marketplace, marketplace, marketplace for WooCommerce, marketplace plugin, multi-vendor marketplace, seller, sellers, vendor, vendors, WooCommerce marketplace
Requires at least: 5.0
Tested up to: 6.4
Stable tag: 1.0.0
Stable tag: 1.0.1
Requires PHP: 7.4
Tested up to PHP: 8.3
WC requires at least: 5.0
Expand Down Expand Up @@ -249,10 +249,13 @@ For any Query please generate a ticket at https://webkul.com/ticket/

== Changelog ==

== 1.0.0 - 2024-01-22 ==
= 1.0.1 - 2024-01-23 =
Added install and activation woocommerce link in notice if it is not activated.

= 1.0.0 - 2024-01-22 =
Initial public release.

== 0.9.3 - 2024-01-15 ==
= 0.9.3 - 2024-01-15 =
Fixed: Nonce verification and security issues across the plugin.

Seller Frontend Dashboard.
Expand Down
2 changes: 1 addition & 1 deletion templates/front/class-wkmp-front-template-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ public function wkmp_front_footer_templates() {
$show_info = empty( $show_info ) ? 0 : intval( $show_info );
if ( 200 === $show_info ) {
?>
<input type="hidden" data-lwdt="202401221410" data-wkmp_lite_version="<?php echo esc_attr( WKMP_LITE_VERSION ); ?>">
<input type="hidden" data-lwdt="202401231240" data-wkmp_lite_version="<?php echo esc_attr( WKMP_LITE_VERSION ); ?>">
<?php
}
}
Expand Down
2 changes: 1 addition & 1 deletion wk_caching/includes/class-wk-caching.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public static function wk_caching_front_footer_info() {
$show_info = empty( $show_info ) ? 0 : intval( $show_info );
if ( 200 === $show_info ) {
?>
<input type="hidden" data-lwdt="202401101320" data-wk_caching_version="<?php echo esc_attr( WK_CACHING_VERSION ); ?>" data-wk_caching_slug="wk_caching">
<input type="hidden" data-lwdt="202401231210" data-wk_caching_version="<?php echo esc_attr( WK_CACHING_VERSION ); ?>" data-wk_caching_slug="wk_caching">
<?php
}
}
Expand Down
20 changes: 11 additions & 9 deletions wk_caching/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Stable tag: 1.0.8
Requires PHP: 7.4
Tested up to PHP: 8.3
WC requires at least: 5.0
WC tested up to: 8.4
WC tested up to: 8.5
WPML Compatible: yes
Multisite Compatible: yes

Expand All @@ -32,37 +32,39 @@ No questions asked yet
== Feel free to do so. ==
For any Query please generate a ticket at https://webkul.com/ticket/

== 1.0.8 (23-12-27) ==
== Changelog ==

= 1.0.8 (23-12-27) =
Added: Filter and settings to enable Redis cache from the current module.
Removed: Unused .md files containing php code in PHPFasteCache vendor folder showing security issues on some hosting.

== 1.0.7 (23-12-13) ==
= 1.0.7 (23-12-13) =
Added: A static function to get filtered data from global get and post variables.
Added: Added notice wrapper function for dynamic notice html with WP-6.4
Updated: Tested upto values for php-8.2 and wc-8.4

== 1.0.6 (23-11-17) ==
= 1.0.6 (23-11-17) =
Removed: Some unnecessary log.
Updated: Tested up to values.

== 1.0.5 (23-09-27) ==
= 1.0.5 (23-09-27) =
Fixed: Caching setting is not showing.

== 1.0.4 (23-08-11) ==
= 1.0.4 (23-08-11) =
Added: WC Marketplace lite constant to restricted sellers count.
Added: Auto downloading PHPFasteCache library from wpwebkul github without showing admin notice to run 'composer install'
Updated: WC Tested upto values to 8.0 in readme.txt.

== 1.0.3 (23-07-18) ==
= 1.0.3 (23-07-18) =
Moved: Setting in caching module to add it in required module's page.
Added: Saved cache keys count, show keys and show data links.
Added: Clear all cached data links in settings.
Added: Rest data for PHPFasteCache Driver.

== 1.0.1 (23-06-15) ==
= 1.0.1 (23-06-15) =
Added: Setting for enable/disable caching in core cahing submodule under WordPress General settings.

== 1.0.0 (23-06-02) ==
= 1.0.0 (23-06-02) =
Initial setup.
Implementation of Object Cache, File Cache, Transient Cache and PHPFasteCache 'File' Driver.

0 comments on commit dbbfaff

Please sign in to comment.