DIY sync
WooCommerce ABRA Gen Connector
Customize the synchronization between WooCommerce and ABRA Gen to suit your own needs.
On this page, you will find an overview of the available action and filter hooks for the WooCommerce ABRA Gen 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_abra_gen_conn_api_request_get_products
Filter hook
Filter hook for modifying the input fields for getting products from ABRA Gen.
/**
* filter hook for getting products from ABRA Gen
* @param array $request API request with filter params
* @return array final API request to ABRA Gen
*/
add_filter('tlw_abra_gen_conn_api_request_get_products', function($request) {
return $request;
}, 10, 1);
tlw_abra_gen_conn_order_sync
Filter hook
Filter hook for modifying the output fields with order data from the e-shop to ABRA Gen.
/**
* filter hook for order sync to ABRA Gen
* @param array $order_sync order request output to ABRA Gen
* @param obj $order eshop order data
* @return array final order request output to ABRA Gen
*/
add_filter('tlw_abra_gen_conn_order_sync', function($order_sync, $order) {
return $order_sync;
}, 10, 2);
tlw_abra_gen_conn_invoice_sync
Filter hook
Filter hook for modifying the output fields with invoice data from the e-shop to ABRA Gen.
/**
* filter hook for invoice sync to ABRA Gen
* @param array $invoice_sync invoice request output to ABRA Gen
* @param obj $order eshop order data
* @param array $order_abra_gen basic data of ABRA Gen order
* @return array final invoice request output to ABRA Gen
*/
add_filter('tlw_abra_gen_conn_invoice_sync', function($invoice_sync, $order, $order_abra_gen) {
return $invoice_sync;
}, 10, 3);
tlw_abra_gen_conn_invoice_proforma_sync
Filter hook
Filter hook for modifying the output fields with proforma invoice data from the e-shop to ABRA Gen.
/**
* filter hook for proforma invoice sync to ABRA Gen
* @param array $invoice_sync proforma invoice request output to ABRA Gen
* @param obj $order eshop order data
* @param array $order_abra_gen basic data of ABRA Gen order
* @return array final proforma invoice request output to ABRA Gen
*/
add_filter('tlw_abra_gen_conn_invoice_proforma_sync', function($invoice_sync, $order, $order_abra_gen) {
return $invoice_sync;
}, 10, 3);
tlw_abra_gen_conn_invoice_proforma_vat_sync
Filter hook
Filter hook for modifying the output fields with VAT proforma invoice data from the e-shop to ABRA Gen.
/**
* filter hook for VAT proforma invoice sync to ABRA Gen
* @param array $invoice_sync VAT proforma invoice request output to ABRA Gen
* @param obj $order eshop order data
* @param array $order_abra_gen basic data of ABRA Gen order
* @return array final VAT proforma invoice request output to ABRA Gen
*/
add_filter('tlw_abra_gen_conn_invoice_proforma_vat_sync', function($invoice_sync, $order, $order_abra_gen) {
return $invoice_sync;
}, 10, 3);
tlw_abra_gen_conn_order_invoice_product
Filter hook
Filter hook for modifying the output fields with product item data in the order or invoice from the e-shop to ABRA Gen.
/**
* filter hook for order/invoice product item sync to ABRA Gen
* @param array $request order/invoice product item request output to ABRA Gen
* @param obj $item order item data
* @param obj $order eshop order data
* @return array final order/invoice product item request to ABRA Gen
*/
add_filter('tlw_abra_gen_conn_order_invoice_product', function($request, $item, $order) {
return $request;
}, 10, 3);
tlw_abra_gen_conn_order_invoice_fee
Filter hook
Filter hook for modifying the output fields with extra fee item data in the order or invoice from the e-shop to ABRA Gen.
/**
* filter hook for order/invoice fee item sync to ABRA Gen
* @param array $request order/invoice fee item request output to ABRA Gen
* @param obj $item eshop order item data
* @param obj $order eshop order data
* @return array final fee order item request to ABRA Gen
*/
add_filter('tlw_abra_gen_conn_order_invoice_fee', function($request, $item, $order) {
return $request;
}, 10, 3);
tlw_abra_gen_conn_order_invoice_shipping
Filter hook
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 Gen.
/**
* filter hook for order/invoice shipping item sync to ABRA Gen
* @param array $request order/invoice shipping item request output to ABRA Gen
* @param obj $order eshop order data
* @return array final shipping order item request to ABRA Gen
*/
add_filter('tlw_abra_gen_conn_order_invoice_shipping', function($request, $order) {
return $request;
}, 10, 2);
tlw_abra_gen_conn_sync_product
Filter hook
Filter hook for modifying the input fields with simple or variable product data from ABRA Gen to the e-shop.
/**
* filter hook for product sync from ABRA Gen to eshop
* @param array $product_eshop product request output to eshop
* @param obj $product_abra ABRA Gen product data
* @return array final product request to eshop
*/
add_filter('tlw_abra_gen_conn_sync_product', function($product_eshop, $product_abra) {
return $product_eshop;
}, 10, 2);
tlw_abra_gen_conn_sync_product_variation
Filter hook
Filter hook for modifying the input fields with product variant data from ABRA Gen to the e-shop.
/**
* filter hook for product variation sync from ABRA Gen to eshop
* @param array $variation_eshop product variation request output to eshop
* @param obj $product_abra ABRA Gen product data
* @return array final product variation request to eshop
*/
add_filter('tlw_abra_gen_conn_sync_product_variation', function($variation_eshop, $product_abra) {
return $variation_eshop;
}, 10, 2);
tlw_abra_gen_conn_sync_customer_to_eshop
Filter hook
Filter hook for modifying the input fields with customer data from ABRA Gen to the e-shop.
/**
* filter hook for sync customer from ABRA Gen to eshop
* @param array $customer_eshop user request output to eshop
* @param obj $customer_abra ABRA Gen customer data
* @return array final customer request to eshop
*/
add_filter('tlw_abra_gen_conn_sync_customer_to_eshop', function($customer_eshop, $customer_abra) {
return $customer_eshop;
}, 10, 2);
tlw_abra_gen_conn_sync_order_firm
Filter hook
Filter hook for modifying the output fields with customer data in synced order from e-shop to ABRA Gen.
/**
* filter hook for customer data in synced order to ABRA Gen
* @param array $firm customer request output to ABRA Gen
* @param obj $order eshop order data
* @return array final customer request to ABRA Gen
*/
add_filter('tlw_abra_gen_conn_sync_order_firm', function($firm, $order) {
return $firm;
}, 10, 2);
tlw_abra_gen_conn_sync_customers_to_eshop_user
Action hook
Action hook called after synchronization of the customer from ABRA Gen to the e-shop.
/**
* action hook for running some action after customer sync from ABRA Gen to eshop
* @param int $user_id eshop user ID
* @param array $customer user request output to eshop
* @param array $customer_abra ABRA Gen customer data
* @return void
*/
add_action('tlw_wc_abra_gen_conn_sync_customers_to_eshop_user', function($user_id, $customer, $customer_abra) {
// your code
}, 10, 3);