DIY sync
WooCommerce Pohoda Connector
Zoznam action a filter hookov podporovaných pluginom WooCommerce Pohoda 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_wc_pohoda_conn_customer_sync
- filter hook pre úpravu výstupného poľa s údajmi zákazníka smerom z e-shopu do Pohody
/**
* 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 pre úpravu výstupného poľa s údajmi objednávky smerom z e-shopu do Pohody
/**
* 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 pre úpravu výstupného poľa s údajmi položky produktu v objednávke smerom z e-shopu do Pohody
/**
* 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 pre úpravu výstupného poľa s údajmi položky extra poplatku v objednávke smerom z e-shopu do Pohody
/**
* 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 pre úpravu výstupného poľa s údajmi položky dopravy v objednávke smerom z e-shopu do Pohody
/**
* 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 pre úpravu výstupného poľa s údajmi faktúry smerom z e-shopu do Pohody
/**
* 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 pre úpravu spracovania vstupných údajov produktov z Pohody
/**
* 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 pre úpravu vstupného poľa s údajmi jednoduchého alebo variabilného produktu smerom z Pohody do e-shopu
/**
* 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_sync_after
- action hook volaný po vykonaní synchronizácie produktu z Pohody do e-shopu
/**
* action hook for run some action after sync product from Pohoda to eshop
* @param int $product_id eshop product ID
* @param array $product_eshop product request output to eshop
* @param array $product_pohoda Pohoda product data
*/
add_action('tlw_wc_pohoda_conn_product_sync_after', function($product_id, $product_eshop, $product_pohoda) {
// your code
}, 10, 3);
tlw_wc_pohoda_conn_product_variation_sync
- filter hook pre úpravu vstupného poľa s údajmi variantu produktu smerom z Pohody do e-shopu
/**
* 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 pre úpravu vstupného poľa s údajmi obrázka produktu smerom z Pohody do e-shopu
/**
* 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 pre úpravu výstupného poľa s údajmi produktu pre generovanie exportu XML súboru produktov
- používané v rámci jednorazovej synchronizácie pre manuálny import XML súboru s produktami z e-shopu do Pohody
/**
* 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 pre úpravu detekcie uplatnenia OSS režimu v synchronizovanej objednávke smerom z e-shopu do Pohody
/**
* 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 pre úpravu priradenia registrácie DPH obchodníka v inej krajine EÚ v rámci synchronizácie objednávky alebo faktúry smerom z e-shopu do Pohody
/**
* 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 pre úpravu vstupného poľa s údajmi zákazníka smerom z Pohody do e-shopu
/**
* 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 volaný po vykonaní synchronizácie zákazníka z Pohody do e-shopu
/**
* 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
* @param str $action process user action (insert|update)
* @return void
*/
add_action('tlw_wc_pohoda_conn_sync_customers_to_eshop_user', function($user_id, $customer, $pohoda_customer, $action) {
// your code
}, 10, 4);
tlw_wc_pohoda_conn_sync_product_sellingratevat
- filter hook pre úpravu sadzby DPH predajných cien produktu v rámci synchronizácie produktov z Pohody do e-shopu
/**
* 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);
tlw_wc_pohoda_conn_sync_product_purchasingratevat
- filter hook pre úpravu sadzby DPH nákupných cien produktu v rámci synchronizácie produktov z Pohody do e-shopu
/**
* filter hook for modifying product purchasing VAT rate from Pohoda to eshop
* @param str $purchasing_rate_vat product purchasing VAT rate from Pohoda
* @param obj $stock_item Pohoda product
* @return str product purchasing VAT rate
*/
add_filter('tlw_wc_pohoda_conn_sync_product_purchasingratevat', function($purchasing_rate_vat, $stock_item) {
return $purchasing_rate_vat;
}, 10, 2);
tlw_wc_pohoda_conn_get_eshop_products
- filter hook pre úpravu vstupných parametrov pre vytiahnutie produktov z e-shopu v rámci ich synchronizácie do Pohody
/**
* filter hook for modifying params of getting products from eshop to Pohoda
* @param array $args params for wc_get_products()
* @param array $map_args mapping params
* @return array params for wc_get_products()
*/
add_filter('tlw_wc_pohoda_conn_get_eshop_products', function($args, $map_args) {
return $args;
}, 10, 2);
tlw_wc_pohoda_conn_sync_products_to_pohoda
- filter hook pre úpravu vstupného poľa s údajmi produktu smerom z e-shopu do Pohody
/**
* filter hook for sync product from eshop to Pohoda
* @param array $product_pohoda product request output to Pohoda
* @param obj $product_eshop eshop product data
* @return array final product request to Pohoda
*/
add_filter('tlw_wc_pohoda_conn_sync_products_to_pohoda', function($product_pohoda, $product_eshop) {
return $product_pohoda;
}, 10, 2);
tlw_wc_pohoda_conn_product_category_sync
- filter hook pre úpravu vstupného poľa s údajmi produktovej kategórie smerom z Pohody do e-shopu
/**
* filter hook for product category sync from Pohoda to eshop
* @param array $category_eshop product category request output to eshop
* @param array $category_pohoda Pohoda product category data
* @return array final product category request to eshop
*/
add_filter('tlw_wc_pohoda_conn_product_category_sync', function($category_eshop, $category_pohoda) {
return $category_eshop;
}, 10, 2);
tlw_wc_pohoda_conn_sync_individual_price
- filter hook pre úpravu vstupného poľa s údajmi individuálnej ceny produktu per zákazník z Pohody do e-shopu
/**
* filter hook for product individual price sync from Pohoda to eshop
* @param array $individual_price individual price request output to eshop
* @param obj $pohoda_item Pohoda individual price item with data
* @param int $user_id eshop customer ID
* @return array final product individual price request to eshop
*/
add_filter('tlw_wc_pohoda_conn_sync_individual_price', function($individual_price, $pohoda_item, $user_id) {
return $individual_price;
}, 10, 3);
tlw_wc_pohoda_conn_sync_individual_price_customer
- action hook volaný po vykonaní synchronizácie individuálnych cien zákazníka z Pohody do e-shopu
/**
* action hook for running some action after syncing of customer individual prices from Pohoda to eshop
* @param int $user_id eshop user ID
* @param array $customer Pohoda user data
* @param array $user_prices Pohoda customer individual prices
* @return void
*/
add_action('tlw_wc_pohoda_conn_sync_individual_price_customer', function($user_id, $customer, $user_prices) {
// your code
}, 10, 3);
Action a filter hooky
- 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_sync_after
- 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
- tlw_wc_pohoda_conn_sync_product_purchasingratevat
- tlw_wc_pohoda_conn_get_eshop_products
- tlw_wc_pohoda_conn_sync_products_to_pohoda
- tlw_wc_pohoda_conn_product_category_sync
- tlw_wc_pohoda_conn_sync_individual_price
- tlw_wc_pohoda_conn_sync_individual_price_customer