*** Grind Mobile App Changelog ***

2025-01-20 - version 3.1.2
* Feature - Added new endpoint /wp-json/grind-mobile-app/v1/related-upsell/{productID} to retrieve upsell and related product IDs for a given product
* Fix - Fixed checkout-link redirect not respecting language parameter (lang=en/bg) - now correctly redirects to translated checkout page instead of default language checkout page, ensuring proper multi-language support for WPML and Polylang plugins (woodenspoon)

2025-11-20 - version 3.1.1
* Fix: REST /login endpoint returning 500 error by replacing raw WP_Error object with JSON-formatted error response (fix proteinhouse).
* Fix: Removed Mrejanet Econt and Speedy integrations that were causing null pointer errors when checkout_fields property was not initialized.

2025-10-23 - version 3.1.0
* Fix - Added missing `get_session_data()` and `set_session_data()` methods to BeyondCartSessionHandler to resolve WooCommerce compatibility issues with newer versions
* Fix - Categories API now respects Polylang `lang` parameter and cache keys are language-aware to prevent cross-language results
* Change - Removed endpoint: token
* Change - Removed endpoint: login-with-hash
* Change - Removed endpoint: login-otp
* Change - Removed endpoint: reviews
* Change - Removed endpoint: update-location
* Change - Removed endpoint: customers/(?P<id>[\d]+)
* Change - Removed endpoint: change-password
* Change - Removed endpoint: check-phone-number
* Change - Removed endpoint: check-info
* Change - Removed endpoint: coupons/(?P<id>\d+)
* Change - Removed endpoint: wc/v3/products-distance
* Change - Removed endpoint: analytic
* Change - Removed endpoint: cart-total
* Change - Removed native checkout All endpoints in Checkout.php; using Webview Checkout only
* Change - Removed endpoint: /customers/(?P<id>\d+) (proxy to WooCommerce)
* Change - Removed endpoint: wc/v3/min-max-prices
* Change - Removed endpoint: rating-count
* Change - Removed two Product attributes and Produc variations legacy endpoints in favor of WooCommerce Store API
* Security - Registration role fix

2025-09-22 - version 3.0.2
* Fix - Prevented PHP warning in Category API when Flycart integration settings are missing; added safe guards around settings access
* SECURITY - Authorization order enforced: authentication is validated before `user_permissions_check`, preventing access for unauthenticated users

2025-09-17 - version 3.0.1
* Fix - Fixed WooCommerce 10.0+ checkout-link compatibility by preventing legacy mobile cart override when using Store API checkout flow
* Fix - Legacy mobile cart loading now only triggers for old webview handover (requires cart_key parameter) and skips Store API/checkout-link requests
* Change - Removed JWT Security Settings UI and secret regeneration option from admin settings

2025-09-16 - version 3.0.0
* SECURITY FIX - Fixed critical JWT security vulnerability (CVE-2025-8570)
* SECURITY FIX - Replaced hardcoded JWT secret key with secure random generation
* SECURITY FIX - Enhanced JWT token validation with proper expiration and user verification
* SECURITY FIX - Added JWT security management in admin settings
* SECURITY FIX - Fixed privilege escalation vulnerability in determine_current_user filter
* Feature - Added JWT secret regeneration functionality in admin
* Feature - Added JWT security status monitoring in admin settings

2025-07-21 - version 2.1.0
* Fix - Fixed WooCommerce 10.0+ compatibility for mobile app webview checkout by implementing checkout-link endpoint integration with proper mobile parameter handling and coupon support, resolving session management conflicts and ensuring seamless redirect flow while preserving all existing mobile app functionality.

2025-07-21 - version 2.0.5
* Fix - If merchant is using Store API requests in their Checkout don't override session.

2025-07-10 - version 2.0.4
* Fix - Added defensive checks using did_action('wp_loaded') to prevent when cart is accessed before wp_loaded hook, resolves conflicts with third-party plugin
* Fix - Removed WC()->session->set('chosen_shipping_methods') from cart loading to prevent conflicts with shipping plugins in webview checkout

2024-07-29 - version 2.0.3
* Feature - Ability to delete expired carts

2024-07-29 - version 2.0.2
* Fix - Woocommerce Taxes included in Cart totals
* Fix - Fixed Undefined array key "mobile" in addAppOnlyCouponValidation() causing warning sometimes on website checkout

2024-07-19 - version 2.0.1
* Fix - Fixed not able to transfer cart to the webview

2024-07-18 - version 2.0.0
* Fix - Fixed problem on Validate Cart that returns error on mobile app only coupons.
* Refactor - Proxy endpoints

2024-06-18 - version 1.8
* Feature - Timestamp added to the webviews checkout link to prevent caching when user is logged in
* Feature - Keep the users logged when migrate app to newest version
* Fix - Fatal Error fixed on WC Coupon class in validate cart endpoint
* Fix - Added images on items in add discount endpoint
* Refactor - Cart Items Data response refactored and it returns the same fields on get cart, add/remove coupon

2024-04-03 - version 1.7.7
* Feature - Endpoint to check cart items if are still instock before proceeding to webview checkout endpoint

2024-03-28 - version 1.7.6
* Fix - Security Fix

2024-03-07 - version 1.7.5
* Fix - Smartbanner fixes

2024-03-07 - version 1.7.4
* Fix - Smartbanner fixes and do not show on Checkout

2024-03-06 - version 1.7.3
* Fix - Fixed Warnings on Webview Checkout

2024-02-29 - version 1.7.2
* Feature - New Mobile App Banner, native banner for Safari (Smartbanner.js removed)
* Fix - Remove Visual Composer Tags from Post description

2024-01-31 - version 1.7.1
* Fix - Points are now working with our own custom class, instead of YITH Points & Rewards
* Fix - Warning fixed in Admin/Coupons
* Feature - Sales Channel are now shown in Admin Orders screen, when the store is using HPOS feature
* Fix - Fixed Mobile App flag (post_meta) not stored in DB when the store is using HPOS feature

2024-01-22 - version 1.7.0
* Fix - Category App Image - small fix when there is a thumb set as well as app image
* Fix - In New Woo get_applied_coupons returned sometimes as a object, this is now fixed to be always array
* Fix - Yith Points and Rewards bug with applying points
* Fix - Added coupons in the array in some requests in Cart
* Fix - Web Tracking - cookies fix

2024-01-02 - version 1.6.3
* Fix - Fixed warnings in Woo v8.4.0 when calling the following endpoint: wp-json/wc/v3/shipping/zones/2/methods

2023-12-14 - version 1.6.2
* Fix - Fixed bug with variation products from Woocommerce v8.4.0 it adds slug to attributes response, but it breaks our app (it's a temporary fix)

2023-12-08 - version 1.6.1
* Fix - Fixed wrong namespace (JWT) and now Apple Login is working fine.

2023-12-08 - version 1.6
* Fix - Beyondcart Session Handler fix to be able to create orders in Woocommerce v8.3.1
* Fix - Smartbanner higher z-index

2023-12-01 - version 1.5.5
* Fix - Removed deprecated parameter $allowed_algs ([DEPRECATED] List of supported verification algorithms) in JWT::decode() it breaks the requests when passing JWT token

2023-11-21 - version 1.5.4
* Feature - Added filter hooks to be able to modify API response in Cart object (get_cart, rm/add coupon) - beyondcart_app_cart_data, beyondcart_app_cart_data_apply_coupon, beyondcart_app_cart_data_remove_coupon
* Feature - Added filter hooks to be able to modify API response in Category object - beyondcart_modify_category_content
* Feature - Added WPML/Polylang support in Cart actions
* Feature - Added WPML/Polylang support in Webview Checkouts

2023-09-29 - version 1.5.3
* Fix - Added filter hooks to be able to modify API response in Cart object (get_cart, rm/add coupon)
* Fix - Added filter hook to be able to modify API response in Variation object (beyondcart_app_variations_data)
* Fix - Replaced WC() with global $woocommerce in Add to Cart method
* Fix - Removed commented lines add/delete filter woocommerce_package_rates from Cart class

2023-09-01 - version 1.5.2
* Fix - If Funnel Kits is used for checkout, When order is created via webview app add flag Mobile in admin (use another order meta field)

2023-09-01 - version 1.5.1
* Fix - If Funnel Kits is used for checkout, When order is created via webview app add flag Mobile in admin (use another order meta field)

2023-08-29 - version 1.5
* Fix - Bug with expired JWT token, causing deleting the old products in cart when adding new

2023-08-02 - version 1.4.8
* Feature - Loyalty Program (WooRewards Integration) endpoints
* Fix - Fixed js error when webtracking is not active

2023-07-27 - version 1.4.7
* Feature - When order is created via webview app add flag Mobile in admin.
* Fix - Fixed problem on native app with webview checkout where sometimes miss to add in orders Mobile app: yes

2023-07-12 - version 1.4.6
* Feature - Webtracking implemented.
* Fix - Product not on sale stays with 0% discount label when WooDiscountRules integration is active.

2023-06-16 - version 1.4.5
* Fix - Native cart to Webview Checkout works now
* Fix - cart-key in request replaced with cart_key (in webview checkout mode)
* Fix - Logout method returned HTML instead of json success true/false

2023-06-13 - version 1.4.4
* Bug - If CoCart Plugin is activated do not use our BeyondCartSession (will work only in webview)

2023-05-25 - version 1.4.3
* Fix - Clear cart endpoint is now successfully empty the cart.
* Fix - After refactored version Featured Image in Post API didn't work
* Fix - Added version file for BeyondCart backend to be able to check plugin's version

2023-05-05 - version 1.4.2
* Fix - Bug with OnSale Category when Flycart Woo Discount Prices Plugin Integration is active.
* Fix - Fix to get attributes in product inner by menu_order
* Fix - Improved the code that gets attributes data in product inner (saving a lot of unnecessary queries against the DB)
* Fix - WP Plugin Feedback - Data Must be Sanitized, Escaped, and Validated / Variables and options must be escaped when echo'd
* Refactor - Removed duplicated code in Nav class (SmartBanner)

2023-05-03 - version 1.4.1
* Fix - WP Plugin Feedback - Data Must be Sanitized, Escaped, and Validated
* Fix - WP Plugin Feedback - Variables and options must be escaped when echo'd

2023-04-20 - version 1.4
* Refactor - Major plugin refactoring. API endpoints and methods divided into different classes based on their purpose.
* Feature - Modify the default Woo API /wp-json/wc/v3/products to be used for filtering and everywhere in the app. Makes our custom endpoint getProductsWithFilter absolute.
* Refactor - Removed unused method woocommerce_rest_product_object_query that are modifying rest endpoint 
* Bug - Fixed bug relating using wheel coupon, when you reuse the coupon twice or more.
* Fix - WP Plugin New Feedback - Incorrect Stable Tag
* Fix - WP Plugin New Feedback - Data Must be Sanitized, Escaped, and Validated
* Fix - WP Plugin New Feedback - Variables and options must be escaped when echo'd
* Fix - WP Plugin New Feedback - Generic function/class/define/namespace names

2023-04-19 - version 1.3.5
* Fix - Coupon apply bug (remove_product_cat_coupon_validation), caused due namespace issue 

2023-04-11 - version 1.3.4
* Fix - WP Plugin Feedback - Using CURL Instead of HTTP API
* Fix - WP Plugin Feedback - Undocumented use of a 3rd Party or external service
* Fix - WP Plugin Feedback - Using file_get_contents on remote files
* Fix - WP Plugin Feedback - Data Must be Sanitized, Escaped, and Validated
* Fix - WP Plugin Feedback - Variables and options must be escaped when echo'd
* Fix - WP Plugin Feedback - Unsafe SQL calls
* Feature - Make the plugin compatible with new Woocommerce feature HPOS - High-Performance order storage (COT)

2023-04-11 - version 1.3.3
* Feature - SmartBanner added as an option in the plugin to be able to show a popup with AppStore/GooglePlay App links
* Feature - Transform Visual Composer Tags From The Product Description Into HTML

2023-04-02 - version 1.3.2
* Feature - Ability to Filter By Custom Taxonomy like (product_collection, product_tag, etc)

2023-03-23 - version 1.3.1
* Feature - Added readme.txt, nav replaced to BeyondCart
* Fix - Refactored few method names

2023-03-17 - version 1.3.0
* Feature - Add Coupon delete used by for user

2023-02-10 - version 1.2.4
* Feature - Flycart Woo Discount Prices Plugin Integration - apply dynamic prices from the plugin to the products
* Feature - Flycart Woo Discount Prices Plugin Integration - use custom On Sale category and get all discount products from the plugin
* Fix - Deprecated function wc_get_min_max_price_meta_query() replaced with a code for filtering by price range.

2022-11-15 - version 1.2.3
* Fix - Cart Major Bug - When user is with Expired bearer Token replace the current cart product with another one.
* Fix - Critical error for calling non-static method as static. 
* Fix - Remove filtering by sales channel in orders
* Fix - Search do not show products with visibility hidden

2022-11-11 - version 1.2.2
* Fix - getProductsWithFilter - menu_order - Add order option

2022-09-30 - version 1.2.1
* Fix - Hide products with visiblity hidden from the categories in app

2022-09-30 - version 1.2.0
* Fix - BeyondCart Session Handler rework.
* Feature - Save guest cart to registered user

2022-09-30 - version 1.1.9
* Fix - Fixed filter by multiple attributes in filter products API endpoint
* Fix - Return stock status outofstock in filter products API endpoint
* Fix - Static function fix
* Fix - Warnings Division by Zero fixed in $sale_percentage_min/$sale_percentage_max

2022-09-16 - version 1.1.8
* Feature - Hourly cron to cache used terms by category in plugin's new table 'wp_grind_mobile_app_terms'
* Feature - API endpoint to get the cached terms

2022-09-09 - version 1.1.6
* Feature - Integration Mrejanet Speedy

2022-09-08 - version 1.1.6
* Feature - Integration Mrejanet Econt
* Feature - Custom category images

2022-08-10 - version 1.1.5
* Feature - Get products by filters, sortby
* Feature - Delete user endpoint

2022-04-12 - version 1.1.4
* Feature - Show/hide shipping methods in site and app

2022-04-12 - version 1.1.3
* Change - Change woocommerceRestFilters to post_modified_gmt

2022-04-11 - version 1.1.2
* Fix - Get allowed countries instead of all countries

2022-04-07 - version 1.1.1
* add Feature - Woocommerce Rest Filters for get parameter modified_after

2022-03-29 - version 1.0.7
* Fix - Style enqueue
* Fix - Hide Coupon code in webview checkout
* Fix - App Only coupons in webview checkouts
* Feature - Return available payment methods for selected shipping method
* Feature - Get checkout fields

2022-03-16 - version 1.0.6
* Fix - Add variation price min and max to calculate sale percentages and price ranges

2022-03-16 - version 1.0.5
* Fix - Add Cart variation attributes label and term name
* Feature - Add app only coupons
* Fix - Sales channel in admin
* Fix - Add customer to order on checkout 

2022-03-15 - version 1.0.4
* Fix - Add missing endpoints in Product.php.
* Fix - Renamed endpoint /variable to /variations in Product.php

2022-03-07 - version 1.0.3
* Feature - Add save mobile app configs from Admin Backoffice

2022-02-24 - version 1.0.2
* Fix - On change quantity in app, return whole cart and not just the total
* Feature - Add third party App/Api keys from the plugins settings (firebase, fb, onesignal)
* Feature - Admin Backoffice - new field in Orders listing screen if order is from App or Website
* Feature - Web Checkout - hidden field to check if the order is from App or Website

2022-02-23 - version 1.0.1
* Feature - Cart Requests, Order Review, Checkout, Shipping
* Feature - Stripe Payment Intent
