Skip to content

Commit

Permalink
v2.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
kousikmukherjee committed Feb 9, 2024
1 parent 3a9763a commit afd91f5
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 11 deletions.
38 changes: 37 additions & 1 deletion includes/class-alg-wc-wish-list-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ final class Alg_WC_Wish_List_Core {
* @var string
* @since 1.0.0
*/
public $version = '2.3.2';
public $version = '2.3.3';

/**
* @var Alg_WC_Wish_List The single instance of the class
Expand Down Expand Up @@ -169,6 +169,10 @@ function __construct() {
// Initializes background process class.
$this->initialize_bkg_process_class();

// Change template path.
add_filter( 'woocommerce_locate_template', array( $this, 'woocommerce_locate_template' ), 10, 3 );
add_filter( 'woocommerce_locate_core_template', array( $this, 'woocommerce_locate_template' ), 10, 3 );

// Nav menu item.
add_filter( 'wp_get_nav_menu_items', array( $this, 'handle_nav_menu_item' ), 10, 3 );

Expand Down Expand Up @@ -259,6 +263,38 @@ private function handle_stock_alert() {
$stock_manager->init();
}

/**
* Override woocommerce locate template
*
* @version 1.3.2
* @since 1.3.2
*
* @param $template
* @param $template_name
* @param $template_path
*
* @return string
*/
public function woocommerce_locate_template( $template, $template_name, $template_path ) {
if ( strpos( $template_name, 'alg_wcwl' ) !== false ) {

$template_path = 'woocommerce';
$default_path = ALG_WC_WL_DIR . 'templates' . DIRECTORY_SEPARATOR;
$template = locate_template(
array(
trailingslashit( $template_path ) . $template_name,
$template_name,
)
);

// Get default template/
if ( ! $template || WC_TEMPLATE_DEBUG_MODE ) {
$template = $default_path . $template_name;
}
}
return $template;
}

/**
* Adds product description to wish list
*
Expand Down
2 changes: 1 addition & 1 deletion includes/class-alg-wc-wish-list-stock-email.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function trigger_mail( $product_id, $email, $user_id, $user_registered )
* @return string
*/
public function get_content_html() {
ob_start();
ob_start();
wc_get_template( $this->template_html, array(
'message' => $this->message,
'plain_text' => false,
Expand Down
12 changes: 6 additions & 6 deletions languages/wish-list-for-woocommerce.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Alg - Wish List for WooCommerce\n"
"POT-Creation-Date: 2024-01-04 14:25+0530\n"
"POT-Creation-Date: 2024-02-09 22:53+0530\n"
"PO-Revision-Date: 2017-01-17 13:05-0200\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down Expand Up @@ -1223,7 +1223,7 @@ msgid "Shows a loading icon after clicking on the button."
msgstr ""

#: includes/admin/class-alg-wc-wish-list-settings-social.php:35
#: includes/class-alg-wc-wish-list-core.php:707
#: includes/class-alg-wc-wish-list-core.php:743
msgid "Share"
msgstr ""

Expand Down Expand Up @@ -2004,7 +2004,7 @@ msgid ""
msgstr ""

#: includes/admin/class-alg-wc-wish-list-settings-texts.php:154
#: includes/class-alg-wc-wish-list-core.php:874
#: includes/class-alg-wc-wish-list-core.php:910
msgid "All the items have been removed from your wishlist."
msgstr ""

Expand Down Expand Up @@ -2123,7 +2123,7 @@ msgstr ""

#: includes/class-alg-wc-wish-list-ajax.php:377
#: includes/class-alg-wc-wish-list-ajax.php:531
#: includes/class-alg-wc-wish-list-core.php:873
#: includes/class-alg-wc-wish-list-core.php:909
#: includes/class-alg-wc-wish-list-email-sharing.php:196
#: includes/class-alg-wc-wish-list.php:180
msgid "Sorry, Some error occurred. Please, try again later."
Expand All @@ -2138,11 +2138,11 @@ msgid ""
"the Wishlist"
msgstr ""

#: includes/class-alg-wc-wish-list-core.php:331 templates/wish-list.php:36
#: includes/class-alg-wc-wish-list-core.php:367 templates/wish-list.php:36
msgid "The Wish list is empty."
msgstr ""

#: includes/class-alg-wc-wish-list-core.php:1043
#: includes/class-alg-wc-wish-list-core.php:1079
msgid "Settings"
msgstr ""

Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: wpcodefactory, omardabbas, karzin, anbinder, algoritmika, kousikmu
Tags: woocommerce, wishlist, woocommerce wishlist, add to wishlist, product wishlist
Requires at least: 6.1
Tested up to: 6.4
Stable tag: 2.3.2
Stable tag: 2.3.3
Requires PHP: 5.6.0
License: GNU General Public License v3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -272,6 +272,9 @@ Once activated, access the plugin's settings by navigating to “WooCommerce > S

== Changelog ==

= 2.3.3 - 09/02/2024 =
* Fix - Corrected typo in the readme.txt file.

= 2.3.2 - 13/01/2024 =
* Fix - Corrected typo in the readme.txt file.

Expand Down
33 changes: 33 additions & 0 deletions templates/emails/alg_wcwl-item_has_stock.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php
/**
* Wish List for WooCommerce - Stock email
*
* Template used to display the wishlist on user profile page.
*
* @author WPFactory.
* @version 1.3.2
* @since 1.3.2
*/
?>

<?php

if ( ! defined( 'ABSPATH' ) ) {
exit;
}



/**
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>

<?php echo $message; ?>

<?php

/**
* @hooked WC_Emails::email_footer() Output the email footer
*/
do_action( 'woocommerce_email_footer', $email );
4 changes: 2 additions & 2 deletions wish-list-for-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Wishlist for WooCommerce
Plugin URI: https://wpfactory.com/item/wish-list-woocommerce/
Description: Let your visitors save and share the products they love on your WooCommerce store with a Wishlist.
Version: 2.3.2
Version: 2.3.3
Author: WPFactory
Author URI: https://wpfactory.com/
Copyright: © 2023 WPFactory.
Expand All @@ -12,7 +12,7 @@
Text Domain: wish-list-for-woocommerce
Domain Path: /languages
WC requires at least: 3.0.0
WC tested up to: 8.4
WC tested up to: 8.5
*/

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
Expand Down

0 comments on commit afd91f5

Please sign in to comment.