DIY sync
WooCommerce Pohoda Connector
List of action and filter hooks supported by the WooCommerce Pohoda 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_pohoda_conn_customer_sync
- filter hook for modifying the output fields with customer data from the e-shop to Pohoda
/**
* filter hook for customer sync to Pohoda
* @param array $order_customer customer request output to Pohoda
* @param obj $order order data
* @param str $action sync action of customer (null string|insert)
* @return array final customer request to Pohoda
*/
add_filter('tlw_wc_pohoda_conn_customer_sync', function($order_customer, $order, $action) {
return $order_customer;
}, 10, 3);
tlw_wc_pohoda_conn_order_sync
- filter hook for modifying the output fields with order data from the e-shop to Pohoda
/**
* filter hook for order sync to Pohoda
* @param array $order_pohoda order request output to Pohoda
* @param obj $order eshop order data
* @param array $custom_company_data company billing data
* @return array final order request output to Pohoda
*/
add_filter('tlw_wc_pohoda_conn_order_sync', function($order_pohoda, $order, $custom_company_data) {
return $order_pohoda;
}, 10, 3);
tlw_wc_pohoda_conn_order_sync_product
- filter hook for modifying the output fields with product item data in the order from the e-shop to Pohoda
/**
* filter hook for order product item sync to Pohoda
* @param array $order_item order product item request output to Pohoda
* @param obj $item eshop order item data
* @param obj $order eshop order data
* @param bool $foreign_country flag of foreign country
* @param bool $foreign_currency flag of foreign currency
* @param array $coupon_codes coupons used in order
* @return array final order product item request to Pohoda
*/
add_filter('tlw_wc_pohoda_conn_order_sync_product', function($order_item, $item, $order, $foreign_country, $foreign_currency, $coupon_codes) {
return $order_item;
}, 10, 6);
tlw_wc_pohoda_conn_order_sync_fee
- filter hook for modifying the output fields with extra fee item data in the order from the e-shop to Pohoda
/**
* filter hook for order fee item sync to Pohoda
* @param array $order_item order fee item request output to Pohoda
* @param obj $item eshop order item data
* @param obj $order eshop order data
* @param bool $foreign_country flag of foreign country
* @param bool $foreign_currency flag of foreign currency
* @return array final order fee item request to Pohoda
*/
add_filter('tlw_wc_pohoda_conn_order_sync_fee', function($order_item, $item, $order, $foreign_country, $foreign_currency) {
return $order_item;
}, 10, 5);
tlw_wc_pohoda_conn_order_sync_shipping
- filter hook for modifying the output fields with shipping item data in the order from the e-shop to Pohoda
/**
* filter hook for order shipping item sync to Pohoda
* @param array $order_item order shipping item request output to Pohoda
* @param obj $order eshop order data
* @param bool $foreign_country flag of foreign country
* @param bool $foreign_currency flag of foreign currency
* @return array final order shipping item request to Pohoda
*/
add_filter('tlw_wc_pohoda_conn_order_sync_shipping', function($order_item, $order, $foreign_country, $foreign_currency) {
return $order_item;
}, 10, 4);
tlw_wc_pohoda_conn_invoice_sync
- filter hook for modifying the output fields with invoice data from the e-shop to Pohoda
/**
* filter hook for invoice sync to Pohoda
* @param array $invoice invoice request output to Pohoda
* @param obj $order eshop order data
* @param array $custom_company_data company billing data
* @return array final invoice request output to Pohoda
*/
add_filter('tlw_wc_pohoda_conn_invoice_sync', function($invoice, $order, $custom_company_data) {
return $invoice;
}, 10, 3);
tlw_wc_pohoda_conn_sync_product_pohoda
- filter hook for modifying the processing of input data of products from Pohoda
/**
* filter hook for modifying basic exec process of Pohoda products
* @param array $products_pohoda basic exec process products
* @param obj $object_pohoda Pohoda products XML in object
* @return array products output to next exec process in eshop
*/
add_filter('tlw_wc_pohoda_conn_sync_product_pohoda', function($products_pohoda, $object_pohoda) {
return $products_pohoda;
}, 10, 2);
tlw_wc_pohoda_conn_product_sync
- filter hook for modifying the input fields with simple or variable product data from Pohoda to the e-shop
/**
* filter hook for product sync from Pohoda to eshop
* @param array $product_eshop product request output to eshop
* @param array $product_pohoda Pohoda product data
* @param array $pohoda_images Pohoda product images
* @return array final product request to eshop
*/
add_filter('tlw_wc_pohoda_conn_product_sync', function($product_eshop, $product_pohoda, $pohoda_images) {
return $product_eshop;
}, 10, 3);
tlw_wc_pohoda_conn_product_variation_sync
- filter hook for modifying the input fields with product variant data from Pohoda to the e-shop
/**
* filter hook for product variation sync from Pohoda to eshop
* @param array $product_eshop product variation request output to eshop
* @param array $product_pohoda Pohoda product data
* @param arra $pohoda_images Pohoda product images
* @return array final product variation request to eshop
*/
add_filter('tlw_wc_pohoda_conn_product_variation_sync', function($product_variation_eshop, $product_pohoda, $pohoda_images) {
return $product_variation_eshop;
}, 10, 3);
tlw_wc_pohoda_conn_product_image_sync
- filter hook for modifying the input fields with product image data from Pohoda to the e-shop
/**
* filter hook for product image sync from Pohoda to eshop
* @param array $image_eshop product image request output to eshop
* @param obj $image_pohoda Pohoda product image data
* @return array final product image request to eshop
*/
add_filter('tlw_wc_pohoda_conn_product_image_sync', function($image_eshop, $image_pohoda) {
return $image_eshop;
}, 10, 2);
tlw_wc_pohoda_conn_product_export
- filter hook for modifying the product data output fields to generate an XML export file of products
- used as part of a one-time synchronization for the manual import of an XML file with products from the e-shop into Pohoda
/**
* filter hook for one-time product export from eshop to Pohoda XML
* @param array $output product request output to Pohoda XML
* @param obj $product eshop product data
* @return array final product request to Pohoda XML
*/
add_filter('tlw_wc_pohoda_conn_product_export', function($output, $product) {
return $output;
}, 10, 2);
tlw_wc_pohoda_conn_check_allow_oss
- filter hook for modifying the detection of the application of the OSS mode in a synchronized order from the e-shop to Pohoda
/**
* filter hook for detection OSS mode in synced order from eshop to Pohoda
* @param bool $result allowed or not allowed OSS mode in synced order
* @param obj $order eshop order data
* @param array $company_billing_data company billing data in eshop order
* @return bool
*/
add_filter('tlw_wc_pohoda_conn_check_allow_oss', function($result, $order, $company_billing_data) {
return $result;
}, 10, 3);
tlw_wc_pohoda_conn_reg_vat_eu
- filter hook for modifying the assignment of a merchant’s VAT registration in another EU country within the synchronization of an order or invoice from the e-shop to Pohoda
/**
* filter hook for modifying registration EU VAT in other EU country to Pohoda
* @param str $eu_vat EU VAT registrated in other EU country
* @param obj $order eshop order data
* @param array $company_billing_data company billing data in eshop order
* @return string EU VAT
*/
add_filter('tlw_wc_pohoda_conn_reg_vat_eu', function($eu_vat, $order, $company_billing_data) {
return $eu_vat;
}, 10, 3);
tlw_wc_pohoda_conn_sync_customers_to_eshop
- filter hook for modifying the input fields with customer data from Pohoda to the e-shop
/**
* filter hook for sync customer from Pohoda to eshop
* @param array $customer_eshop user request output to eshop
* @param obj $customer_pohoda Pohoda customer data
* @return array final customer request to eshop
*/
add_filter('tlw_wc_pohoda_conn_sync_customers_to_eshop', function($customer_eshop, $customer_pohoda) {
return $customer_eshop;
}, 10, 2);
tlw_wc_pohoda_conn_sync_customers_to_eshop_user
- action hook called after synchronization of the customer from Pohoda to the e-shop
/**
* action hook for running some action after customer sync from Pohoda to eshop
* @param int $user_id eshop user ID
* @param array $customer user request output to eshop
* @param array $pohoda_cstomer Pohoda customer data
* @return void
*/
add_action('tlw_wc_pohoda_conn_sync_customers_to_eshop_user', function($user_id, $customer, $pohoda_customer) {
// your code
}, 10, 3);
tlw_wc_pohoda_conn_sync_product_sellingratevat
- filter hook for modifying the VAT rate of the product within the synchronization of products from Pohoda to the e-shop
/**
* filter hook for modifying product selling VAT rate from Pohoda to eshop
* @param str $selling_rate_vat product selling VAT rate from Pohoda
* @param obj $stock_item Pohoda product
* @return str product selling VAT rate
*/
add_filter('tlw_wc_pohoda_conn_sync_product_sellingratevat', function($selling_rate_vat, $stock_item) {
return $selling_rate_vat;
}, 10, 2);
Action and filter hooks
- tlw_wc_pohoda_conn_customer_sync
- tlw_wc_pohoda_conn_order_sync
- tlw_wc_pohoda_conn_order_sync_product
- tlw_wc_pohoda_conn_order_sync_fee
- tlw_wc_pohoda_conn_order_sync_shipping
- tlw_wc_pohoda_conn_invoice_sync
- tlw_wc_pohoda_conn_sync_product_pohoda
- tlw_wc_pohoda_conn_product_sync
- tlw_wc_pohoda_conn_product_variation_sync
- tlw_wc_pohoda_conn_product_image_sync
- tlw_wc_pohoda_conn_product_export
- tlw_wc_pohoda_conn_check_allow_oss
- tlw_wc_pohoda_conn_reg_vat_eu
- tlw_wc_pohoda_conn_sync_customers_to_eshop
- tlw_wc_pohoda_conn_sync_customers_to_eshop_user
- tlw_wc_pohoda_conn_sync_product_sellingratevat