DIY sync

WooCommerce ABRA Flexi Connector


List of action and filter hooks supported by the WooCommerce ABRA Flexi 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_abra_flexi_conn_api_request_get_customer

  • filter hook for modifying the input fields for searching for a customer from an e-shop order in ABRA Flexi
/**
 * filter hook for detection of existing eshop customer in ABRA Flexi
 * @param array $request API request with filter customer params
 * @param obj $order eshop order data
 * @return array final API request to ABRA Flexi
 */
add_filter('tlw_abra_flexi_conn_api_request_get_customer', function($request, $order) {
     return $request;
}, 10, 2);

tlw_abra_flexi_conn_api_request_get_customers

  • filter hook for modifying the input fields for acquiring customers from ABRA Flexi
/**
 * filter hook for getting customers from ABRA Flexi
 * @param array $request API request with filter params
 * @return array final API request to ABRA Flexi
 */
add_filter('tlw_abra_flexi_conn_api_request_get_customers', function($request) {
     return $request;
}, 10, 1);

tlw_abra_flexi_conn_api_request_post_customer

  • filter hook for modifying the output fields with the data of a new customer for its creation in ABRA Flexi
/**
 * filter hook for creating new customer in ABRA Flexi
 * @param array $request customer request output to ABRA Flexi
 * @param obj $order eshop order data
 * @param array $custom_company_data company billing data
 * @return array final customer request output to ABRA Flexi
 */
add_filter('tlw_abra_flexi_conn_api_request_post_customer', function($request, $order, $custom_company_data) {
     return $request;
}, 10, 1);

tlw_abra_flexi_conn_api_request_get_products

  • filter hook for modifying the input fields for getting products from the ABRA Flexi price list
/**
 * filter hook for getting products from ABRA Flexi price list
 * @param array $request API request with filter params
 * @return array final API request to ABRA Flexi
 */
add_filter('tlw_abra_flexi_conn_api_request_get_products', function($request) {
     return $request;
}, 10, 1);

tlw_abra_flexi_conn_api_request_get_stockcards

  • filter hook for modifying the input fields for getting stock cards from ABRA Flexi
/**
 * filter hook for getting stock cards from ABRA Flexi
 * @param array $request API request with filter params
 * @return array final API request to ABRA Flexi
 */
add_filter('tlw_abra_flexi_conn_api_request_get_stockcards', function($request) {
     return $request;
}, 10, 1);

tlw_abra_flexi_conn_api_request_get_orders

  • filter hook for modifying the input fields for getting orders from ABRA Flexi
/**
 * filter hook for getting orders from ABRA Flexi
 * @param array $request API request with filter params
 * @return array final API request to ABRA Flexi
 */
add_filter('tlw_abra_flexi_conn_api_request_get_orders', function($request) {
     return $request;
}, 10, 1);

tlw_abra_flexi_conn_order_sync

  • filter hook for modifying the output fields with order data from the e-shop to ABRA Flexi
/**
 * filter hook for order sync to ABRA Flexi
 * @param array $order_sync order request output to ABRA Flexi
 * @param obj $order eshop order data
 * @return array final order request output to ABRA Flexi
 */
add_filter('tlw_abra_flexi_conn_order_sync', function($order_sync, $order) {
     return $order_sync;
}, 10, 2);

tlw_abra_flexi_conn_invoice_sync

  • filter hook for modifying the output fields with invoice data from the e-shop to ABRA Flexi
/**
 * filter hook for invoice sync to ABRA Flexi
 * @param array $invoice_sync invoice request output to ABRA Flexi
 * @param obj $order eshop order data
 * @return array final invoice request output to ABRA Flexi
 */
add_filter('tlw_abra_flexi_conn_invoice_sync', function($invoice_sync, $order) {
     return $invoice_sync;
}, 10, 2);

tlw_abra_flexi_conn_order_invoice_product

  • filter hook for modifying the output fields with product item data in the order or invoice from the e-shop to ABRA Flexi
/**
 * filter hook for order/invoice product item sync to ABRA Flexi
 * @param array $request order/invoice product item request output to ABRA Flexi
 * @param obj $order eshop order data
 * @param obj $item order item data
 * @param str $postfix postfix for foreign currency
 * @return array final order/invoice product item request to ABRA Flexi
 */
add_filter('tlw_abra_flexi_conn_order_invoice_product', function($request, $order, $item, $postfix) {
     return $response;
}, 10, 4);

tlw_abra_flexi_conn_order_invoice_fee

  • filter hook for modifying the output fields with extra fee item data in the order or invoice from the e-shop to ABRA Flexi
/**
 * filter hook for order/invoice fee item sync to ABRA Flexi
 * @param array $request order/invoice fee item request output to ABRA Flexi
 * @param obj $order eshop order data
 * @param obj $item eshop order item data
 * @param str $postfix postfix for foreign currency
 * @return array final fee order item request to ABRA Flexi
 */
add_filter('tlw_abra_flexi_conn_order_invoice_fee', function($request, $order, $item, $postfix) {
     return $request;
}, 10, 4);

tlw_abra_flexi_conn_order_invoice_shipping

  • filter hook for modifying the output fields with the data of the shipping item in the order or invoice from the e-shop to ABRA Flexi
/**
 * filter hook for order/invoice shipping item sync to ABRA Flexi
 * @param array $request order/invoice shipping item request output to ABRA Flexi
 * @param obj $order eshop order data
 * @param str $postfix postfix for foreign currency
 * @param array $products eshop order products for detection VAT rate
 * @return array final shipping order item request to ABRA Flexi
 */
add_filter('tlw_abra_flexi_conn_order_invoice_shipping', function($request, $order, $postfix, $products) {
     return $request;
}, 10, 4);

tlw_abra_flexi_conn_order_eshop_update

  • filter hook for modifying the input fields with order data for updating it in the e-shop
/**
 * filter hook for eshop order request for updating order in eshop
 * @param array $data eshop order data for updating
 * @param obj $order_eshop eshop order data
 * @param obj $order_abra ABRA Flexi order data
 * @return array final data for updating eshop order
 */
add_filter('tlw_abra_flexi_conn_order_eshop_update', function($data, $order_eshop, $order_abra) {
     return $data;
}, 10, 3);

tlw_abra_flexi_conn_sync_product

  • filter hook for modifying the input fields with simple or variable product data from ABRA Flexi to the e-shop
/**
 * filter hook for product sync from ABRA Flexi to eshop
 * @param array $product_eshop product request output to eshop
 * @param obj $product_abra ABRA Flexi product data
 * @return array final product request to eshop
 */
add_filter('tlw_abra_flexi_conn_sync_product', function($product_eshop, $product_abra) {
    return $product_eshop;
}, 10, 2);

tlw_abra_flexi_conn_sync_product_variation

  • filter hook for modifying the input fields with product variant data from ABRA Flexi to the e-shop
/**
 * filter hook for product variation sync from ABRA Flexi to eshop
 * @param array $variation_eshop product variation request output to eshop
 * @param obj $product_abra ABRA Flexi product data
 * @return array final product variation request to eshop
 */
add_filter('tlw_abra_flexi_conn_sync_product_variation', function($variation_eshop, $product_abra) {
    return $variation_eshop;
}, 10, 2);

tlw_abra_flexi_conn_sync_product_other_prices

  • filter hook for modifying the input fields with data of other prices of the product from ABRA Flexi to the e-shop
/**
 * filter hook for syncing of other product prices from ABRA Flexi to eshop
 * @param array $product_meta_data product meta request output to eshop
 * @param array $prices_foreign_currencies meta data with foreign product prices
 * @param array $prices_pricelist_groups meta data with product prices by pricelist groups
 * @return array product meta data with other prices
 */
add_filter('tlw_abra_flexi_conn_sync_product_other_prices', function($product_meta_data, $prices_foreign_currencies, $prices_pricelist_groups) {
     return $product_meta_data;
}, 10, 3);

tlw_wc_abra_flexi_conn_sync_customers_to_eshop

  • filter hook for modifying the input fields with customer data from ABRA Flexi to the e-shop
/**
 * filter hook for sync customer from ABRA Flexi to eshop
 * @param array $customer_eshop user request output to eshop
 * @param obj $customer_abra_flexi ABRA Flexi customer data
 * @return array final customer request to eshop
 */
add_filter('tlw_wc_abra_flexi_conn_sync_customers_to_eshop', function($customer_eshop, $customer_abra_flexi) {
     return $customer_eshop;
}, 10, 2);

tlw_wc_abra_flexi_conn_sync_customers_to_eshop_user

  • action hook called after synchronization of the customer from ABRA Flexi to the e-shop
/**
 * action hook for running some action after customer sync from ARBA Flexi to eshop
 * @param int $user_id eshop user ID
 * @param array $customer user request output to eshop
 * @param array $customer_abra_flexi ABRA Flexi customer data
 * @return void
 */
add_action('tlw_wc_abra_flexi_conn_sync_customers_to_eshop_user', function($user_id, $customer, $customer_abra_flexi) {
     // your code
}, 10, 3);