=== Gift Pack for WooCommerce ===
Contributors: itpathsolutions, mayur8991, shailu25, wpeople, jaiminp, drashti16
Tags: woocommerce, gift pack, gift wrapper, gift wrap, gift
Donate link: https://www.itpathsolutions.com
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 2.1.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add beautiful gift wrapping options to WooCommerce products with custom designs, pricing, and personal messages.

== Description ==

**Gift Pack for WooCommerce** lets customers add gift wrapping to individual products directly from the product page. Customers can choose their preferred gift pack design, write a personal greeting message, and the store owner can set a global gift wrap price or a custom price per product.

Whether you run a small boutique or a large store, Gift Pack for WooCommerce is the easiest way to offer a premium gifting experience to your shoppers.

= Key Features =

* Allow customers to add gift wrapping from the product page
* Set a global gift wrap price for all products
* Set a custom gift wrap price per individual product
* Enable or disable gift wrapping for specific product categories
* Let customers choose from multiple gift pack designs
* Personal greeting message field (Gift Pack Note)
* Separate "To" and "From" greeting fields with optional required validation
* Enable or disable Gift Pack Note, To, and From fields independently
* Upload unlimited custom gift pack / wrapper images
* Set a character limit for gift pack notes
* Gift pack details included in customer order emails
* Lightbox / popup display for gift pack image selection
* Customisable labels and placeholder texts from the settings page
* Background colour and title colour customisation
* Popup mode for gift pack image selection
* Works with both Simple and Variable products
* Fully compatible with WPML
* Easy to use with a clean, user-friendly admin interface

== Installation ==

1. Upload the `gift-pack-for-woocommerce` folder to the `/wp-content/plugins/` directory, or install it directly through the WordPress Plugins screen.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Make sure WooCommerce is installed and active.
4. Go to **Gift Pack for WooCommerce** in your WordPress admin menu to configure settings.

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =
Yes. WooCommerce must be installed and activated for this plugin to work.

= Can I use a custom gift wrap image? =
Yes. You can upload your own gift pack images from the Visualization Settings tab in the plugin settings.

= Can I set a global gift wrap price for all products? =
Yes. Enable the Global Price option in General Settings and enter the price you want to apply across all products.

= Can I set a different gift wrap price for individual products? =
Yes. When editing a product in WooCommerce, you will find a Gift Wrapper Cost field where you can set a custom price for that product.

= Can I change the default labels and placeholder texts? =
Yes. All labels and placeholder texts — including the Gift Wrap label, greeting fields, and note field — can be customised from the plugin settings page.

= Can I disable the gift wrap note or greeting fields? =
Yes. The Note, To, and From fields can each be independently enabled or disabled from the Note Settings tab.

= Can I make the greeting fields required? =
Yes. Each field (Note, To, From) has its own required toggle in the Note Settings tab.

= Is it compatible with WPML? =
Yes. The plugin is fully compatible with WPML for multilingual WooCommerce stores.

= Is it compatible with all WordPress themes? =
Yes. The plugin is designed to work with any standard WordPress theme.

= Does it work with variable products? =
Yes. Gift wrapping works with both Simple and Variable product types.

== Screenshots ==

1. Product Page – Gift Wrap Options (Frontend)
2. Cart Page – Gift Wrap Summary (Frontend)
3. Checkout Page – Gift Wrap Selection Display (Frontend)
4. Admin Panel – General Settings (Backend)
5. Admin Panel – Gift Notes Configuration (Backend)
6. Admin Panel – Display & Visual Settings (Backend)

== Support ==

Gift Pack for WooCommerce is developed and supported by <a target="_blank" href="https://profiles.wordpress.org/itpathsolutions/">IT Path Solutions</a>.

If you have a question or need help, please use the <a href="https://wordpress.org/support/plugin/gift-pack-for-woocommerce/">WordPress support forum</a> for this plugin. We monitor it regularly and aim to respond as quickly as possible.

= Ways you can support this plugin =

* **Rate the plugin:** If you find the plugin useful, please leave a review on the <a href="https://wordpress.org/support/plugin/gift-pack-for-woocommerce/reviews/">WordPress.org plugin page</a>.
* **Report bugs:** If you find a bug, please report it on the support forum so we can fix it promptly.
* **Suggest features:** We welcome feature suggestions. <a target="_blank" href="https://www.itpathsolutions.com/contact-us/">Contact us</a> with your ideas.
* **Submit translations:** Help us reach more users by submitting translations on <a target="_blank" href="https://translate.wordpress.org/projects/wp-plugins/gift-pack-for-woocommerce/">WordPress Translate</a>.

== Changelog ==

= 2.1.4 =
*Release Date: 29th May 2026*

* Fix – Corrected undefined variable `$giftpack_image_alt` causing PHP notices and missing alt attributes on gallery images.
* Fix – Added missing `ABSPATH` guard to the admin class file.
* Fix – Added nonce verification to the AJAX gift-wrap handler and sent nonce from all three JS AJAX call sites.
* Fix – Replaced invalid `esc_html_e('checked="checked"')` with the proper WordPress `checked()` helper on all 9 admin checkboxes.

= 2.1.3 =
*Release Date: 29th May 2026*

* Fix – Resolved PHP 8.2 deprecation notices for dynamic property creation on `$current_language` and `$gpfw_options`.
* Fix – Replaced inline `<style>` output with `wp_add_inline_style()` to follow WordPress enqueue standards.
* Fix – Added consistent nonce verification across all admin settings save paths (WPML and non-WPML).
* Fix – Replaced `json_encode()` with `wp_json_encode()` for proper WordPress output escaping.
* Fix – Replaced `esc_html()` with `wp_kses_post()` for WooCommerce price HTML output.
* Fix – Corrected arbitrary POST value being used as an `update_option()` key in the admin display template.
* Fix – Added `isset()` guards on all `$_POST` accesses in the non-WPML settings save path.
* Fix – Removed an unintended non-plugin file (`public/partials/Untitled`) from the plugin package.
* Improvement – Prefixed global function `run_gift_pack_for_woocommerce` to comply with WordPress naming standards.
* Improvement – Added `phpcs:ignore` annotations for third-party WPML hook invocations across all files.

= 2.1.3 =
*Release Date: 12 june 2026*

* Fix – All warnings and errors resolved.

= 2.1.2 =
*Release Date: 21st May 2026*

* Fix – All warnings and errors resolved.

= 2.1.1 =
*Release Date: 10th December 2025*

* New – Made Gift Wrap design compatible with Gutenberg Cart and Checkout blocks.
* New – Added dynamic labels with the selected Gift Pack image on Cart, Checkout, and Order Email.
* Improvement – Enhanced Admin Dashboard UI for a cleaner and more user-friendly experience.

= 2.1.0 =
*Release Date: 4th December 2025*

* Improvement – Compatibility with WordPress 6.9.
* Fix – Gift wrap price was not being added correctly to the cart total when a simple product was added via AJAX.
* Fix – Other minor fixes and improvements.

= 2.0.2 =
*Release Date: 22nd April 2025*

* Improvement – Compatibility with WordPress 6.8.
* Improvement – Removed the default character limit validation for the Gift Pack Note.

= 2.0.1 =
*Release Date: 25th February 2025*

* New – Added "To" and "From" greeting fields for customers.
* New – Added options to enable or disable the "To" and "From" fields individually.
* Improvement – Better compatibility with default WordPress themes.
* Improvement – UI updates.

= 2.0.0 =
* Fix – Compatible with Loco Translate.

= 1.1.9 =
* Fix – Styling fixes for mobile view.

= 1.1.8 =
* New – Added option to set a character limit for gift wrap messages.

= 1.1.7 =
* Fix – Addressed an issue where decimal values caused incorrect pricing calculations.

= 1.1.6 =
* Improvement – Compatible with Xstore theme.

= 1.1.5 =
* Improvement – Compatibility with WordPress 6.5.

= 1.1.4 =
* New – Lightbox option for Gift Pack images.
* Fix – Other minor fixes and updates.

= 1.1.3 =
* Fix – WPML fixes for Global Price.

= 1.1.2 =
* Fix – Global price issue for some users.

= 1.1.1 =
* Improvement – Full WPML compatibility.

= 1.1.0 =
* Improvement – Compatibility with WordPress 6.3.

= 1.0.9 =
* Fix – Price field updated to support decimal values on the settings page.

= 1.0.8 =
* Improvement – Compatibility updated for WordPress 6.2.

= 1.0.7 =
* Fix – CSS and JS issues for Quick View.

= 1.0.6 =
* Fix – Gift pack option saving issue fixed for some users.
* Improvement – Code optimisation and update.

= 1.0.5 =
* Fix – Variable product price update.
* New – Enable or disable gift wrapping for specific product categories.
* Improvement – JS optimisation.

= 1.0.4 =
* Fix – Sale price issue for Simple products.
* Improvement – JS optimisation.
* Improvement – Variable products now display the total price on the product page.
* Improvement – UI updates and currency options.

= 1.0.3 =
* New – Added Enable/Disable gift pack images option.

= 1.0.2 =
* New – Added Enable/Disable gift pack note option.

= 1.0.1 =
* Improvement – Added Settings link and validation for the Gift Pack Note field.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 2.1.4 =
Recommended update for all users. Fixes a PHP notice from an undefined variable, adds ABSPATH guard, secures the AJAX handler with nonce verification, and corrects checkbox rendering in the admin panel.
