DIY sync
WooCommerce EcoSun OASIS Connector
Customize the synchronization between WooCommerce and EcoSun OASIS to suit your own needs.
On this page, you will find an overview of the available action and filter hooks for the WooCommerce EcoSun OASIS Connector plugin. You can use them to modify data transferred between systems or to extend the plugin’s standard functionality.
You can use hooks in your own WordPress plugins, in your theme’s functions.php file, or via plugins for managing PHP snippets.
tlw_ecosun_conn_sync_order
Filter hook
Filter hook for modifying the output fields with order data from the e-shop to EcoSun OASIS.
/**
* filter hook for order sync to EcoSun OASIS
* @param array $order_sync order request output to EcoSun OASIS
* @param obj $order eshop order data
* @return array final order request output to EcoSun OASIS
*/
add_filter('tlw_ecosun_conn_sync_order', function($order_sync, $order) {
return $order_sync;
}, 10, 2);
tlw_ecosun_conn_sync_order_product
Filter hook
Filter hook for modifying the output fields with product item data in the order from the e-shop to EcoSun OASIS.
/**
* filter hook for order product item sync to EcoSun OASIS
* @param array $order_item order product item request output to EcoSun OASIS
* @param obj $item eshop order item data
* @param obj $order eshop order data
* @return array final order product item request to EcoSun OASIS
*/
add_filter('tlw_ecosun_conn_sync_order_product', function($order_item, $item, $order) {
return $order_item;
}, 10, 3);
tlw_ecosun_conn_sync_order_fee
Filter hook
Filter hook for modifying the output fields with extra fee item data in the order from the e-shop to EcoSun OASIS.
/**
* filter hook for order fee item sync to EcoSun OASIS
* @param array $order_item order fee item request output to EcoSun OASIS
* @param obj $item eshop order item data
* @param obj $order eshop order data
* @return array final order fee item request to EcoSun OASIS
*/
add_filter('tlw_ecosun_conn_sync_order_fee', function($order_item, $item, $order) {
return $order_item;
}, 10, 3);
tlw_ecosun_conn_sync_order_shipping
Filter hook
Filter hook for modifying the output fields with the data of the shipping item in the order from the e-shop to EcoSun OASIS.
/**
* filter hook for order shipping item sync to EcoSun OASIS
* @param array $order_item order shipping item request output to EcoSun OASIS
* @param obj $order eshop order data
* @return array final order shipping item request to EcoSun OASIS
*/
add_filter('tlw_ecosun_conn_sync_order_shipping', function($order_item, $order) {
return $order_item;
}, 10, 2);
tlw_ecosun_conn_sync_product
Filter hook
Filter hook for modifying the input fields with simple or variable product data from EcoSun OASIS to the e-shop.
/**
* filter hook for product sync from EcoSun OASIS to eshop
* @param array $product_eshop product request output to eshop
* @param obj $product_ecosun EcoSun OASIS product data
* @param array $images EcoSun OASIS product images
* @return array final product request to eshop
*/
add_filter('tlw_ecosun_conn_sync_product', function($product_eshop, $product_ecosun, $images) {
return $product_eshop;
}, 10, 3);
tlw_ecosun_conn_sync_product_variation
Filter hook
Filter hook for modifying the input fields with product variant data from EcoSun OASIS to the e-shop.
/**
* filter hook for product variation sync from EcoSun OASIS to eshop
* @param array $product_variation_eshop product variation request output to eshop
* @param obj $product_ecosun EcoSun OASIS product data
* @param array $images EcoSun OASIS product images
* @return array final product variation request to eshop
*/
add_filter('tlw_ecosun_conn_sync_product_variation', function($product_variation_eshop, $product_ecosun, $images) {
return $product_variation_eshop;
}, 10, 3);
tlw_ecosun_conn_sync_product_light
Filter hook
Filter hook for modifying the input fields with product data as part of “light” synchronization from EcoSun OASIS to the e-shop.
/**
* filter hook for product 'light' sync from EcoSun OASIS to eshop
* @param array $product_eshop product request output to eshop
* @param obj $product_ecosun EcoSun OASIS product data
* @param array $placeholder product custom placeholder for updating product
* @return array final product request to eshop
*/
add_filter('tlw_ecosun_conn_sync_product_light', function($product_eshop, $product_ecosun, $placeholder) {
return $product_eshop;
}, 10, 3);
tlw_ecosun_conn_sync_product_variation_light
Filter hook
Filter hook for modifying the input fields with product variant data as part of “light” synchronization from EcoSun OASIS to the e-shop.
/**
* filter hook for product variation 'light' sync from EcoSun OASIS to eshop
* @param array $product_variation_eshop product variation request output to eshop
* @param obj $product_ecosun EcoSun OASIS product data
* @return array final product variation request to eshop
*/
add_filter('tlw_ecosun_conn_sync_product_variation_light', function($product_variation_eshop, $product_ecosun) {
return $product_variation_eshop;
}, 10, 2);