Changeset 3365744
- Timestamp:
- 09/22/2025 11:29:13 AM (6 weeks ago)
- Location:
- wt-gift-cards-woocommerce
- Files:
-
- 155 added
- 22 edited
-
tags/1.2.5 (added)
-
tags/1.2.5/LICENSE.txt (added)
-
tags/1.2.5/README.txt (added)
-
tags/1.2.5/admin (added)
-
tags/1.2.5/admin/class-wbte-woocommerce-gift-cards-free-admin.php (added)
-
tags/1.2.5/admin/css (added)
-
tags/1.2.5/admin/css/wt-bfcm-twenty-twenty-four.css (added)
-
tags/1.2.5/admin/css/wt-woocommerce-gift-cards-free-admin.css (added)
-
tags/1.2.5/admin/data (added)
-
tags/1.2.5/admin/data/data-tooltip.php (added)
-
tags/1.2.5/admin/images (added)
-
tags/1.2.5/admin/images/30day-money-back.svg (added)
-
tags/1.2.5/admin/images/background-freevspro.png (added)
-
tags/1.2.5/admin/images/bfcm-doc-settings-coupon.svg (added)
-
tags/1.2.5/admin/images/black-friday-2024.svg (added)
-
tags/1.2.5/admin/images/black-friday-bg-lines.png (added)
-
tags/1.2.5/admin/images/coupon-image.svg (added)
-
tags/1.2.5/admin/images/fast_support.svg (added)
-
tags/1.2.5/admin/images/money_back.svg (added)
-
tags/1.2.5/admin/images/pro_crown.svg (added)
-
tags/1.2.5/admin/images/satisfaction-rating.svg (added)
-
tags/1.2.5/admin/index.php (added)
-
tags/1.2.5/admin/js (added)
-
tags/1.2.5/admin/js/wbte-bfcm-twenty-twenty-four.js (added)
-
tags/1.2.5/admin/js/wt-woocommerce-gift-cards-free-admin.js (added)
-
tags/1.2.5/admin/modules (added)
-
tags/1.2.5/admin/modules/freevspro (added)
-
tags/1.2.5/admin/modules/freevspro/assets (added)
-
tags/1.2.5/admin/modules/freevspro/assets/images (added)
-
tags/1.2.5/admin/modules/freevspro/assets/images/plugin_icon.png (added)
-
tags/1.2.5/admin/modules/freevspro/assets/images/tick_icon.png (added)
-
tags/1.2.5/admin/modules/freevspro/assets/images/tick_icon_green.png (added)
-
tags/1.2.5/admin/modules/freevspro/freevspro.php (added)
-
tags/1.2.5/admin/modules/freevspro/views (added)
-
tags/1.2.5/admin/modules/freevspro/views/comparison-table.php (added)
-
tags/1.2.5/admin/modules/freevspro/views/goto-pro.php (added)
-
tags/1.2.5/admin/modules/gc_pro_banner (added)
-
tags/1.2.5/admin/modules/gc_pro_banner/assets (added)
-
tags/1.2.5/admin/modules/gc_pro_banner/assets/css (added)
-
tags/1.2.5/admin/modules/gc_pro_banner/assets/css/wt-gc-upsell-banner.css (added)
-
tags/1.2.5/admin/modules/gc_pro_banner/assets/images (added)
-
tags/1.2.5/admin/modules/gc_pro_banner/assets/images/bulb.svg (added)
-
tags/1.2.5/admin/modules/gc_pro_banner/assets/js (added)
-
tags/1.2.5/admin/modules/gc_pro_banner/assets/js/wt-gc-upsell-banner.js (added)
-
tags/1.2.5/admin/modules/gc_pro_banner/gc_pro_banner.php (added)
-
tags/1.2.5/admin/modules/gift_card (added)
-
tags/1.2.5/admin/modules/gift_card/assets (added)
-
tags/1.2.5/admin/modules/gift_card/assets/images (added)
-
tags/1.2.5/admin/modules/gift_card/assets/images/copy_icon.svg (added)
-
tags/1.2.5/admin/modules/gift_card/assets/images/default_featured.png (added)
-
tags/1.2.5/admin/modules/gift_card/assets/js (added)
-
tags/1.2.5/admin/modules/gift_card/assets/js/main.js (added)
-
tags/1.2.5/admin/modules/gift_card/data (added)
-
tags/1.2.5/admin/modules/gift_card/data/data-tooltip.php (added)
-
tags/1.2.5/admin/modules/gift_card/gift_card.php (added)
-
tags/1.2.5/admin/modules/gift_card/views (added)
-
tags/1.2.5/admin/modules/gift_card/views/---gift-card-template.php (added)
-
tags/1.2.5/admin/modules/gift_card/views/--email-configuration-settings-tab.php (added)
-
tags/1.2.5/admin/modules/gift_card/views/--template-settings-tab.php (added)
-
tags/1.2.5/admin/modules/gift_card/views/--title-customization-settings-tab.php (added)
-
tags/1.2.5/admin/modules/gift_card/views/-gift-cards-metabox-html.php (added)
-
tags/1.2.5/admin/modules/gift_card/views/-product-data-meta-box.php (added)
-
tags/1.2.5/admin/modules/gift_card/views/-template-preview-popup.php (added)
-
tags/1.2.5/admin/modules/gift_card/views/email-gift-card.php (added)
-
tags/1.2.5/admin/modules/gift_card/views/gift-card-product-edit.php (added)
-
tags/1.2.5/admin/modules/gift_card/views/gift-card-product.php (added)
-
tags/1.2.5/admin/views (added)
-
tags/1.2.5/admin/views/--general-tab.php (added)
-
tags/1.2.5/admin/views/-admin-settings-general.php (added)
-
tags/1.2.5/admin/views/-form-field-generator.php (added)
-
tags/1.2.5/admin/views/admin-settings-save-button.php (added)
-
tags/1.2.5/admin/views/settings-page.php (added)
-
tags/1.2.5/changelog.txt (added)
-
tags/1.2.5/common (added)
-
tags/1.2.5/common/class-wbte-woocommerce-gift-cards-free-common.php (added)
-
tags/1.2.5/common/classes (added)
-
tags/1.2.5/common/classes/class-wbte-gc-store-credit-apply-free.php (added)
-
tags/1.2.5/common/modules (added)
-
tags/1.2.5/common/modules/gift_card (added)
-
tags/1.2.5/common/modules/gift_card/assets (added)
-
tags/1.2.5/common/modules/gift_card/assets/images (added)
-
tags/1.2.5/common/modules/gift_card/assets/images/general-gift.jpg (added)
-
tags/1.2.5/common/modules/gift_card/assets/images/gift-card-2.png (added)
-
tags/1.2.5/common/modules/gift_card/assets/images/gift-card-3.png (added)
-
tags/1.2.5/common/modules/gift_card/assets/images/gift-card-4.png (added)
-
tags/1.2.5/common/modules/gift_card/assets/images/no-image.png (added)
-
tags/1.2.5/common/modules/gift_card/classes (added)
-
tags/1.2.5/common/modules/gift_card/classes/class-wbte-woocommerce-gift-cards-free-email.php (added)
-
tags/1.2.5/common/modules/gift_card/data (added)
-
tags/1.2.5/common/modules/gift_card/data/data.template.php (added)
-
tags/1.2.5/common/modules/gift_card/email (added)
-
tags/1.2.5/common/modules/gift_card/email/coupon-email.php (added)
-
tags/1.2.5/common/modules/gift_card/email/gift-card-email.php (added)
-
tags/1.2.5/common/modules/gift_card/email/plain (added)
-
tags/1.2.5/common/modules/gift_card/email/plain/coupon-email.php (added)
-
tags/1.2.5/common/modules/gift_card/gift_card.php (added)
-
tags/1.2.5/includes (added)
-
tags/1.2.5/includes/class-wbte-black-friday-cyber-monday-twenty-twenty-four.php (added)
-
tags/1.2.5/includes/class-wbte-gc-free-security-helper.php (added)
-
tags/1.2.5/includes/class-wbte-uninstall-feedback.php (added)
-
tags/1.2.5/includes/class-wbte-woocommerce-gift-cards-free-activator.php (added)
-
tags/1.2.5/includes/class-wbte-woocommerce-gift-cards-free-deactivator.php (added)
-
tags/1.2.5/includes/class-wbte-woocommerce-gift-cards-free-i18n.php (added)
-
tags/1.2.5/includes/class-wbte-woocommerce-gift-cards-free-loader.php (added)
-
tags/1.2.5/includes/class-wbte-woocommerce-gift-cards-free.php (added)
-
tags/1.2.5/includes/index.php (added)
-
tags/1.2.5/index.php (added)
-
tags/1.2.5/languages (added)
-
tags/1.2.5/languages/wt-gift-cards-woocommerce-es_ES.mo (added)
-
tags/1.2.5/languages/wt-gift-cards-woocommerce-es_ES.po (added)
-
tags/1.2.5/languages/wt-gift-cards-woocommerce-fr_FR.mo (added)
-
tags/1.2.5/languages/wt-gift-cards-woocommerce-fr_FR.po (added)
-
tags/1.2.5/languages/wt-gift-cards-woocommerce-it_IT.mo (added)
-
tags/1.2.5/languages/wt-gift-cards-woocommerce-it_IT.po (added)
-
tags/1.2.5/languages/wt-gift-cards-woocommerce-nl_NL.mo (added)
-
tags/1.2.5/languages/wt-gift-cards-woocommerce-nl_NL.po (added)
-
tags/1.2.5/languages/wt-gift-cards-woocommerce.pot (added)
-
tags/1.2.5/public (added)
-
tags/1.2.5/public/class-wbte-woocommerce-gift-cards-free-public.php (added)
-
tags/1.2.5/public/css (added)
-
tags/1.2.5/public/css/wt-woocommerce-gift-cards-free-public.css (added)
-
tags/1.2.5/public/index.php (added)
-
tags/1.2.5/public/js (added)
-
tags/1.2.5/public/js/wt-woocommerce-gift-cards-free-public.js (added)
-
tags/1.2.5/public/modules (added)
-
tags/1.2.5/public/modules/gift_card (added)
-
tags/1.2.5/public/modules/gift_card/assets (added)
-
tags/1.2.5/public/modules/gift_card/assets/css (added)
-
tags/1.2.5/public/modules/gift_card/assets/css/main.css (added)
-
tags/1.2.5/public/modules/gift_card/assets/js (added)
-
tags/1.2.5/public/modules/gift_card/assets/js/main.js (added)
-
tags/1.2.5/public/modules/gift_card/classes (added)
-
tags/1.2.5/public/modules/gift_card/classes/class-wbte-gc-gift-card-free-purchase-process-cart.php (added)
-
tags/1.2.5/public/modules/gift_card/classes/class-wbte-gc-gift-card-free-purchase-setup-product-page.php (added)
-
tags/1.2.5/public/modules/gift_card/classes/class-wbte-gc-gift-card-free-purchase-setup-product.php (added)
-
tags/1.2.5/public/modules/gift_card/classes/class-wbte-gc-gift-card-free-purchase.php (added)
-
tags/1.2.5/public/modules/gift_card/gift_card.php (added)
-
tags/1.2.5/public/modules/gift_card/templates (added)
-
tags/1.2.5/public/modules/gift_card/templates/gift-card.php (added)
-
tags/1.2.5/public/modules/gift_card/views (added)
-
tags/1.2.5/public/modules/gift_card/views/-myaccount-store-credit-coupons.php (added)
-
tags/1.2.5/public/modules/gift_card/views/-store-credit-form.php (added)
-
tags/1.2.5/uninstall.php (added)
-
tags/1.2.5/wpml-config.xml (added)
-
tags/1.2.5/wt-gift-cards-woocommerce.php (added)
-
trunk/README.txt (modified) (7 diffs)
-
trunk/admin/class-wbte-woocommerce-gift-cards-free-admin.php (modified) (3 diffs)
-
trunk/admin/images/background-freevspro.png (added)
-
trunk/admin/modules/freevspro/views/comparison-table.php (modified) (7 diffs)
-
trunk/admin/modules/freevspro/views/goto-pro.php (modified) (2 diffs)
-
trunk/admin/modules/gc_pro_banner (added)
-
trunk/admin/modules/gc_pro_banner/assets (added)
-
trunk/admin/modules/gc_pro_banner/assets/css (added)
-
trunk/admin/modules/gc_pro_banner/assets/css/wt-gc-upsell-banner.css (added)
-
trunk/admin/modules/gc_pro_banner/assets/images (added)
-
trunk/admin/modules/gc_pro_banner/assets/images/bulb.svg (added)
-
trunk/admin/modules/gc_pro_banner/assets/js (added)
-
trunk/admin/modules/gc_pro_banner/assets/js/wt-gc-upsell-banner.js (added)
-
trunk/admin/modules/gc_pro_banner/gc_pro_banner.php (added)
-
trunk/admin/modules/gift_card/gift_card.php (modified) (8 diffs)
-
trunk/admin/modules/gift_card/views/--email-configuration-settings-tab.php (modified) (3 diffs)
-
trunk/admin/modules/gift_card/views/--template-settings-tab.php (modified) (1 diff)
-
trunk/admin/modules/gift_card/views/gift-card-product.php (modified) (2 diffs)
-
trunk/admin/views/-form-field-generator.php (modified) (1 diff)
-
trunk/admin/views/settings-page.php (modified) (1 diff)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/common/class-wbte-woocommerce-gift-cards-free-common.php (modified) (3 diffs)
-
trunk/common/classes/class-wbte-gc-store-credit-apply-free.php (modified) (1 diff)
-
trunk/common/modules/gift_card/data/data.template.php (modified) (5 diffs)
-
trunk/common/modules/gift_card/gift_card.php (modified) (3 diffs)
-
trunk/includes/class-wbte-black-friday-cyber-monday-twenty-twenty-four.php (modified) (2 diffs)
-
trunk/includes/class-wbte-uninstall-feedback.php (modified) (7 diffs)
-
trunk/includes/class-wbte-woocommerce-gift-cards-free.php (modified) (1 diff)
-
trunk/public/modules/gift_card/classes/class-wbte-gc-gift-card-free-purchase-process-cart.php (modified) (2 diffs)
-
trunk/public/modules/gift_card/classes/class-wbte-gc-gift-card-free-purchase-setup-product-page.php (modified) (1 diff)
-
trunk/public/modules/gift_card/gift_card.php (modified) (2 diffs)
-
trunk/wt-gift-cards-woocommerce.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wt-gift-cards-woocommerce/trunk/README.txt
r3348454 r3365744 1 === WebToffee WooCommerce Gift Cards - Create & ManageGift Cards for WooCommerce ===1 === WebToffee Gift Cards for WooCommerce === 2 2 Contributors: WebToffee 3 Version: 1.2. 43 Version: 1.2.5 4 4 Donate link:https://www.webtoffee.com/product/woocommerce-gift-cards/ 5 5 Tags: gift cards, woocommerce gift cards, gift certificates, gift voucher, advanced gift cards … … 7 7 Tested up to: 6.8 8 8 Requires PHP: 5.6 9 Stable tag: 1.2. 49 Stable tag: 1.2.5 10 10 License: GPLv3 11 11 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 21 21 The WebToffee WooCommerce Gift Cards plugin (also known as WooCommerce gift voucher plugin) is a digital gift card solution that helps create gift certificates in WooCommerce. You can easily generate eye-catching customized WooCommerce gift cards with a beginner-friendly interface. 22 22 23 This free gift card plugin is the ultimate gift card solution for WooCommerce stores. It lets you create Amazon-like gift vouchers and allows your customers to conveniently purchase and redeem from your store.24 25 == Key Features of this Free Gift Cards Plugin ==23 This free gift card WordPress plugin is the ultimate gift card solution for WooCommerce stores. It lets you create Amazon-like gift vouchers and allows your customers to conveniently purchase and redeem from your store. 24 25 == Key Features of this Free WordPress Gift Cards Plugin == 26 26 🔸 **Create digital gift card** - Create and sell digital gift card in WooCommerce. 27 27 🔸 **Free gift card template** - The WooCommerce gift voucher plugin offers four gift cards free templates. … … 38 38 39 39 == Free Templates for WooCommerce Gift Vouchers == 40 This free gift card plugin for WooCommerce offers four cool templates for gift card images. You can allow your customers to choose an image for the gift card from the given four templates. These templates feature a range of designs, from classic and elegant to festive and fun, ensuring a perfect match for every occasion and recipient.40 This free gift card plugin for WooCommerce offers four cool templates for gift card images. You can create customized WooCommerce gift cards from the free templates. These templates feature a range of designs, from classic and elegant to festive and fun, ensuring a perfect match for every occasion and recipient. With the premium version of this ecommerce gift card plugin you can upload custom images for the gift card and allow your customers to personalize the gift cards with custom images and messages. 41 41 42 42 == Send Free Gift Cards to Customers == … … 80 80 81 81 == WebToffee WooCommerce Gift Cards (Premium) == 82 The [WooCommerce Gift Cards](https://www.webtoffee.com/product/woocommerce-gift-cards/ ) plugin by WebToffee allows you to create and sell gift card codes on your WooCommerce store. You can set up both digital and physical gift cards and allow customers to send custom gift cards from your store. Unlock advanced gift cards features with the premium version.82 The [WooCommerce Gift Cards](https://www.webtoffee.com/product/woocommerce-gift-cards/?utm_source=free_plugin_readme&utm_medium=gift_cards&utm_campaign=WooCommerce_Gift_Cards) plugin by WebToffee allows you to create and sell gift card codes on your WooCommerce store. You can set up both digital and physical gift cards and allow customers to send custom gift cards from your store. Unlock advanced gift cards features with the premium version. 83 83 84 84 [youtube https://www.youtube.com/watch?v=bKmGBG9U1uY&ab_channel=WebToffee] … … 100 100 ✅ Use store credits on shipping, tax, and other charges </li> 101 101 102 == Extend Gift Cards with WooCommerce Smart Coupons == 103 104 Want to supercharge your WooCommerce gift cards? Pair them with **Smart Coupons for WooCommerce** – the all-in-one solution for coupons, store credits, and advanced discounts. 105 106 With **Smart Coupons**, you can: 107 - Generate and assign **store credits** that customers can redeem partially or fully. 108 - Create **advanced coupon types** like BOGO (Buy One Get One), bulk discounts, and more. 109 - Set **usage restrictions** based on products, categories, user roles, and cart conditions. 110 - Schedule coupons for **special promotions** and campaigns. 111 - Issue **store credit-style gift vouchers** that customers can use across multiple orders until fully redeemed. 112 113 Both free and premium options are available: 114 - **[Get Smart Coupons Free](https://wordpress.org/plugins/wt-smart-coupons-for-woocommerce/)** – Start with essential coupon and store credit features to run basic campaigns. 115 - **[Get Smart Coupons Premium](https://www.webtoffee.com/product/smart-coupons-for-woocommerce/?utm_source=free_plugin_readme&utm_medium=gift_cards&utm_campaign=smart_coupons)** – Unlock the full power of Smart Coupons with BOGO deals, auto-apply coupons, bulk generation, URL coupons, advanced restrictions, and more. 116 117 By combining WooCommerce Gift Cards with Smart Coupons, you can create a complete gifting and discounting strategy that keeps customers coming back and helps boost your store’s revenue. 118 119 == You May Also Need == 120 GDPR Cookie Consent is our flagship cookie consent plugin, which is a Google-certified CMP built specifically for WordPress websites. With this plugin, you can display a fully customizable cookie banner on your site to help ensure compliance with major privacy laws like the GDPR and CCPA. 121 122 Key features include an advanced cookie scanner, automatic script blocking, and detailed consent log reporting. It also lets you deploy an IAB-compliant cookie banner and supports Google Consent Mode v2. 123 124 Get [GDPR Cookie Consent Plugin](https://www.webtoffee.com/product/gdpr-cookie-consent/?utm_source=free_plugin_readme&utm_medium=gift_cards&utm_campaign=GDPR) Now. 125 102 126 == Installation == 103 127 … … 178 202 == Upgrade Notice == 179 203 180 = 1.2. 4=181 *[ Compatibility] - Tested OK with WooCommerce 10.1204 = 1.2.5 = 205 *[Tweak] - Performance optimization and bug fixes. -
wt-gift-cards-woocommerce/trunk/admin/class-wbte-woocommerce-gift-cards-free-admin.php
r3067373 r3365744 54 54 'gift_card', 55 55 'freevspro', 56 'gc_pro_banner', /** @since 1.2.5 */ 56 57 ); 57 58 … … 186 187 wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/wt-woocommerce-gift-cards-free-admin.css', array( 'wc-admin-layout' ), $this->version, 'all' ); 187 188 wp_enqueue_style( 'wp-color-picker' ); 188 wp_enqueue_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css' );189 wp_enqueue_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), $this->version ); 189 190 } 190 191 } … … 417 418 foreach ( $the_options as $key => $value ) { 418 419 if ( isset( $_POST[ $key ] ) ) { 419 $the_options[ $key ] = Wbte_Gc_Free_Security_Helper::sanitize_data( wc_clean( wp_unslash( $_POST[ $key ] ) ), $key, $validation_rule ); 420 $the_options[ $key ] = Wbte_Gc_Free_Security_Helper::sanitize_data( wc_clean( wp_unslash( $_POST[ $key ] ) ), $key, $validation_rule ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 420 421 } elseif ( array_key_exists( $key, $default_val_needed_fields ) ) { 421 422 /* Set a hidden field for every multi-select, checkbox etc fields in the form. This will be used to add a default value when it does not have any POST value. */ -
wt-gift-cards-woocommerce/trunk/admin/modules/freevspro/views/comparison-table.php
r3030434 r3365744 40 40 ), 41 41 array( 42 __( 'Allow users to schedule gift cards', 'wt-gift-cards-woocommerce' ), 43 false, 44 true, 45 ), 46 array( 47 __( 'Category-wise template listing', 'wt-gift-cards-woocommerce' ), 48 false, 49 true, 50 ), 51 array( 42 52 __( "'Gift this product' option (Create gift cards worth of a specific product)", 'wt-gift-cards-woocommerce' ), 43 53 false, … … 55 65 ), 56 66 array( 57 __( 'Category-wise template listing', 'wt-gift-cards-woocommerce' ), 58 false, 59 true, 60 ), 61 array( 62 __( 'Allow users to schedule gift cards', 'wt-gift-cards-woocommerce' ), 67 __( 'Manage store credit balances of users', 'wt-gift-cards-woocommerce' ), 63 68 false, 64 69 true, … … 85 90 ), 86 91 array( 87 __( 'Give discounts on gift card s', 'wt-gift-cards-woocommerce' ),92 __( 'Give discounts on gift card purchases', 'wt-gift-cards-woocommerce' ), 88 93 false, 89 94 true, … … 133 138 ?> 134 139 135 <table style="width:100%; background: linear-gradient(to right, #fff, #F1FFF4); padding:37px 46px; border: 1px solid #6ABE45; border-radius: 10px 10px 0px 0px;"> 136 <tr> 137 <td> 138 <img src="<?php echo esc_url( WBTE_GC_FREE_URL . 'admin/modules/freevspro/assets/images/plugin_icon.png' ); ?>" style="float:left; width:51px;"> 140 <table style="width:100%; background: #fff url('<?php echo esc_url( WBTE_GC_FREE_URL . 'admin/images/background-freevspro.png' ); ?>') no-repeat bottom right; border-radius:8px; padding:2px; margin:2px 0; box-shadow:0 1px 3px rgba(0,0,0,0.05); margin-bottom: 14px; background-size: 100% auto;"> 141 <tr style="vertical-align:middle;"> 142 143 <td style="padding:20px;"> 144 <div style="display:flex; align-items:center; gap:15px; width:56%;"> 145 <img src="<?php echo esc_url( WBTE_GC_FREE_URL . 'admin/modules/freevspro/assets/images/plugin_icon.png' ); ?>" alt="Plugin Icon" style="width:50px; height:50px;"> 146 <p style="margin:0; font-size:18px; font-weight:600; color:#111;"> 147 <?php esc_html_e( 'Upgrade to Premium and Enjoy the Full Potential of WooCommerce Gift Cards', 'wt-gift-cards-woocommerce' ); ?> 148 </p> 149 </div> 150 151 <div style="margin-top:17px; display:flex; gap:25px; font-size:14px; color:#444; font-weight: 600;"> 152 <span><span style="color:#6abe45; margin-right:6px;" class="dashicons dashicons-yes"></span><?php esc_html_e( '99% Customer Satisfaction', 'wt-gift-cards-woocommerce' ); ?></span> 153 <span><span style="color:#6abe45; margin-right:6px;" class="dashicons dashicons-yes"></span><?php esc_html_e( '30 Day money back guarantee', 'wt-gift-cards-woocommerce' ); ?></span> 154 </div> 139 155 </td> 140 <td style="padding-left: 20px;"> 141 <p style="font-size:23px; font-weight:700;">⚡ <?php esc_html_e( 'Unlock the full potential of gift cards with a', 'wt-gift-cards-woocommerce' ); ?> ✨ <?php esc_html_e( 'premium upgrade', 'wt-gift-cards-woocommerce' ); ?></p> 142 <p><?php esc_html_e( 'See what you are missing on your free version!', 'wt-gift-cards-woocommerce' ); ?></p> 143 <span style="color:#6ABE45;" class="dashicons dashicons-saved"></span><span style="color:#616161; font-size:14px;"><?php esc_html_e( '99% Customer Satisfaction', 'wt-gift-cards-woocommerce' ); ?></span>  <span style="color:#6ABE45;" class="dashicons dashicons-saved"></span><span style="color:#616161; font-size:14px;"><?php esc_html_e( '30 Day money back guarantee', 'wt-gift-cards-woocommerce' ); ?></span> 144 </td> 145 <td> 146 <a style="background:#4750CB; font-size:16px; font-weight:500; border-radius:11px; line-height:48px; color:#fff; border:none; text-align: center;" class="button button-secondary" href="<?php echo esc_url( 'https://www.webtoffee.com/product/woocommerce-gift-cards/?utm_source=free_plugin_free_vs_pro&utm_medium=Gift_card_basic&utm_campaign=WooCommerce_Gift_Cards&utm_content=' . WBTE_GC_FREE_VERSION ); ?>" target="_blank"><?php esc_html_e( 'Unlock pro features', 'wt-gift-cards-woocommerce' ); ?> <span class="dashicons dashicons-arrow-right-alt" style="line-height:48px;font-size:14px;"></span></a> 156 157 <td style="text-align:right; padding:20px; width:40%;"> 158 <a href="<?php echo esc_url( 'https://www.webtoffee.com/product/woocommerce-gift-cards/?utm_source=free_plugin_free_vs_pro&utm_medium=Gift_card_basic&utm_campaign=WooCommerce_Gift_Cards&utm_content=' . WBTE_GC_FREE_VERSION ); ?>" target="_blank" 159 style="display:inline-block; background:#4750cb; font-size:15px; font-weight:500; border-radius:8px; padding:12px 20px; color:#fff; text-decoration:none;"> 160 <?php esc_html_e( 'Unlock Pro Features', 'wt-gift-cards-woocommerce' ); ?> → 161 </a> 147 162 </td> 148 163 </tr> … … 151 166 <tr class="wt_gc_freevspro_table_hd_tr"> 152 167 <td><?php esc_html_e( 'FEATURES', 'wt-gift-cards-woocommerce' ); ?></td> 153 <td ><?php esc_html_e( 'FREE', 'wt-gift-cards-woocommerce' ); ?></td>154 <td ><?php esc_html_e( 'PREMIUM', 'wt-gift-cards-woocommerce' ); ?> <span><img src="<?php echo esc_url( WBTE_GC_FREE_URL . 'admin/images/pro_crown.svg' ); ?>" style="width:16px;"></span></td>168 <td class="wt_gc_upsell_text_align_center"><?php esc_html_e( 'FREE', 'wt-gift-cards-woocommerce' ); ?></td> 169 <td class="wt_gc_upsell_text_align_center"><?php esc_html_e( 'PREMIUM', 'wt-gift-cards-woocommerce' ); ?> <span><img src="<?php echo esc_url( WBTE_GC_FREE_URL . 'admin/images/pro_crown.svg' ); ?>" style="width:16px;"></span></td> 155 170 </tr> 156 171 <?php … … 159 174 <tr class="wt_gc_freevspro_table_body_tr"> 160 175 <td><?php echo wp_kses_post( $val_arr[0] ); ?></td> 161 <td >176 <td class="wt_gc_upsell_text_align_center"> 162 177 <?php 163 178 wbte_gc_free_vs_pro_column_vl( $val_arr[1], $yes_icon, $no_icon ); 164 179 ?> 165 180 </td> 166 <td >181 <td class="wt_gc_upsell_text_align_center"> 167 182 <?php 168 183 wbte_gc_free_vs_pro_column_vl( $val_arr[2], $yes_icon, $no_icon ); … … 174 189 ?> 175 190 </table> 191 -
wt-gift-cards-woocommerce/trunk/admin/modules/freevspro/views/goto-pro.php
r3030434 r3365744 6 6 <style> 7 7 /* hide default sidebar */ 8 .wt-gc-tab-container{ background:none; } 8 9 .wt-gc-tab-container, .wt-gc-tab-head{ width:100%; } 9 10 .wt-gc-tab-right-container{ display:none; } … … 16 17 .wt_gc_freevspro_table_subhd_tr td{ background:#f0f0f0; font-weight:600; font-size:14px; } 17 18 .wt_gc_freevspro_table_subhd_desc{ font-weight:400; font-size:13px; display:inline-block; margin-left:30px; } 19 .wt_gc_freevs_pro .wt_gc_upsell_text_align_center, .wt_gc_freevspro_table_body_tr .wt_gc_upsell_text_align_center{ text-align:center ; } 18 20 19 21 </style> -
wt-gift-cards-woocommerce/trunk/admin/modules/gift_card/gift_card.php
r3213631 r3365744 90 90 add_action( 'submitpost_box', array( $this, 'add_hidden_gc_product_edit_input' ) ); // add a hidden input 91 91 92 // Banner metabox on product edit page 93 add_action( 'add_meta_boxes', array( $this, 'add_banner_metabox' ) ); 94 92 95 // add custom product data meta box 93 96 add_action( 'add_meta_boxes', array( $this, 'add_custom_product_data_meta_box' ) ); … … 186 189 187 190 $product_id = $gift_card_products[0]; 188 $templates = isset( $_POST['wt_gc_visible_gift_template'] ) ? wc_clean( wp_unslash( $_POST['wt_gc_visible_gift_template'] ) ) : array(); // phpcs:disable WordPress.Security.NonceVerification.Missing 189 191 $templates = isset( $_POST['wt_gc_visible_gift_template'] ) ? (array) wc_clean( wp_unslash( $_POST['wt_gc_visible_gift_template'] ) ) : array(); // phpcs:disable WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 192 $templates = array_map( 'sanitize_text_field', $templates ); 193 190 194 update_post_meta( $product_id, '_wt_gc_templates', $templates ); 191 195 update_post_meta( $product_id, '_wt_gc_enable_template', ( empty( $templates ) ? 'no' : 'yes' ) ); // Disable template if list is empty … … 265 269 } 266 270 267 $visible_gift_templates = ( isset( $_POST['wt_gc_visible_gift_template'] ) ? wc_clean( wp_unslash( $_POST['wt_gc_visible_gift_template'] ) ) : '' ); // phpcs:disable WordPress.Security.NonceVerification.Missing 268 $visible_gift_templates = ( ! is_array( $visible_gift_templates ) ? array() : $visible_gift_templates ); 271 272 $visible_gift_templates = isset( $_POST['wt_gc_visible_gift_template'] ) ? (array) wp_unslash( $_POST['wt_gc_visible_gift_template'] ) : array(); // phpcs:disable WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 273 $visible_gift_templates = array_map( 'sanitize_text_field', $visible_gift_templates ); 274 269 275 270 276 $hidden_templates = array(); … … 567 573 #delete-action .submitdelete.deletion{ display:none; } 568 574 .wrap a.page-title-action, a.page-title-action{ display:none; } 575 576 /* Hide arrow and close/move controls for upsell banner metabox */ 577 #wt-gc-upsell-banner-metabox { background-color: #f0f0f1; border: none; box-shadow: none; } 578 #wt-gc-upsell-banner-metabox .handlediv, 579 #wt-gc-upsell-banner-metabox .handle-actions{ display:none !important; } 580 #wt-gc-upsell-banner-metabox .postbox-header, 581 #wt-gc-upsell-banner-metabox .hndle{ display:none !important; } 582 #wt-gc-upsell-banner-metabox .inside{ margin-top:0; padding-top:0; } 583 569 584 </style> 570 585 <?php … … 630 645 add_filter( 'wt_gc_include_admin_js_file', '__return_true', 1 ); // include admin JS file 631 646 632 $not_hide_meta_boxes = apply_filters( 'wt_gc_product_page_non_hidden_metaboxes', array( '#submitdiv', '#postimagediv', '#product_catdiv', '#tagsdiv-product_tag', '#wt-gc-custom-product-data-meta-box' ) );647 $not_hide_meta_boxes = apply_filters( 'wt_gc_product_page_non_hidden_metaboxes', array( '#submitdiv', '#postimagediv', '#product_catdiv', '#tagsdiv-product_tag', '#wt-gc-custom-product-data-meta-box', '#wt-gc-upsell-banner-metabox' ) ); 633 648 $gift_product_tab_url = admin_url( 'admin.php?page=' . WBTE_GC_FREE_PLUGIN_NAME . '&wt_gc_tab=' . $this->gift_card_product_tab_id ); 634 649 ?> … … 771 786 return ( 0 === $post_id && isset( $_REQUEST['wt_gc_product_edit'] ) ? absint( wp_unslash( $_REQUEST['wt_gc_product_edit'] ) ) : $post_id ); 772 787 } 788 789 /** 790 * Register the upsell banner metabox on product edit screen (gift card products only) 791 * 792 * @since 1.2.5 793 * 794 */ 795 public function add_banner_metabox() { 796 if ( ! $this->is_product_edit_page() ) { 797 return; 798 } 799 800 add_meta_box('wt-gc-upsell-banner-metabox',__( 'Gift Card Upsell Banner', 'wt-gift-cards-woocommerce' ),array( $this, 'render_gc_upsell_banner_metabox' ),'product','normal','default'); 801 } 802 803 804 /** 805 * Render the upsell banner metabox content 806 * 807 * @since 1.2.5 808 * 809 */ 810 public function render_gc_upsell_banner_metabox( ) { 811 /** 812 * @var mixed 813 * 814 * Display upsell banner 815 */ 816 $gc_pro_banner = Wbte_Gc_Upsell_Banner::get_instance(); 817 ?> 818 <div class="woocommerce"> 819 <div class="panel-wrap product_data"> 820 <?php $gc_pro_banner->pro_banner_content(); ?> 821 </div> 822 </div> 823 <?php 824 } 825 773 826 774 827 /** … … 929 982 foreach ( self::get_product_metas( $post_id ) as $meta_key => $meta_data ) { 930 983 if ( isset( $_POST[ $meta_key ] ) ) { 931 $meta_value = Wbte_Gc_Free_Security_Helper::sanitize_item( wc_clean( wp_unslash( $_POST[ $meta_key ] ) ), $meta_data['type'] );984 $meta_value = Wbte_Gc_Free_Security_Helper::sanitize_item( wc_clean( wp_unslash( $_POST[ $meta_key ] ) ), $meta_data['type'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 932 985 update_post_meta( $post_id, $meta_key, $meta_value ); 933 986 } … … 1131 1184 public function process_shop_coupon_meta( $post_id, $post ) { 1132 1185 if ( ! current_user_can( 'manage_woocommerce' ) ) { 1133 wp_die( __( 'You do not have sufficient permission to perform this operation', 'wt-gift-cards-woocommerce' ) );1186 wp_die( esc_html__( 'You do not have sufficient permission to perform this operation', 'wt-gift-cards-woocommerce' ) ); 1134 1187 } 1135 1188 -
wt-gift-cards-woocommerce/trunk/admin/modules/gift_card/views/--email-configuration-settings-tab.php
r3213323 r3365744 14 14 if(!$is_mpdf_active && !$is_mpdf_exists) 15 15 { 16 $enable_mpdf_msg = __('Requires mPDF library to add PDF support. %s Click here %s to install the %s mPDF add-on by WebToffee %s (free).', 'wt-gift-cards-woocommerce'); 16 /* translators: 1: Opening link tag, 2: Closing link tag, 3: Opening link tag, 4: Closing link tag */ 17 $enable_mpdf_msg = __('Requires mPDF library to add PDF support. %1$s Click here %2$s to install the %3$s mPDF add-on by WebToffee %4$s (free).', 'wt-gift-cards-woocommerce'); 17 18 $placeholder_arr[0] = '<a href="' . esc_url(wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $mpdf_slug), 'install-plugin_' . $mpdf_slug)) . '">'; 18 19 19 20 }elseif($is_mpdf_active && !$is_required_mpdf_version_installed) 20 21 { 21 $enable_mpdf_msg = __('Requires mPDF version %s or greater to add PDF support. %s Click here %s to update the %s mPDF add-on by WebToffee %s (free).', 'wt-gift-cards-woocommerce'); 22 /* translators: 1: mPDF version, 2: Opening link tag, 3: Closing link tag, 4: Opening link tag, 5: Closing link tag */ 23 $enable_mpdf_msg = __('Requires mPDF version %1$s or greater to add PDF support. %2$s Click here %3$s to update the %4$s mPDF add-on by WebToffee %5$s (free).', 'wt-gift-cards-woocommerce'); 22 24 $placeholder_arr[0] = '<a href="' . esc_url(wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=' . $mpdf_slug), 'upgrade-plugin_' . $mpdf_slug)) . '">'; 23 25 array_unshift($placeholder_arr , $mpdf_required_version); … … 25 27 }elseif(!$is_mpdf_active && $is_mpdf_exists) 26 28 { 27 $enable_mpdf_msg = __('Requires mPDF library to add PDF support. %s Click here %s to activate the %s mPDF add-on by WebToffee %s(free).', 'wt-gift-cards-woocommerce'); 29 /* translators: 1: Opening link tag, 2: Closing link tag, 3: Opening link tag, 4: Closing link tag */ 30 $enable_mpdf_msg = __('Requires mPDF library to add PDF support. %1$s Click here %2$s to activate the %3$s mPDF add-on by WebToffee %4$s(free).', 'wt-gift-cards-woocommerce'); 28 31 $placeholder_arr[0] = '<a href="' . esc_url(wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=' . urlencode($mpdf_path) . '&plugin_status=all&paged=1&s'), 'activate-plugin_' . $mpdf_path)) . '">'; 29 32 }else … … 34 37 }else 35 38 { 36 $enable_mpdf_msg = __('Requires mPDF library to add PDF support. Please install the %s mPDF add-on by WebToffee %s(free).', 'wt-gift-cards-woocommerce'); 39 /* translators: 1: Opening link tag, 2: Closing link tag */ 40 $enable_mpdf_msg = __('Requires mPDF library to add PDF support. Please install the %1$s mPDF add-on by WebToffee %2$s(free).', 'wt-gift-cards-woocommerce'); 37 41 $placeholder_arr = array('<a href="'.esc_url($mpdf_wp_url).'" target="_blank">', '</a>'); 38 42 } -
wt-gift-cards-woocommerce/trunk/admin/modules/gift_card/views/--template-settings-tab.php
r3030434 r3365744 20 20 </div> 21 21 </div> 22 <div class="wt-upsell-banner" style="margin-top: 142px;"> 23 <?php 24 /** 25 * @var mixed 26 * 27 * Display upsell banner 28 */ 29 $gc_pro_banner = Wbte_Gc_Upsell_Banner::get_instance(); 30 $gc_pro_banner->pro_banner_content(); 31 ?> 32 </div> -
wt-gift-cards-woocommerce/trunk/admin/modules/gift_card/views/gift-card-product.php
r3154517 r3365744 125 125 $actions = array( 126 126 /* translators: %d: Product ID. */ 127 'id' => array( 'title' => sprintf( __( 'ID: %d', 'w oocommerce' ), $product_id ) ),127 'id' => array( 'title' => sprintf( __( 'ID: %d', 'wt-gift-cards-woocommerce' ), $product_id ) ), 128 128 ); 129 129 … … 245 245 </table> 246 246 247 <div class="wt_gc_upsell_banner_product_table"> 248 <?php 249 /** 250 * @var mixed 251 * 252 * Display upsell banner 253 */ 254 $gc_pro_banner = Wbte_Gc_Upsell_Banner::get_instance(); 255 $gc_pro_banner->pro_banner_content(); 256 ?> 257 </div> 247 258 </div> -
wt-gift-cards-woocommerce/trunk/admin/views/-form-field-generator.php
r3030434 r3365744 119 119 120 120 foreach ( $checkbox_fields as $checkbox_vl => $checkbox_label ) { 121 $vl = is_array( $vl ) ? $vl : ( ! empty( $vl ) ? array( $vl ) : array() ); 121 122 ?> 122 <span class="wt_gc_checkbox_list_item"><input type="checkbox" id="<?php echo esc_attr( $field_id . '_' . $checkbox_vl ); ?>" name="<?php echo esc_attr( $field_name ); ?>[]" class="<?php echo esc_attr( $css_class ); ?>" value="<?php echo esc_attr( $checkbox_vl ); ?>" <?php echo wp_kses_post( in_array( $checkbox_vl, $vl ) ? ' checked="checked"' : '' ); ?> <?php echo wp_kses_post( $fld_attr ); ?> /> <label for="<?php echo esc_attr( $field_id . '_' . $checkbox_vl ); ?>"><?php echo esc_html( $checkbox_label ); ?></label> </span>123 <span class="wt_gc_checkbox_list_item"><input type="checkbox" id="<?php echo esc_attr( $field_id . '_' . $checkbox_vl ); ?>" name="<?php echo esc_attr( $field_name ); ?>[]" class="<?php echo esc_attr( $css_class ); ?>" value="<?php echo esc_attr( $checkbox_vl ); ?>" <?php echo wp_kses_post( in_array( $checkbox_vl, $vl, true ) ? ' checked="checked"' : '' ); ?> <?php echo wp_kses_post( $fld_attr ); ?> /> <label for="<?php echo esc_attr( $field_id . '_' . $checkbox_vl ); ?>"><?php echo esc_html( $checkbox_label ); ?></label> </span> 123 124 124 125 <?php -
wt-gift-cards-woocommerce/trunk/admin/views/settings-page.php
r3192268 r3365744 116 116 <div class="wt_gc_extras_content" style="border-bottom: none; border-radius: 5px 5px 0px 0px;"> 117 117 <img src="<?php echo esc_url(WBTE_GC_FREE_URL . 'admin/images/30day-money-back.svg')?>"> 118 <h3 style="color: #606060;"><?php _e('100% No Risk Money Back Guarantee', 'wt-woocommerce-related-products'); ?></h3>118 <h3 style="color: #606060;"><?php esc_html_e('100% No Risk Money Back Guarantee', 'wt-gift-cards-woocommerce'); ?></h3> 119 119 </div> 120 120 <div class="wt_gc_extras_content" style="border-radius: 0px 0px 5px 5px;"> 121 121 <img src="<?php echo esc_url(WBTE_GC_FREE_URL . 'admin/images/satisfaction-rating.svg')?>"> 122 <h3 style="color: #606060;"><?php _e('Excellent Support with 99% Satisfaction Rating', 'wt-woocommerce-related-products'); ?></h3>122 <h3 style="color: #606060;"><?php esc_html_e('Excellent Support with 99% Satisfaction Rating', 'wt-gift-cards-woocommerce'); ?></h3> 123 123 </div> 124 124 </div> -
wt-gift-cards-woocommerce/trunk/changelog.txt
r3348454 r3365744 1 1 == Changelog == 2 3 = 1.2.5 2025-09-22 = 4 *[Tweak] - Performance optimization and bug fixes. 2 5 3 6 = 1.2.4 2025-08-22 = -
wt-gift-cards-woocommerce/trunk/common/class-wbte-woocommerce-gift-cards-free-common.php
r3348454 r3365744 1080 1080 1081 1081 <form class="wbte_gc_check_balance_form"> 1082 <?php wp_nonce_field( 'wbte_gc_check_balance', 'wbte_gc_check_balance_nonce'); ?>1082 <?php wp_nonce_field(WBTE_GC_FREE_PLUGIN_NAME); ?> 1083 1083 <label for="wbte_gc_coupon_code"><?php echo esc_html($coupon_code_label); ?></label> 1084 1084 <input type="text" name="wbte_gc_coupon_code" class="wbte_gc_coupon_code" required> … … 1117 1117 $nonce = ( isset( $_REQUEST['_wpnonce'] ) ? sanitize_key( wp_unslash( $_REQUEST['_wpnonce'] ) ) : '' ); 1118 1118 $nonce = ( is_array( $nonce ) ? reset( $nonce ) : $nonce ); 1119 if ( ! $nonce ) { 1120 echo wp_send_json_error( $out ); 1119 if ( ! $nonce || ! wp_verify_nonce( $nonce, WBTE_GC_FREE_PLUGIN_NAME ) ) { 1120 $out = array( 1121 'balance' => '', 1122 'message' => esc_html__( 'Security check failed.', 'wt-gift-cards-woocommerce' ), 1123 ); 1124 wp_send_json_error( $out ); 1121 1125 exit(); 1122 1126 } … … 1159 1163 $balance = $coupon->get_amount(); 1160 1164 $currency = get_woocommerce_currency(); 1161 $formatted_balance = strip_tags(wc_price($balance, array('currency' => $currency)));1165 $formatted_balance = wp_strip_all_tags( wc_price( $balance, array( 'currency' => $currency ) )); 1162 1166 1163 1167 $success_message = sprintf( 1168 /* translators: 1: Gift card balance */ 1164 1169 esc_html__('Your gift card balance is %s', 'wt-gift-cards-woocommerce'), 1165 1170 '<span class="wt_gc_balance_amount">' . $formatted_balance . '</span>' -
wt-gift-cards-woocommerce/trunk/common/classes/class-wbte-gc-store-credit-apply-free.php
r3284848 r3365744 164 164 if ( isset( $item->object['wt_credit_amount'] ) || isset( $item->object['wt_credit_coupon_generated'] ) ) { 165 165 $valid = false; 166 throw new Exception( __( 'Sorry, you cannot purchase store credit with this coupon.', 'wt-gift-cards-woocommerce' ) );166 throw new Exception( esc_html__( 'Sorry, you cannot purchase store credit with this coupon.', 'wt-gift-cards-woocommerce' ) ); 167 167 break; 168 168 } -
wt-gift-cards-woocommerce/trunk/common/modules/gift_card/data/data.template.php
r3213323 r3365744 92 92 </div> 93 93 <div class="wt_gc_pdf_coupon_expiry"> 94 <?php echo ("" !== $expiry_date ? sprintf(__('Expiry date: %s', 'wt-gift-cards-woocommerce'), $expiry_date) : ''); ?> 94 <?php 95 /* translators: 1: Expiry date */ 96 echo ( "" !== $expiry_date ? sprintf( esc_html__( 'Expiry date: %s', 'wt-gift-cards-woocommerce' ),esc_html( $expiry_date )) : ''); 97 ?> 95 98 </div> 96 99 </td> … … 105 108 { ?> 106 109 <tr> 107 <td align="left" valign="bottom"><?php _e('From:', 'wt-gift-cards-woocommerce'); ?></td>110 <td align="left" valign="bottom"><?php esc_html_e('From:', 'wt-gift-cards-woocommerce'); ?></td> 108 111 <td><?php echo esc_html($from);?></td> 109 112 </tr> … … 115 118 ?> 116 119 <tr> 117 <td align="left" valign="bottom"><?php _e('To:', 'wt-gift-cards-woocommerce'); ?></td>120 <td align="left" valign="bottom"><?php esc_html_e('To:', 'wt-gift-cards-woocommerce'); ?></td> 118 121 <td><?php echo esc_html($reciever_name);?></td> 119 122 </tr> … … 125 128 ?> 126 129 <tr> 127 <td align="left" valign="bottom"><?php _e('Message:', 'wt-gift-cards-woocommerce'); ?></td>130 <td align="left" valign="bottom"><?php esc_html_e('Message:', 'wt-gift-cards-woocommerce'); ?></td> 128 131 <td><?php echo esc_html($coupon_message);?></td> 129 132 </tr> … … 137 140 <div class="wt_gift_coupon_custom_additional_content"> 138 141 <?php 139 $custom_addition_content = __('To redeem this gift card, you can enter the gift card code in the dedicated field during checkout.', 'wt-gift-cards-woocommerce'); 140 echo apply_filters('wt_gc_alter_gift_card_pdf_custom_addition_content', $custom_addition_content, $coupon_obj); 142 $custom_addition_content = __( 143 'To redeem this gift card, you can enter the gift card code in the dedicated field during checkout.', 144 'wt-gift-cards-woocommerce' 145 ); 146 147 echo esc_html(apply_filters( 'wt_gc_alter_gift_card_pdf_custom_addition_content', $custom_addition_content, $coupon_obj )); 148 141 149 ?> 142 150 </div> -
wt-gift-cards-woocommerce/trunk/common/modules/gift_card/gift_card.php
r3213631 r3365744 1006 1006 } 1007 1007 1008 while ( $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'shop_coupon' AND post_status ='publish' AND post_title = %s ", $random_coupon )) ) {1008 while ( wc_get_coupon_id_by_code( $random_coupon ) ) { 1009 1009 return self::generate_random_coupon_code(); 1010 1010 } … … 1232 1232 $upload_url = $upload_url.'/wt-gift-cards-woocommerce'; 1233 1233 1234 global $wp_filesystem; 1235 if ( ! $wp_filesystem ) { 1236 require_once ABSPATH . '/wp-admin/includes/file.php'; 1237 } 1238 WP_Filesystem(); 1239 1234 1240 if(!is_dir($upload_dir)) 1235 1241 { 1236 @mkdir($upload_dir, 0700); //create it if not exists 1242 if ( ! $wp_filesystem->mkdir( $upload_dir, FS_CHMOD_DIR ) && ! is_dir( $upload_dir ) ) { 1243 return false; // Failed to create directory. 1244 } 1237 1245 } 1238 1246 … … 1243 1251 foreach($files_to_create as $file => $file_content) 1244 1252 { 1245 if(!file_exists($upload_dir.'/'.$file)) 1246 { 1247 $fh = @fopen($upload_dir.'/'.$file, "w"); 1248 1249 if(is_resource($fh)) 1250 { 1251 fwrite($fh, $file_content); 1252 fclose($fh); 1253 } 1254 } 1253 $file_path = trailingslashit( $upload_dir ) . $file; 1254 1255 if ( ! $wp_filesystem->exists( $file_path ) ) { 1256 1257 $wp_filesystem->put_contents( $file_path, $file_content, FS_CHMOD_FILE ); 1258 } 1255 1259 } 1256 1260 }else -
wt-gift-cards-woocommerce/trunk/includes/class-wbte-black-friday-cyber-monday-twenty-twenty-four.php
r3192268 r3365744 65 65 <div class="wbte-bfcm-banner-body"> 66 66 <div class="wbte-bfcm-banner-body-img-section"> 67 <img src="<?php echo plugins_url( 'admin/images/black-friday-2024.svg', dirname(__FILE__) ); ?>" alt="Black Friday Cyber Monday 2024"> 67 <img src="<?php echo esc_url( plugins_url( 'admin/images/black-friday-2024.svg', dirname( __FILE__ ) ) ); ?>" 68 alt="<?php esc_attr_e( 'Black Friday Cyber Monday 2024', 'wt-gift-cards-woocommerce' ); ?>"> 68 69 </div> 69 70 <div class="wbte-bfcm-banner-body-info"> 70 71 <div class="never-miss-this-deal"> 71 <p><?php echo esc_html__( 'Never Miss This Deal', ' ' ); ?></p>72 <p><?php echo esc_html__( 'Never Miss This Deal', 'wt-gift-cards-woocommerce' ); ?></p> 72 73 </div> 73 74 <div class="info"> 74 75 <p><?php 75 echo sprintf( 76 __( 'Your Last Chance to Avail %1$s on WebToffee Plugins. Grab the deal before it`s gone!', '' ), 77 '<span>30% '.__("OFF","").'</span>' 78 ); 76 echo sprintf( 77 /* translators: %1$s: Discount text with span wrapper, e.g. <span>30% OFF</span>. */ 78 esc_html__( 'Your Last Chance to Avail %1$s on WebToffee Plugins. Grab the deal before it`s gone!', 'wt-gift-cards-woocommerce' ), 79 '<span>' . esc_html__( '30% OFF', 'wt-gift-cards-woocommerce' ) . '</span>' 80 ) 79 81 ?></p> 80 82 </div> 81 83 <div class="wbte-bfcm-banner-body-button"> 82 <a href=" <?php echo self::$promotion_link; ?>" class="bfcm_cta_button" target="_blank"><?php echo esc_html__( 'View plugins', '' ); ?> <span class="dashicons dashicons-arrow-right-alt"></span></a>84 <a href=" <?php echo esc_url( self::$promotion_link ); ?> " class="bfcm_cta_button" target="_blank"><?php echo esc_html__( 'View plugins', 'wt-gift-cards-woocommerce' ); ?> <span class="dashicons dashicons-arrow-right-alt"></span></a> 83 85 </div> 84 86 </div> … … 146 148 if ( isset( $_POST['wbte_bfcm_twenty_twenty_four_banner_action_type'] ) ) { 147 149 148 $action_type = absint( sanitize_text_field( $_POST['wbte_bfcm_twenty_twenty_four_banner_action_type'] ));149 // Current action is allowed?150 $action_type = absint( sanitize_text_field( wp_unslash( $_POST['wbte_bfcm_twenty_twenty_four_banner_action_type'] ) )); 151 // Current action is allowed? 150 152 if ( in_array( $action_type, array( 2, 3 ) ) ) { 151 153 update_option( self::$banner_state_option_name, $action_type ); -
wt-gift-cards-woocommerce/trunk/includes/class-wbte-uninstall-feedback.php
r3067373 r3365744 90 90 <?php foreach ($reasons as $reason) { ?> 91 91 <li data-type="<?php echo esc_attr($reason['type']); ?>" data-placeholder="<?php echo esc_attr($reason['placeholder']); ?>"> 92 <label><input type="radio" name="selected-reason" value="<?php e sc_html_e( $reason['id'] ); ?>"> <?php esc_html_e( $reason['text'] ); ?></label>92 <label><input type="radio" name="selected-reason" value="<?php echo esc_attr( $reason['id'] ); ?>"> <?php echo esc_html( $reason['text'] ); ?></label> 93 93 </li> 94 94 <?php } ?> … … 101 101 <div class="wbtegiftcards-modal-footer"> 102 102 <a href="#" class="dont-bother-me"><?php esc_html_e('I rather wouldn\'t say', 'wt-gift-cards-woocommerce'); ?></a> 103 <a href="https://wordpress.org/support/plugin/wt-gift-cards-woocommerce/#new-topic-0" target="_blank" class="button-primary wbtegiftcards-model-submit"><span class="dashicons dashicons-external" style="margin-top:3px;"></span> <?php _e('Contact Support', 'wt-gift-cards-woocommerce'); ?></a>103 <a href="https://wordpress.org/support/plugin/wt-gift-cards-woocommerce/#new-topic-0" target="_blank" class="button-primary wbtegiftcards-model-submit"><span class="dashicons dashicons-external" style="margin-top:3px;"></span> <?php esc_html_e('Contact Support', 'wt-gift-cards-woocommerce'); ?></a> 104 104 <button class="button-primary wbtegiftcards-model-submit"><?php esc_html_e('Submit & Deactivate', 'wt-gift-cards-woocommerce'); ?></button> 105 105 <button class="button-secondary wbtegiftcards-model-cancel"><?php esc_html_e('Cancel', 'wt-gift-cards-woocommerce'); ?></button> … … 174 174 <script type="text/javascript"> 175 175 (function ($) { 176 var wbtegiftcardsNonce = '<?php echo esc_js( wp_create_nonce( 'wbtegiftcards_uninstall_nonce' ) ); ?>'; 176 177 $(function () { 177 178 var modal = $('#wbtegiftcards-wbtegiftcards-modal'); … … 202 203 203 204 if ('reviewhtml' === inputType) { 204 var reasonInputHtml = '<div class="reviewlink reason-block"><a href="#" target="_blank" class="review-and-deactivate"><?php _e('Deactivate and leave a review', 'wt-gift-cards-woocommerce'); ?> <span class="wt-wbtegiftcards-rating-link"> ★★★★★ </span></a></div>';205 var reasonInputHtml = '<div class="reviewlink reason-block"><a href="#" target="_blank" class="review-and-deactivate"><?php esc_html_e('Deactivate and leave a review', 'wt-gift-cards-woocommerce'); ?> <span class="wt-wbtegiftcards-rating-link"> ★★★★★ </span></a></div>'; 205 206 } else if ('supportlink' === inputType) { 206 var reasonInputHtml = '<div class="support_link reason-block"> <a href="https://www.webtoffee.com/contact" target="_blank" class="reach-via-support"><?php _e('Let our support team help you', 'wt-gift-cards-woocommerce'); ?> </a>' + '</div>';207 var reasonInputHtml = '<div class="support_link reason-block"> <a href="https://www.webtoffee.com/contact" target="_blank" class="reach-via-support"><?php esc_html_e('Let our support team help you', 'wt-gift-cards-woocommerce'); ?> </a>' + '</div>'; 207 208 } else { 208 209 var reasonInputHtml = '<div class="reason-input reason-block">' + (('text' === inputType) ? '<input type="text" class="input-text" size="40" />' : '<textarea rows="5" cols="45"></textarea>') + '</div>'; … … 233 234 action: 'wbtegiftcards_submit_uninstall_reason', 234 235 reason_id: $reason_id, 235 reason_info: $reason_info 236 reason_info: $reason_info, 237 nonce: wbtegiftcardsNonce 236 238 }, 237 239 beforeSend: function () { … … 258 260 } 259 261 262 // Verify nonce 263 if ( ! isset( $_POST['nonce'] ) ) { 264 wp_send_json_error( array( 'message' => 'Bad request' ), 400 ); 265 } 266 $nonce = sanitize_text_field( wp_unslash( $_POST['nonce'] ) ); 267 if ( ! wp_verify_nonce( $nonce, 'wbtegiftcards_uninstall_nonce' ) ) { 268 wp_send_json_error( array( 'message' => 'Invalid nonce' ), 403 ); 269 } 270 260 271 $data = array( 261 'reason_id' => sanitize_text_field( $_POST['reason_id']),272 'reason_id' => sanitize_text_field(wp_unslash($_POST['reason_id'])), 262 273 'plugin' => "wbtegiftcards", 263 274 'auth' => 'wbtegiftcards_uninstall_1234#', … … 265 276 'url' => '', 266 277 'user_email' => '', 267 'reason_info' => isset($_REQUEST['reason_info']) ? trim(stripslashes($_REQUEST['reason_info'])) : '',268 'software' => $_SERVER['SERVER_SOFTWARE'],278 'reason_info' => isset($_REQUEST['reason_info']) ? sanitize_textarea_field( wp_unslash( $_REQUEST['reason_info'] ) ) : '', 279 'software' => isset($_SERVER['SERVER_SOFTWARE']) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ) : '', 269 280 'php_version' => phpversion(), 270 281 'mysql_version' => $wpdb->db_version(), -
wt-gift-cards-woocommerce/trunk/includes/class-wbte-woocommerce-gift-cards-free.php
r3348454 r3365744 79 79 $this->version = WBTE_GC_FREE_VERSION; 80 80 } else { 81 $this->version = '1.2. 4';81 $this->version = '1.2.5'; 82 82 } 83 83 $this->plugin_name = WBTE_GC_FREE_PLUGIN_NAME; -
wt-gift-cards-woocommerce/trunk/public/modules/gift_card/classes/class-wbte-gc-gift-card-free-purchase-process-cart.php
r3251245 r3365744 335 335 $credit_value = floatval( $legacy_values['wt_credit_amount'] ); 336 336 $settings = self::get_product_metas( $product_id ); // gift card product settings 337 338 $email_id = isset( $legacy_values['wt_store_credit_template']['wt_credit_coupon_send_to'] ) ? sanitize_email( $legacy_values['wt_store_credit_template']['wt_credit_coupon_send_to'] ) : sanitize_email( wp_unslash( $_REQUEST['billing_email'] ) ); 337 $billing_email = isset($_REQUEST['billing_email']) ? sanitize_email( wp_unslash( $_REQUEST['billing_email'] ) ) : ''; 338 339 $email_id = isset( $legacy_values['wt_store_credit_template']['wt_credit_coupon_send_to'] ) ? sanitize_email( $legacy_values['wt_store_credit_template']['wt_credit_coupon_send_to'] ) : $billing_email; 339 340 $message = isset( $legacy_values['wt_store_credit_template']['wt_credit_coupon_send_to_message'] ) ? sanitize_textarea_field( $legacy_values['wt_store_credit_template']['wt_credit_coupon_send_to_message'] ) : ''; 340 341 … … 418 419 $last_status = end($status_list); 419 420 $order_status_for_gift_card_email = $formatted_status ? $formatted_status . ' or ' . $last_status : $last_status; 420 $order->add_order_note(sprintf(__('Gift card <strong>%s</strong> generated. Awaiting %s order status for activation.','wt-gift-cards-woocommerce'), $coupon_code,$order_status_for_gift_card_email)); 421 /* translators: 1: Gift card code, 2: Order status */ 422 $order->add_order_note(sprintf(__('Gift card <strong>%1$s</strong> generated. Awaiting %2$s order status for activation.','wt-gift-cards-woocommerce'), $coupon_code,$order_status_for_gift_card_email)); 421 423 }else{ 422 $order->add_order_note(__('Gift card generated. Not activated.' ), 'wt-gift-cards-woocommerce');424 $order->add_order_note(__('Gift card generated. Not activated.', 'wt-gift-cards-woocommerce')); 423 425 } 424 426 } -
wt-gift-cards-woocommerce/trunk/public/modules/gift_card/classes/class-wbte-gc-gift-card-free-purchase-setup-product-page.php
r3348454 r3365744 732 732 // Show a warning message for admins 733 733 if ( current_user_can( 'manage_options' ) ) { 734 _e( 'Please update your template', 'wt-gift-cards-woocommerce' );734 esc_html_e( 'Please update your template', 'wt-gift-cards-woocommerce' ); 735 735 } 736 736 }, 9999 ); -
wt-gift-cards-woocommerce/trunk/public/modules/gift_card/gift_card.php
r3154517 r3365744 34 34 include_once $this->module_path . 'classes/class-wbte-gc-gift-card-free-purchase.php'; 35 35 Wbte_Gc_Gift_Card_Free_Purchase::get_instance(); 36 37 /**38 * Store credit coupon section in my account39 */40 add_action( 'wt_gc_myaccount_store_credit_page_content', array( $this, 'myaccount_store_credit_page_content' ), 10 );41 36 } 42 37 … … 63 58 $this->module_path = plugin_dir_path( __FILE__ ); 64 59 $this->module_url = plugin_dir_url( __FILE__ ); 65 }66 67 /**68 * Show store credit coupons in my account page69 * This method works only when Webtoffee Smart coupon plugin is activated70 * By default this method will only show the coupons created via Smart coupon plugin.71 * Use filter `wt_gc_exclude_coupons_created_via_gift_cards_plugin` to show all coupons.72 *73 * @since 1.0.074 */75 public function myaccount_store_credit_page_content() {76 include_once ABSPATH . 'wp-admin/includes/plugin.php';77 78 if ( Wbte_Woocommerce_Gift_Cards_Free::is_smart_coupon_active() ) {79 if ( ! class_exists( 'Wt_Smart_Coupon_Public' )80 || ! method_exists( 'Wt_Smart_Coupon_Public', 'get_coupon_meta_data' )81 || ! method_exists( 'Wt_Smart_Coupon_Public', 'get_coupon_html' )82 ) {83 return;84 }85 86 $user = wp_get_current_user();87 $email = $user->user_email;88 89 $args = array(90 'post_type' => 'shop_coupon',91 );92 93 $meta_query = array(94 array(95 'key' => 'customer_email',96 'value' => $email,97 'compare' => 'LIKE',98 ),99 array(100 'key' => 'discount_type',101 'value' => Wbte_Woocommerce_Gift_Cards_Free_Common::$store_credit_coupon_type_name,102 'compare' => 'LIKE',103 ),104 array(105 'key' => '_wt_smart_coupon_credit_activated',106 'value' => true,107 'compare' => 'EXISTS',108 ),109 array(110 'key' => 'coupon_amount',111 'value' => 0,112 'compare' => '>',113 ),114 );115 116 /* exclude store credits coupons created via Gift card plugin */117 if ( apply_filters( 'wt_gc_exclude_coupons_created_via_gift_cards_plugin', true ) ) {118 $meta_query[] = array(119 'key' => '_wt_gc_auto_generated_store_credit_coupon',120 'value' => 'completely', // a dummy value to fix WP bug #23268 [https://core.trac.wordpress.org/ticket/23268]121 'compare' => 'NOT EXISTS',122 );123 124 $meta_query[] = array(125 'key' => '_wt_gc_store_credit_coupon',126 'value' => 'completely', // a dummy value to fix WP bug #23268 [https://core.trac.wordpress.org/ticket/23268]127 'compare' => 'NOT EXISTS',128 );129 }130 131 $args['meta_query'] = $meta_query;132 133 $the_query = new WP_Query( $args );134 135 if ( $the_query->have_posts() ) {136 include 'views/-myaccount-store-credit-coupons.php';137 }138 }139 60 } 140 61 -
wt-gift-cards-woocommerce/trunk/wt-gift-cards-woocommerce.php
r3348454 r3365744 9 9 * Plugin URI: https://wordpress.org/plugins/wt-gift-cards-woocommerce/ 10 10 * Description: Create and manage beautiful gift cards for your WooCommerce store. 11 * Version: 1.2. 411 * Version: 1.2.5 12 12 * Author: WebToffee 13 13 * Author URI: https://www.webtoffee.com/ … … 35 35 * Start at version 1.0.0 and use SemVer - https://semver.org 36 36 */ 37 define( 'WBTE_GC_FREE_VERSION', '1.2. 4' );37 define( 'WBTE_GC_FREE_VERSION', '1.2.5' ); 38 38 39 39 define( 'WBTE_GC_FREE_FILE_NAME', __FILE__ ); … … 76 76 require_once ABSPATH . 'wp-admin/includes/plugin.php'; 77 77 deactivate_plugins( WBTE_GC_FREE_BASE_NAME ); 78 wp_die( __( 'Oops! Woocommerce not activated, It should required for `Gift cards for woocommerce`.', 'wt-gift-cards-woocommerce' ), '', array( 'back_link' => 1 ) );78 wp_die( esc_html__( 'Oops! Woocommerce not activated, It should required for `Gift cards for woocommerce`.', 'wt-gift-cards-woocommerce' ), '', array( 'back_link' => 1 ) ); 79 79 } 80 80
Note: See TracChangeset
for help on using the changeset viewer.