DIY sync
WooCommerce KROS Omega Connector
Zoznam action a filter hookov podporovaných pluginom WooCommerce KROS Omega Connector. Uvedené hooky môžete používať v šablónach vašich e-shopov pridaním do súboru functions.php
alebo použitím pluginu pre snippet hooky.
tlw_omega_conn_order_sync
- filter hook pre úpravu výstupného poľa s údajmi objednávky alebo faktúry smerom z e-shopu do Omegy
/**
* filter hook for order or invoice sync to Omega
* @param array $order_sync order or invoice request output to Omega
* @param obj $order eshop order data
* @return array final order or invoice request output to Omega
*/
add_filter('tlw_omega_conn_order_sync', function($order_sync, $order) {
return $order_sync;
}, 10, 2);
tlw_omega_conn_order_sync_item_product
- filter hook pre úpravu výstupného poľa s údajmi položky produktu v objednávke alebo faktúre smerom z e-shopu do Omegy
/**
* filter hook for order or invoice product item sync to Omega
* @param array $order_item order or invoice product item request output to Omega
* @param obj $item eshop order item data
* @param obj $product eshop product data
* @return array final order product item request to Omega
*/
add_filter('tlw_omega_conn_order_sync_item_product', function($order_item, $item, $product) {
return $order_item;
}, 10, 3);
tlw_omega_conn_order_sync_item_fee
- filter hook pre úpravu výstupného poľa s údajmi položky extra poplatku v objednávke alebo faktúre smerom z e-shopu do Omegy
/**
* filter hook for order or invoice fee item sync to Omega
* @param array $order_item order or invoice fee item request output to Omega
* @param obj $item eshop order item data
* @return array final fee order item request to Omega
*/
add_filter('tlw_omega_conn_order_sync_item_fee', function($order_item, $item) {
return $order_item;
}, 10, 2);
tlw_omega_conn_order_sync_item_shipping
- filter hook pre úpravu výstupného poľa s údajmi položky dopravy v objednávke alebo faktúre smerom z e-shopu do Omegy
/**
* filter hook for order or invoice shipping item sync to Omega
* @param array $order_item order or invoice shipping item request output to Omega
* @param obj $order eshop order data
* @return array final shipping order item request to Omega
*/
add_filter('tlw_omega_conn_order_sync_item_shipping', function($order_item, $order) {
return $order_item;
}, 10, 2);
tlw_omega_conn_product_sync
- filter hook pre úpravu vstupného poľa s údajmi jednoduchého alebo variabilného produktu smerom z Omegy do e-shopu
/**
* filter hook for sync product request to eshop
* @param arr $product_eshop eshop product data
* @param obj $product_omega Omega product data
* @return arr eshop product data request
*/
add_filter('tlw_omega_conn_product_sync', function($product_eshop, $product_omega) {
return $product_eshop;
}, 10, 2);
tlw_omega_conn_product_variation_sync
- filter hook pre úpravu vstupného poľa s údajmi variantu produktu smerom z Omegy do e-shopu
/**
* filter hook for sync product variation request to eshop
* @param arr $variation_eshop eshop product variation data
* @param obj $product_omega Omega product data
* @return arr eshop product variation data request
*/
add_filter('tlw_omega_conn_product_variation_sync', function($variation_eshop, $product_omega) {
return $variation_eshop;
}, 10, 2);