3.2.8 (2025-04-08)
- Fix: Batch data now correctly respects the allowed timeframe settings
- Fix: Stock management can now be enabled successfully via the REST API
- Fix: Resolved an issue that prevented inserting a batch number through the REST API
- Translations: Updated German, Italian and French translations
- Translations: Updated translation template (POT)
- Tested: Confirmed compatibility with WooCommerce 9.8
3.2.7 (2025-03-10)
- New: Add PHP 7.4 minimum version requirement
- New: REST endpoint to update a batch
- Tweak: Display compatible plugin messages when not activated and settings when activated
- Tweak: Update parameters in `wpo_wcpbn_order_item_batch_number` and `wpo_wcpbn_allocated_batch_numbers` hooks
- Fix: Remove implicit `null` parameters in functions
- Fix: Incorrect numbers in order note when a batch is reduced
- Update: Updater version bumped to v2.1.6
- Update: Updated translation template (POT)
- Tested: Confirmed compatibility with WooCommerce 9.7
3.2.6 (2024-12-18)
- Tweak: Updater version bumped to v2.1.5.
- Tweak: Stock synchronized on force deletion.
- Tweak: "Export" tab renamed to "Tools".
- Tweak: REST API documentation updated.
- Fix: Batch data deleted on order item deletion.
- Fix: Plugin translations loaded too early.
- Fix: Orders with batches not appearing in the "Consumed" table.
- Translations: updated translation template (POT).
- Tested: Confirmed compatibility with WooCommerce 9.5.
3.2.5 (2024-10-14)
- Fix: Resolved issue with batch expiry date not being saved on the product edit page.
- Tested: Compatible with WooCommerce 9.4.
3.2.4 (2024-09-17)
- New: new API endpoint to get all the batches
- New: setting to register batch reduce/restore to order notes
- Tweak: validate date fields when updating their values in the database
- Fix: duplicate stocks actions on `db_row_save()` function
- Fix: Purchase Order prices not being calculated
- Fix: global sync exceed ActionScheduler character limit
- Translations: updated translation template (POT)
- Marked tested up to WooCommerce 9.3
3.2.3 (2024-08-20)
- New: compatibility with ATUM Stock Central
- New: adds PO fields in Overview add batch form
- New: advanced setting to update batch stock levels on REST product stock changes
- New: inventory setting to disable product stock sync
- New: adds a function to validate product types: `wpo_wcpbn_is_valid_product_type()`
- New: filter `wpo_wcpbn_frontend_product_variations_selector`
- Tweak: on empty expiry date, re-order batches by "Available Stock"
- Fix: wrong expiry date value when updating a product
- Fix: the batch restore bug on refunds
- Fix: `on_save_order_items` method type hint
- Fix: archive batch routine issues
- Fix: double quantity reduction on order creation in backend
- Translations: updated translation template (POT)
- Marked tested up to WooCommerce 9.2
3.2.2 (2024-06-26)
- New: adds force delete to Overview list bulk actions
- New: force batch deletion advanced setting
- Tweak: rename/move batch tools to be batch edit
- Tweak: updates `date_created` and `date_expiry` columns structure
- Tweak: add supplier field back to forms and create PO when is filled
- Fix: settings requiring `data-show_for_option_name` not saving in the first try
- Fix: style issue in Overview search
- Fix: fatal error on WCSD compatibility
- Fix: `wpo_wcpbn_email_headers` deprecated warnings
- Translations: updated translation template (POT)
- Marked tested up to WooCommerce 9.0 & WordPress 6.6
3.2.1 (2024-05-13)
- New: Stock Dependencies for WooCommerce compatibility (beta)
- New: allow editing "Location" from the Overview table
- Tweak: rename options ATUM tab to Compatibility
- Tweak: improvements in the updater loading
- Fix: reverts dropping the legacy supplier database column on 3.2.0+ upgrade
- Translations: updated translation template (POT)
- Marked tested up to WooCommerce 8.9
3.2.0 (2024-04-23)
- New: ATUM Inventory Logs compatibility
- New: ATUM Purchase Orders compatibility
- New: filter hook `wpo_wcpbn_export_csv_get_orders_args`
- New: adds "Enable product stock management" setting
- New: arguments added to the `wpo_wcpbn_get_item_batch_formatted_meta()` function
- New: adds a `$context` arg to `wpo_wcpbn_date_format()` function
- New: adds a global product stock sync feature to the Advanced tab
- Tweak: drops `product_id`, `variation_id` and `supplier` columns from batch DB table
- Fix: attempt to read property `batch_number` on `null`
- Fix: restores the supplier column to the product inventory batch table
- Translations: updated translation template (POT)
- Marked tested up to WooCommerce 8.8
3.1.5 (2024-03-25)
- New: hook `wpo_wcpbn_after_schedule_batch_expiration_date_offset_email`
- New: batch reduce/restore support for OpenPOS orders
- New: function to get order item batch meta data: `wpo_wcpbn_get_item_batch_formatted_meta`
- New: maybe restore stock on Woo API refund request
- New: hook `wpo_wcpbn_after_archive_batch`
- New: adds a `fetch_all` parameter to settings `get_option()` method
- New: adds the purchase order to REST endpoints
- Tweak: removes legacy batch supplier
- Fix: issues with product stock sync on batch tools and REST API
- Fix: passing `null` to parameter `#1` on `substr`
- Fix: issue with batch stock not getting restored when changing order status from Cancelled to Processing
- Fix: return type declaration of `get_option()` method
- Fix: duplicated expired batch email
- Fix: bug of undefined array key `wc-refunded`
- Fix: deprecated warning from `parse_str` on `get_active_tab()` method
- Fix: PHP warnings
- Fix: allows SKU search for more product types
- Fix: wrong stock level reduction for batches using a payment gateway (comgate)
- Translations: updated translation template (POT)
- Marked tested up to WooCommerce 8.7 & WordPress 6.5
3.1.4 (2024-01-29)
- Fix: validate the input of `is_child_class_allowed()` method
3.1.3 (2024-01-29)
- New: filter `wpo_wcpbn_rest_auto_set_quantity_available` that prevents `quantity_available` from being auto set
- Tweak: improves the database implementation and security
- Fix: Undefined variable `$batch_numbers_of_item`
- Translations: updated translation template (POT)
3.1.2 (2024-01-21)
- Tweak: replaces the product offset tooltip with explicit text
- Fix: settings not saving
3.1.1 (2024-01-12)
- Fix: bug in retrieving settings
- Fix: translation typo for `de_DE` language pack
- Marked tested up to WooCommerce 8.5
3.1.0 (2024-01-08)
- New: Batch Purchase Orders (PO)
- New: updated "Options" tab
- New: filter hook `wpo_wcpbn_export_csv_customer_data`
- New: filter hook `wpo_wcpbn_consumed_excluded_statuses` in orders displayed in the Batch Tools "Consumed" section
- New: allow multiple email addresses for notifications
- New: includes the `date_expiry` in the order item meta
- Tweak: allows partial SKU search in Overview list
- Tweak: syncs `quantity_available` with `quantity` when inserting new batch from API
- Fix: issue of "daily email until expiration" not sending emails for all batches
- Fix: removes products that are not in the original list in Batch Tools remove search
- Fix: bug with RedSys Gateway, not allowing backend orders batch consumption
- Fix: bug with RedSys implementation causing issues with stocks
- Translations: updated translation template (POT)
- Marked tested up to WooCommerce 8.4
3.0.4 (2023-11-10)
- New: add bulk update action on Overview table for available qty and expiry date
- Tweak: modifies the batch quantity columns in the database to allow bigger `float` numbers
- Translations: added German (Germany, Casual tone), German (Germany, Formal tone), Italian (Italy), Norwegian (Bokmaal) and Catalan
- Translations: updated Portuguese (Brazil) and French (France)
- Translations: updated Spanish locales
- Translations: some strings were improved
- Translations: updated translation template (POT)
- Marked tested up to WooCommerce 8.3 & WordPress 6.4
3.0.3 (2023-10-16)
- New: adds a REST settings tab with instructions
- New: moves batch tools to new settings tab, with search by ID
- New: improved REST API requests
- New: hook after saving order item meta `wpo_wcpbn_after_save_order_items_single_batch_meta`
- New: includes supplier in the order item batch meta
- New: filter to allow changing the WPML object ID language from default: `wpml_default_language`
- New: sync WC product stock on REST API update requests
- New: filter to show/hide batch deletion admin notices: `wpo_wcpbn_show_batch_deletion_notices`
- Fix: product variation frontend request error when setting not enabled
- Fix: bug when exporting with WPAI enabled
- Translations: updated translation template (POT)
- Marked tested up to WooCommerce 8.2
3.0.2 (2023-08-17)
- Updated bundled updater to 2.1.4
- Marked tested up to WooCommerce 8.0 & WordPress 6.3
3.0.1 (2023-08-07)
- Tweak: includes batch shared products in email notifications
- Fix: export batches tool selection toggle
- Fix: deprecated notices when passing `null` to `json_decode()`
- Fix: allow duplication of the last batch when is archived
- Fix: broken edit product link in Overview list when using WPML
- Marked tested up to WooCommerce 7.9
3.0.0 (2023-06-01)
- New: product metadata search option & new hooks to enable custom search options in Overview List Table
- New: export order item batches by order number
- New: WooCommerce HPOS compatibility (beta)
- New: adds a label settings for batch date
- New: export batch numbers by order id
- New: added product name to overview search and other search improvements
- Tweak: adds option to delete duplicate shared products to beta features
- Tweak: improves email notification headers using `woocommerce_email_headers`
- Fix: export issues using WPAI addon
- Fix: database product migration memory issues using AS
- Fix: bug on error notices being displayed when deleting batches
- Fix: bug in offset email notifications
- Marked tested up to WooCommerce 7.7
2.0.0 (2023-04-04)
- New: batch tools page
- New: share batch numbers across products
- Tweak: improves WC stock sync
- Tweak: improved overview search
- Fix: bug on product batches mirroring setting, which can't be disabled after being enabled
- Marked tested up to WooCommerce 7.6 and WordPress 6.2
1.8.1 (2022-12-12)
- Fix: issue on consuming all product batches when managing stock is disabled
1.8.0 (2022-12-05)
- New: adds stock location to batches
- Tweak: updated Dutch translations
- Tweak: updated French translations
- Tweak: updated Spanish translations
- Tweak: updated Portuguese translations
- Fix: prevents batches with negative stocks to be allocated for consumption
- Fix: REST API + WPML by getting the correct parent product ID
1.7.1 (2022-11-14)
- Fix: database table name issues
- Fix: issue on database query array to string conversion
- Fix: bug for multiple archive batches actions
- Fix: jQuery tooltip error
1.7.0 (2022-11-07)
- New: adds support for custom columns in the Overview list table
- New: WooMultistore partial compatibility
- New: filters `wpo_wcpbn_order_item_product_object` and `wpo_wcpbn_order_item_product_object`
- Tweak: adds attribute to limit the output results on `wcpbn_product_next_batch_expiry_date` shortcode
- Tweak: updated translation template and files
- Fix: bug with strip_tags call on array
- Fix: overview list pagination
- Fix: overview list links counting
- Fix: uses WC CRUD functions instead of WP post meta ones
- Fix: prevents the schedule of midnight AS actions is options are disabled
- Fix: checks if product manages stock before syncing stocks
- Fix: checks if product has batches before applying stock changes
- Fix: only update WooCommerce product stock on setting
- Fix: issue using different product ID when using multilingual plugin
- Marked tested up to WooCommerce 7.1 and WordPress 6.1
1.6.1 (2022-08-30)
- New: mirror product stock with batches stock on product inventory setting
- New: filter for batch formatted data date label 'wpo_wcpbn_product_batches_data_formatted_date_label'
- Fix: check empty for keys in DB query date args
- Fix: bug on overview status links results not matching the selected filter
- Tweak: force stock amount data types on calculation for database query
- Marked tested up to WooCommerce 6.8
1.6.0 (2022-07-18)
- New: SKU column in the overview list table
- New: setting to log batch deletions
- New: improved database queries with new abstract class
- Fix: batch data display on variation selection on frontend
- Fix: width of number inputs in settings
- Fix: bug on checking missing keys when archiving batch
- Fix: bug on emails for missing array key
- Tweak: improved strings for translation
- Marked tested up to WooCommerce 6.7
1.5.0 (2022-05-17)
- New: allow sending expiration notifications without archiving batch
- New: settings to display number/expiry date in backend/frontend
- New: support for formatted item meta on refunds
- New: automatically archive batches at an offset relative to the expiration date
- New: custom date format setting
- Fix: issue on loading translations for menu items
- Fix: limitation on product batch quantity inputs to allow saving negative values
- Fix: product batch table column widths on smaller screens
- Fix: allow spaces in batch numbers & fix batch number tooltip on inventory table
- Fix: plugin deactivating during auto/bulk updates
- Fix: CSV export compatibility with Excel (UTF-8)
- Fix: bug on formatted item meta
- Translations: updated ES, PT, FR and NL translation files
- Marked tested up to WooCommerce 6.5
1.4.1
- New: setting to display the expiration date in the products list column
- Tweak: adds new batch ID argument to the wpo_wcpbn_add_new_batch() function
- Fix: bug on displaying label when formatted item meta settings disabled
- Fix: date comparisons using now timestamps
- Marked tested up to WooCommerce 6.4
1.4.0
- New: export batch data to CSV
1.3.2
- Fix: legacy settings migration
1.3.1
- New: improved settings with new UI
- New: WC subscription products support
1.3.0
- New: batch support for subscription products from WC Subscriptions plugin by WooCommerce
- New: setting to display batches in a WC orders list page column
- New: rename date format filter from 'wpo_wcpbn_format_date' to 'wpo_wcpbn_date_format'
- New: shortcode label filter 'wpo_wcpbn_next_batch_expiry_date_shortcode_label'
- New: support for stock amounts using float numbers
- Marked tested up to WooCommerce 6.3
- Marked tested up to WP6.0
1.2.9
- New: WC tested up to 6.1
- New: filter for email recipients 'wpo_wcpbn_email_recipients'. Replaces the old filter 'wpo_wcpbn_email_notifications_address'
- New: filter for email headers 'wpo_wcpbn_email_headers'
- New: updated Portuguese, French and Spanish translations
- Tweak: adds product variation check to batch expire date shortcode
- Fix: alter database datetime columns default value to '1000-01-01 00:00:00'
- Fix: bug handling data for emails
- Fix: email notification issues when 'every day' setting is enabled and using global offset
1.2.8
- New: setting to delete batches on product/variation deletion
- New: reposition of the product offset with a new tooltip
- New: improved batch inputs for autocomplete/duplicate search
- New: updates the batch status to active automatically if we are adding more quantity
- Fix: the product names in email notification showing as "missing"
- Fix: no type casting/checking and no try/catch during expired email notification process
- Fix: multiple expiring email notifications
- Fix: batch input title text used for tooltip
1.2.7
- New: adds the product name to email notifications
- Fix: bug on email notifications saving wrong product ID
1.2.6
- New: allow to delete batches from the overview list
- New: improvements in database queries
- New: setting to specify the email address for notifications
- New: improved settings labels and descriptions
- New: updated Spanish, Dutch, French and Portuguese language packs
- Fix: issue on zero quantities returning empty
- Fix: product email notification sent every day
1.2.5
- New: per product email notifications
- New: support for product bundles from WooCommerce Product Bundles (by SomewhereWarm / woocommerce.com)
- New: allow bulk batch delete from overview list table
- New: portuguese locales updated
- Fix: database table quantity data type
- Fix: products stock sync with WooCommerce
- Fix: single and double quotes escaping in supplier name
1.2.4
- New: Spanish, Portuguese and French locales
- New: Improvements to the internationalization of the plugin (i18n)
- New: Adds the batch orders link to the overview list table
- New: Email notifications for stock and expiration
- New: Function 'wpo_wcpbn_allocate_batch_numbers' to allow third party plugins to allocate batch stock
- Fix: New check for batch expiry date is empty in AS routines
- Fix: Bring back the textdomain load function
- Fix: Bug on fetching empty date_expiry
- Fix: Adds order status condition to add batch number and expiry date to formatted item meta
- Fix: Bug by checking if order status is allowed to reduce batch stock
- Fix: Admin URL for overview batch list post edit
- Fix: Small viewport styles in product batch table
1.2.3
- New: Filter to hide order item meta 'wpo_wcpbn_hide_wc_order_item_meta'
- New: Update product stock and status on batch archive AS routine
- New: Improved batch orders list
- New: Compatibility support for Yith POS
- New: Filters for AS timestamp 'wpo_wcpbn_as_archive_batches_timestamp' and interval in seconds 'wpo_wcpbn_as_archive_batches_interval_in_seconds'
- New: Save order item batch number single meta '_wcpbn_batch_1', '_wcpbn_batch_2', ...
- Fix: Duplicate plugin instances running simultaneous
- Fix: Change plugin menu capabilities to 'manage_woocommerce'
- Fix: Deprecated jQuery warnings
- Fix: Remove supplier text input pattern validation to allow Arabic characters
- Fix: Issue with variations save button always enabled
- Marked tested up to WooCommerce 5.3 and WordPress 5.8
1.2.2
- New: Filter 'wpo_wcpbn_order_item_quantity_for_batch_allocation'
- New: WPML compatibility
- New: Restore batch stocks on refunds
- New: Filter 'wpo_wcpbn_before_allocate_order_item_batch_numers'
1.2.1
- Fix: PHP8.0 errors
- Fix: Error for missing $item object
- Fix: Removes the method 'load_textdomain' because is no longer needed if the 'Domain path' is included in the file header
1.2.0
- New: Portuguese translation
- New: POT file for translations
- New: Allow delete all product batches from REST API on UPDATE request
- New: Button to synchronize the product/variation stock with the batches stock
- New: Setting to enable synchronization in products for the default WC stock on batch creation/update/delete
- New: Filter hooks 'wpo_wcpbn_overview_list_orderby' and 'wpo_wcpbn_overview_list_order' to override the default values
- New: Add $orderby and $order properties to the 'wpo_wcpbn_get_product_batches' method
- New: Replace the hook 'woocommerce_update_product_variation' for 'woocommerce_save_product_variation' for CRUD operations in variations
- New: Allow add new batch identical to last one (more of the last)
- Fix: Check for empty array in display product batch number shortcode
- Fix: Bug when product doesn't exist
- Fix: Batch numbers not showing in formatted meta on WC new order email
1.1.5
- New: Shortcode
wcpbn_product_batch_numbers
- New: Column in Overview table for batch database ID
- Fix: Hook priority and removes third party hooks saving at the same time
- Fix: Bug when priority setting selected option value saves as "Select..." and not empty
- Fix: Product listing column not displaying variation batches
- Fix: Bug with disabled input not submitting on product save
1.1.4
- New: Allow dots for batch numbers
- New: Quick edit setting to update batch expiry dates
- New: REST API with GET and PUT endpoints
- Fix: Several bugs on order items for batch attribution, totals recalculation and editing
- Fix: Bug when using in conjunction with the plugin 'Mix and Match'
1.1.3
- New: Setting to define batch reduction priority
- New: Setting to show/hide batches column on WC products listing
- New: Two functions to restore/reduce batch available stock (wpo_wcpbn_update_batch_stock_available_qty) and add new batch (wpo_wcpbn_add_new_batch)
- Fix: Bug on order item type
1.1.2
- New: Applies the filter 'wpo_wcpbn_format_date' on all plugin printing dates
- New: Setting to add expiry date to formatted item meta
- Fix: Some glitches on the order items table
- Fix: Shorthand functions allowing customization of the returning string with parameters
1.1.1
- New: Filter 'wpo_wcpbn_format_date' for shortcode date format
- Fix: Order of the overview table by expiry date now ascending
- Fix: Per page screen option setting
- Fix: Overview list table pagination
- Fix: Fatal error on product deletion
- Fix: AJAX reload batch table on products make title dissapear
1.1.0
- New: Assign expired batches to order items setting
- New: Auto archive expired batches setting
- New: Shortcode [wcpbn_product_next_batch_expiry_date] with 2 properties: 'show_days_before_expiry' and 'hide_days_before_expiry'
- New: WCPDF integration via order formatted item meta with setting
- New: Global expiry date offset warning setting
- New: Overview list table page with search and status filter. Search has two prefixes: batch: and supplier:
- New: Shorthand functions 'wpo_wcpbn_get_batch_expiry_date' and 'wpo_wcpbn_get_batch_number'
- Fix: Save simple product batches via AJAX
- Fix: Allow adding multiple batches with the same number, but notify with tooltip
1.0.3
- Fix: jQuery bug when deleting batch numbers, some buttons got unclickable.
- Fix: Problems adding batch numbers when having more than one product variation.
- Fix: Stock reduce and restore problems on duplicated order items.
1.0.2
- Fix: Batch numbers table only showing on the first product variation
1.0.1
- Fix: Database column 'order_ids' data type JSON doesn't support legacy MySQL versions
1.0.0