# Changelog
1.10.7 - 2026-08-11
### Fixed
- Ticket validation and API failures are now shown as admin toasts instead of WordPress `admin-post.php` error pages
- New-ticket submissions now use AJAX, preserving entered text, credentials, and uploaded-image previews when a request fails; if the ticket was created before access storage failed, retrying updates only the access data and does not create a duplicate ticket
- Ticket JavaScript now uses a file-aware cache version so updated validation and submission behavior is loaded immediately after deployment
1.10.6 - 2026-08-11
### Fixed
- Product images in AVIF or another image format unsupported by Basalam are now converted to JPEG before the upload request, preventing the `422` unsupported-MIME error
- Temporary downloaded and converted product-image files are removed after both successful and failed uploads; when the server cannot decode the source format, the plugin now returns an actionable error instead of sending an invalid MIME type to Basalam
- A copied product no longer inherits *any* Woosalam data from the product it was copied from — not the Basalam connection, and not the per-product settings (video, custom price change, gold/mobile fields, product type and value, wholesale, discount flag). Every `sync_basalam_*` / `_sync_basalam_*` meta on the duplicate and its variations is stripped before WooCommerce saves the duplicate (`woocommerce_duplicate_product_exclude_meta`), cleaned again after duplication, and also cleaned for copies made by third-party duplicate plugins (`dp_duplicate_post`, `dp_duplicate_page`, `duplicate_post_post_copy`). Individual keys can be kept via the `sync_basalam_duplicate_purge_meta_keys` filter
- Disconnecting a product now removes the connection meta of every vendor id (previously only the currently configured vendor's keys were removed, so a stale, hard to find key could stay in the database) and clears `sync_basalam_variation_id` from all variations, not only from products currently typed as variable
- No product data, status change, or discount is sent to Basalam while two or more WooCommerce products share one Basalam product id. The operation is stopped with a clear message instead of overwriting the wrong Basalam product (this is what made old prices and old stock reappear on Basalam)
- Products with an empty Basalam product id no longer produce a malformed update request
### Added
- A one-time repair on update that finds WooCommerce products sharing a Basalam product id, keeps the connection on the oldest (original) product, disconnects the copies, and reports the result in an admin notice and the plugin log
1.10.5 - 2026-08-05
### Changed / Improved
- Limited bulk product update API requests to a maximum of five per minute without reducing the execution rate of other background jobs
1.10.4 - 2026-08-04
### Fixed
- Preserved complete URLs in new ticket messages, ticket replies, and optional access-information fields, including percent-encoded URL segments that WordPress text sanitization previously removed
- Updated ticket media uploads to send `type=ticket_item` and `collection=IMAGE` as multipart form fields to the `/media` endpoint, and fixed the upload service to return the API response
1.10.3 - 2026-07-22
### Changed / Improved
- "Price increase" became "price change" everywhere (code, markup, CSS classes): negative values are supported, so e.g. `-10` lowers the final Basalam price by 10% (percentages are capped at 35% increase and 35% decrease; values outside the -100..100 range are fixed Toman amounts)
- The global setting key was renamed from `increase_price_value` to `price_change_value`, and the per-product meta from `_sync_basalam_increase_price_value` to `_sync_basalam_price_change_value`. Old values are not migrated — re-enter the price change in the settings
- The category-commission mode is now stored as `commission` instead of `-1`, so it no longer collides with a real negative percentage
### Added
- A "custom price change" field in the Basalam product settings tab and in the products list bulk edit, so a single product or a selection of products can override the global value (or switch to category commission)
1.10.2 - 2026-07-19
### Changed / Improved
- Migrated product photo and video uploads from the legacy direct upload endpoint to Uploadio's presigned media flow
- Added SHA-256 metadata, direct staging upload, completion handling, and status polling so product payloads receive the final Basalam media ID and URL
- Ensured temporary remote media files are removed after both successful and failed uploads
- Streamed remote media downloads and multipart uploads with size-aware limits and timeouts to support large product videos without buffering the entire file in PHP memory
1.10.1 - 2026-07-13
### Fixed
- When Basalam rejects a product create/update with `422` because the description contains forbidden content (social-network names, page/channel mentions, etc.), the plugin now extracts the flagged phrases — highlighted inside `...` in the response `snippet` — strips them from the description, and automatically retries (up to 3 times). Previously the sanitizer looked for a non-existent `value` field, so nothing was removed and the retry never helped
1.10.0 - 2026-07-11
### Added
- Merged the "Woosalam Plus" add-on into the core plugin as a built-in "Financial Management" section: view store balance, active settlement requests, settlement history, and submit settlement requests to wallet or bank account
- Added the `customer.identity.read` scope to the Basalam OAuth connection request (required to fetch the user's bank account list in the settlement flow)
### Note
- Users who connected to Basalam before this release must reconnect ("Connect to Basalam") once so the new scope is granted before the bank-account settlement feature works
1.9.2 - 2026-07-08
### Security
- Fixed a CSRF vulnerability in the Basalam OAuth callback (`basalam-save-token`) that could let a forged request overwrite the stored connection credentials; the callback now requires a single-use, time-limited authorization that the admin actively started, and the "connect to Basalam" links go through a nonce-protected request
- Hardened output escaping across admin pages, templates and exception messages (esc_html/esc_attr)
- Switched internal redirects to wp_safe_redirect and documented direct custom-table queries
### Changed / Improved
- Tested up to WordPress 7.0
1.9.1 - 2026-06-30
### Fixed
- show check-orders button and vertically center its content on mobile/tablet
1.9.0 - 2026-06-21
### Added
- add gold product type with purity and weight attributes
- add preparation days management for product categories
### Fixed
- decrease min pkg weight
1.8.8 - 2026-05-18
### Fixed
- fix City/state mapping with persian shiping woo
- increase count of photo limit
1.8.7 - 2026-05-16
### Added
- Product video upload support (VideoService, VideoField, VideoSourceResolver)
- Circuit breaker alert notifications
- replace toast with alert()
- Limit on increase precent(max 35%)
- Migration 1.8.7
### Fixed
- Improved file upload, lock manager, and API response handling
1.8.5,1.8.6 - 2026-05-10
### Fixed
- deduplictaion orders
- fix stuck-processing
1.8.4 - 2026-05-03
### Fixed
- Circuit Breaker mechanism
1.8.3 - 2026-05-03
### Added
- Added bulk edit support for wholesale settings, product type, and custom price increase
- Added per-product custom price increase support
- Added an information API endpoint to improve AI agent support in `admin.hamsalam.ir`
### Changed / Improved
- Added automatic order creation in status change events when the order does not already exist
- Clear saved token on `401 Unauthorized` responses from `*.basalam.com` requests
- Show an error when required Woosalam domains are blocked
- Prevent task execution when required Woosalam domains are blocked
### Fixed
- Fixed user-reported issues
1.8.2 - 2026-04-04
### Added
- Photo and weight validator for products
- Filter hook for contact-us section visibility
- Prefix and suffix to product title for category detection
### Fixed
- Fetch current vendor info without cache
1.8.1 - 2026-03-07
### Added
- basalam Chat widget
1.8.0 - 2026-03-05
### Changed / Improved
- Introduced an internal DI container (`ContainerInterface`, `Container`, `ServiceProviderInterface`) and centralized service provider wiring.
- Added `syncBasalamContainer()` and migrated `syncBasalamPlugin()` / `syncBasalamSettings()` to container-backed access.
- Migrated core hotspots from direct instantiation to container resolution:
- `ApiServiceManager`
- `ProductOperations`
- `JobManager`
- class-level settings access
- Refactored job subsystem wiring for constructor-based dependencies (`AbstractJobType`, job types, `JobRegistry`, `JobsRunner`, `DiscountTaskScheduler`).
- Updated action and registrar edges to resolve handlers/listeners via container.
- Removed legacy singleton-style accessors in core services and standardized on container-first resolution.
- add unInstall
- Added dashboard data retrieval in tickets
- Added `vendor_id` suffix to product `postmeta`
- Added selectable stock priority for variable products
- Added a Circuit Breaker mechanism
### Added
- Container-backed settings access via `SettingsContainer`.
1.7.9 - 2026-02-25
### Changed / Improved
- Added plugin version to all admin CSS/JS enqueue calls for proper cache busting
1.7.8 - 2026-02-21
### Added
- retry system for jobs
- Added announcements section
- Added file upload capability in tickets
- Added discount reduction percentage setting
- Added ability to fetch and sync Basalam orders up to the last 30 days
- Added customer name prefix/suffix settings for Basalam orders
- Added onboarding section to Woosalam
### Changed / Improved
- Remove Product Operation type
- change fetch unsync orders structure
- Switched product list fetching from paginate-based API to cursor-based API
- Skip webhook creation when the site domain is localhost
- Made Woosalam addonable/extensible
- Categorized plugin settings
### Fix
- Fixed ticket links issues
- Fixed duplicated products issue
- Fixed null value being sent to Basalam on duplicated product disconnect/update flow
1.7.7 - 2026-02-07
### Changed / Improved
- Enhanced Performance and Security in Ticket Logics
- Don't send null value in update product at basalam
1.7.6 - 2026-02-01
### Fix
- Remove Unused Migration
1.7.5 - 2026-01-26
### Added
- Added Ticketing feature
1.7.4 - 2026-01-6
### Fixed
- Fix Bugs
1.7.3 - 2025-12-27
### Fixed
- Fix Bugs
1.7.2 - 2025-12-24
### Fixed
- Compatibity beetwin HPOS and Legay System
- Fix webhook handling and authorization in WebhookService
1.7.1 - 2025-12-23
### Fixed
- Add Missed Files
1.7.0 - 2025-12-20
### Added
- Added PSR-4 autoloading structure for better code organization
### Changed / Improved
- Enhanced plugin code structure and performance optimizations
- Added detailed order information display on orders page
- Improved category ID retrieval with reverse order output
### Fixed
- Fixed commission calculation issues
- Fixed order fetching problems
- Fixed Persian WooCommerce Shipping plugin compatibility issues
1.6.1 - 2025-12-6
### Changed / Improved
- Handle cursor for get order lists
### Fixed
- don't send request to core.basalam.com
- add reduce/increase stock action for woosalam order statuses
1.6.0 - 2025-12-1
### Changed / Improved
- Added automatic shipping method detection and auto-saving of the shipping name and cost in WooCommerce orders
1.5.9 - 2025-11-27
### Fixed
- Add missing default settings to database and return default for single missing setting
- Handle customer names without spaces
- Correct Persian WooCommerce path
### Refactored
- Simplify check if Persian WooCommerce Shipping plugin is active
1.5.8 - 2025-11-18
### Changed / Improved
- Improved batch product update functionality
- Enhanced complete product update process
1.5.7 - 2025-11-17
### Added
- Added compatibility with Tappin
- Added support for currency units irht and irhr
### Changed / Improved
- Implemented automatic price rounding for Basalam compatibility
- Changed product enqueue structure from offset-based to ID-based
- Made WooCommerce order creation process atomic
### Fixed
- Fixed job manager functionality and proper task execution
1.5.5 - 2025-11-15
### Changed / Improved
- Optimized fetch creatable products query using direct SQL for better performance
- Improved API service manager to properly decode JSON responses
- Enhanced update job detection logic to avoid false positive job status checks
### Fixed
- Fixed API response handling by properly decoding JSON data
- Removed commented-out legacy code from plugin initialization
- Fixed quick update job status detection in admin dashboard
- Resolved duplicate job checking that was causing incorrect "in progress" states
1.5.4 - 2025-11-6
### Added
- Migration system for version 1.5.4
### Changed / Improved
- Enhanced onboarding styles and UI improvements
- Improved category fetching process with better error handling
- Enhanced file uploader service functionality
- Optimized product update process
### Fixed
- Fixed error handling in product update service
- Removed deprecated photo ban status service
- Fixed category mapping page display and functionality
- Improved product meta box data handling
- Fixed issues in get product data service
1.5.3 - 2025-10-25
### Fixed
- Fixed some bugs
1.5.0 - 2025-10-04
### Added
- Key-value storage system for plugin settings
- Option to select sale price display style (strikethrough or sale price only)
- Automatic log file cleanup (weekly)
- Manual and automatic task execution rate control (tasks per minute)
### Changed / Improved
- Removed WP Cron dependency for better performance
- Enhanced task scheduling system
### Fixed
- Removed invalid variations from product data
- Fixed category attributes synchronization issue
- Fixed sale price validation before applying
- Resolved migration 1.4.0 issues
1.4.0 - 2025-09-12
### Added
- Manual product category mapping
- Strikethrough pricing for products
- Add products from Digikala (Pro version)
- Create a free store (Pro version)
### Changed / Improved
- Plugin structure optimization
### Fixed
- Fixed reported issues
1.3.0 - 2025-07-23
### Added
- Option to choose operation execution method (AJAX and Queue)
- Manual order fetching
- Cancel orders
- Fetch order changes from Basalam and apply them to WooCommerce orders
### Fixed
- Fixed reported issues
1.2.0 - 2025-06-27
### Added
- Bulk product addition
- Bulk product update
- Auto order confirmation
### Fixed
- Fixed issues reported in previous version
1.1.0 - 2025-02-13
### Added
- Automatic fetching and creation of Basalam orders in WooCommerce
- Manage orders from WooCommerce (confirm order, request delay, ship order)
- Advanced settings for easier use
### Fixed
- Fixed some issues from previous versions
1.0.0 - 2024-12-31
### Added
- Add and update products individually and in bulk
- Automatic product synchronization
- Settings and logs page