DIY sync
WooCommerce KROS Onix Connector
List of action and filter hooks supported by the WooCommerce KROS Onix Connector plugin. You can use this hooks in your e-shop templates by adding them to the functions.php
file or by using the plugin for snippet hooks.
tlw_wc_onix_conn_sync_order
- filter hook for modifying the output fields with order data from the e-shop to Onix
/**
* filter hook for order sync to Onix
* @param array $order_sync order request output to Onix
* @param obj $order eshop order data
* @param array $custom_company_data company billing data
* @return array final order request output to Onix
*/
add_filter('tlw_wc_onix_conn_sync_order', function($order_sync, $order, $custom_company_data) {
return $order_sync;
}, 10, 3);
tlw_wc_onix_conn_sync_order_item
- filter hook for modifying the output fields with product item data in the order or invoice from the e-shop to Onix
/**
* filter hook for order/invoice product item sync to Onix
* @param array $order_item order/invoice product item request output to Onix
* @param obj $item eshop order item data
* @return array final order/invoice product item request to Onix
*/
add_filter('tlw_wc_onix_conn_sync_order_item', function($order_item, $item) {
return $order_item;
}, 10, 2);
tlw_wc_onix_conn_sync_order_fee
- filter hook for modifying the output fields with extra fee item data in the order or invoice from the e-shop to Onix
/**
* filter hook for order/invoice fee item sync to Onix
* @param array $order_fee order/invoice fee item request output to Onix
* @param obj $item eshop order item data
* @return array final order/invoice fee item request to Onix
*/
add_filter('tlw_wc_onix_conn_sync_order_fee', function($order_fee, $item) {
return $order_fee;
}, 10, 2);
tlw_wc_onix_conn_sync_order_shipping
- filter hook for modifying the output fields with shipping item data in the order or invoice from the e-shop to Onix
/**
* filter hook for order/invoice shipping item sync to Onix
* @param array $order_shipping order/invoice shipping item request output to Onix
* @param obj $order eshop order data
* @return array final order/invoice shipping item request to Onix
*/
add_filter('tlw_wc_onix_conn_sync_order_shipping', function($order_shipping, $order) {
return $order_shipping;
}, 10, 2);
tlw_wc_onix_conn_sync_invoice
- filter hook for modifying the output fields with invoice data from the e-shop to Onix
/**
* filter hook for invoice sync to Onix
* @param array $invoice_sync invoice request output to Onix
* @param obj $order eshop order data
* @return array final invoice request output to Onix
*/
add_filter('tlw_wc_onix_conn_sync_invoice', function($invoice_sync, $order) {
return $invoice_sync;
}, 10, 2);
tlw_wc_onix_conn_sync_product
- filter hook for modifying the input fields with simple or variable product data from Onix to the e-shop
/**
* filter hook for product sync from Onix to eshop
* @param array $product_eshop product request output to eshop
* @param obj $product_onix Onix product data
* @param array $images Onix product images
* @return array final product request to eshop
*/
add_filter('tlw_wc_onix_conn_sync_product', function($product_eshop, $product_onix, $images) {
return $product_eshop;
}, 10, 3);
tlw_wc_onix_conn_sync_product_variation
- filter hook for modifying the input fields with product variant data from Onix to the e-shop
/**
* filter hook for product variation sync from Onix to eshop
* @param array $product_variation_eshop product variation request output to eshop
* @param obj $product_onix Onix product data
* @param array $images Onix product images
* @return array final product variation request to eshop
*/
add_filter('tlw_wc_onix_conn_sync_product_variation', function($product_variation_eshop, $product_onix, $images) {
return $product_variation_eshop;
}, 10, 3);
tlw_wc_onix_conn_get_product_image_base64
- filter hook for modifying the input fields with product image data from Onix to the e-shop
/**
* filter hook for getting base64 product image from Onix to eshop
* @param str $image_base64 base64 encode product image from Onix
* @param obj $response_img full response of product image from Onix
* @param obj $image_onix product image meta data from Onix
* @return base64 string
*/
add_filter('tlw_wc_onix_conn_get_product_image_base64', function($image_base64, $response_img, $image_onix) {
return $image_base64;
}, 10, 3);