1. Home
  2. Mailstep
  3. Filters for developers

Filters for developers

If you don’t find the filter or action you need here, please contact me with where and how you would like it added and I will be happy to do so to make further plugin updates safe.

kbnt_mailstep_blocked_statuses_update

The filter returns order statuses where the order status is no longer updated based on Mailstep data.

apply_filters('kbnt_mailstep_blocked_statuses_update', ['completed',
 'failed', 'cancelled', 'refunded']);

Parameters

  • $statuses (array) Order states

Source code

The filter is located in the file kybernaut-mailstep.php.

kbnt_mailstep_cod_payment_methods

The filter returns slugs of payment methods that are considered cash on delivery.

apply_filters('kbnt_mailstep_cod_payment_methods', ['cod', 'dobirka']);

Parameters

  • $methods (array) Slugy payment methods considered cash on delivery.

Source code

The filter is located in the files includes\class-kbnt-mailstep-api.php, includes\class-kbnt-mailstep-orders.php.

kbnt_mailstep_get_order_courier_id

Allows you to edit the Courier ID.

apply_filters('kbnt_mailstep_get_order_courier_id', get_option('wc_kbnt_mailstep_settings_shipping_' . $shipping_method->get_method_id() . ':' . $shipping_method->get_instance_id(), false), $order, $shipping_method->get_method_id(), $shipping_method->get_instance_id());

Parameters

  • $courier_id (int) Courier ID (according to Cybernaut Mailstep settings).
  • $order (WC_Order) Order.
  • $method_id (string) Delivery method ID.
  • $instance_id (string) The instance ID of the delivery method.

Source code

The filter is located in the file includes\class-kbnt-mailstep-api.php.


kbnt_mailstep_order_set

The filter returns the individual parameters sent to Mailstep and allows developers to edit them.

apply_filters('kbnt_mailstep_order_set', $parameters, $order);

Parameters

  • $parameters (array) Individual parameters sent to Mailstep.
  • $order (WC_Order) Order.

Source code

The filter is located in the file includes\class-kbnt-mailstep-api.php.


kbnt_mailstep_sync_excluded_store_ids

The filter allows you to exclude warehouses from Mailstep’s warehouse status synchronization. Store IDs can be found either from Mailstep or in the log. Empty the sync cache after changing the edit.

apply_filters('kbnt_mailstep_sync_excluded_store_ids', []);

Parameters

  • $exluded_store_ids (array) List of stack IDs (string).

Source code

The filter is located in the file includes\class-kbnt-mailstep-inventory-sync.php.


kbnt_mailstep_sync_inventory_products_per_sync

The filter returns the individual how many products are synchronized with the stock status in Mailstep at once.

apply_filters('kbnt_mailstep_sync_inventory_products_per_sync', 300);

Parameters

  • $products_per_sync (int) Number of products synchronized at once.

Source code

The filter is located in the file includes\class-kbnt-mailstep-inventory-sync.php.


kbnt_mailstep_sync_inventory_recurrence

The filter allows you to set how often the automatic synchronization of the warehouse will be triggered. After the change, turn the warehouse synchronization off and on to allow rescheduling to occur.

apply_filters('kbnt_mailstep_sync_inventory_recurrence', 'hourly');

Parameters

  • $recurrence (string) How often the event should subsequently be repeated. For acceptable values, see wp_get_schedules().

Source code

The filter is located in the file includes\class-kbnt-mailstep-inventory-sync.php.


kbnt_mailstep_sync_only_store_id

The filter allows you to select one warehouse to be selected for synchronizing the warehouse status from Mailstep. You can find out the Store ID either from Mailstep or in the log. Empty the synchronization cache after changing the edit.

apply_filters('kbnt_mailstep_sync_only_store_id', "")

Parameters

  • $store_id (string) Warehouse ID.

Source code

The filter is located in the file includes\class-kbnt-mailstep-inventory-sync.php.


kbnt_mailstep_unreleased_stock_order_statuses

This setting will allow working with a “blocked” warehouse, i.e. adds the goods not stocked by Mailstep to the stock on the e-shop and thus prevents artificially increasing the stock. By default it contains “Pending”, “On hold” and “Mailstep – incorrectly entered”, but you can modify them as follows. After the modification , you need to empty the storage cache.

apply_filters('kbnt_mailstep_unreleased_stock_order_statuses', ['wc-pending', 'wc-inputerror', 'wc-on-hold']);

Parameters

  • $statuses (array) Order states

Source code

The filter is located in the file includes\class-kbnt-mailstep-inventory-sync.php.

Updated on December 11, 2023

Was this article helpful?

Related Articles