DIY sync

WooCommerce Gram CRM Connector


List of action and filter hooks supported by the WooCommerce Gram CRM 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_gramcrm_conn_order_sync

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

tlw_gramcrm_conn_issue_slip_sync

  • filter hook for editing the output fields with issue slip data from the e-shop to Gram CRM
/**
 * filter hook for issue slip sync to Gram CRM
 * @param array $issue_slip_sync issue slip request output to Gram CRM
 * @param obj $order eshop order data
 * @return array final issue slip request output to Gram CRM
 */
add_filter('tlw_gramcrm_conn_issue_slip_sync', function($issue_slip_sync, $order) {
     return $issue_slip_sync;
}, 10, 2);

tlw_gramcrm_conn_invoice_sync

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

tlw_gramcrm_conn_proforma_invoice_sync

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

tlw_gramcrm_conn_order_item_product

  • filter hook for editing the output fields with product item data in an order or issue slip from the e-shop to Gram CRM
/**
 * filter hook for order/issue slip product item sync to Gram CRM
 * @param array $request order/issue slip product item request output to Gram CRM
 * @param obj $item eshop order item data
 * @param obj $order eshop order data
 * @param str $doc_id Gram CRM document internal id
 * @return array final order/issue slip product item request to Gram CRM
 */
add_filter('tlw_gramcrm_conn_order_item_product', function($request, $item, $order, $doc_id) {
     return $request;
}, 10, 4);

tlw_gramcrm_conn_order_item_fee

  • filter hook for editing the output fields with fee item data in the order from the e-shop to Gram CRM
/**
 * filter hook for order fee item sync to Gram CRM
 * @param array $request order fee item request output to Gram CRM
 * @param obj $item eshop order item data
 * @param obj $order eshop order data
 * @param str $doc_id Gram CRM document internal id
 * @return array final fee order item request to Gram CRM
 */
add_filter('tlw_gramcrm_conn_order_item_fee', function($request, $item, $order, $doc_id) {
     return $request;
}, 10, 4);

tlw_gramcrm_conn_order_item_shipping

  • filter hook for editing the output fields with the data of the shipping item in the order from the e-shop to Gram CRM
/**
 * filter hook for order shipping item sync to Gram CRM
 * @param array $request order shipping item request output to Gram CRM
 * @param obj $order eshop order data
 * @param str $doc_id Gram CRM document internal id
 * @return array final shipping order item request to Gram CRM
 */
add_filter('tlw_gramcrm_conn_order_item_shipping', function($request, $order, $doc_id) {
     return $request;
}, 10, 3);

tlw_gramcrm_conn_api_request_get_products

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

tlw_gramcrm_conn_sync_product

  • filter hook for editing the input fields with the data of a simple or variable product from Gram CRM to the e-shop
/**
 * filter hook for product sync from Gram CRM to eshop
 * @param array $product_eshop product request output to eshop
 * @param obj $product_gramcrm Gram CRM product data
 * @return array final product request to eshop
 */
add_filter('tlw_gramcrm_conn_sync_product', function($product_eshop, $product_gramcrm) {
    return $product_eshop;
}, 10, 2);

tlw_gramcrm_conn_sync_product_variation

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

tlw_gramcrm_conn_sync_customer_to_eshop

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

tlw_gramcrm_conn_customer_company_data

  • filter hook for editing the fields with the customer’s company data (REG NUM, VAT ID, VAT ID)
/**
 * filter hook for customer company data by eshop order
 * @param array $company_data company data
 * @param obj $order eshop order data
 * @return array final company data
 */
add_filter('tlw_gramcrm_conn_customer_company_data', function($company_data, $order) {
     return $company_data;
}, 10, 2);

tlw_gramcrm_conn_sync_order_customer

  • filter hook for editing the output fields with customer data in the order from the e-shop to Gram CRM
/**
 * filter hook for customer data in synced order to Gram CRM
 * @param array $customer customer request output to Gram CRM
 * @param obj $order eshop order data
 * @return array final customer request to Gram CRM
 */
add_filter('tlw_gramcrm_conn_sync_order_customer', function($customer, $order) {
     return $customer;
}, 10, 2);

tlw_gramcrm_conn_invoice_mail_subject

  • filter hook for editing the subject of an e-mail with an invoice sent to the customer
/**
 * filter hook for email subject with invoice
 * @param array $subject email subject
 * @param obj $order eshop order data
 * @return str final email subject
 */
add_filter('tlw_gramcrm_conn_invoice_mail_subject', function($subject, $order) {
     return $subject;
}, 10, 2);

tlw_gramcrm_conn_invoice_mail_header

  • filter hook for editing the header of an e-mail with an invoice sent to the customer
/**
 * filter hook for email header with invoice
 * @param array $header email header
 * @param obj $order eshop order data
 * @return str final email header
 */
add_filter('tlw_gramcrm_conn_invoice_mail_header', function($header, $order) {
     return $header;
}, 10, 2);

tlw_gramcrm_conn_invoice_mail_message

  • filter hook for editing the e-mail message with the invoice sent to the customer
/**
 * filter hook for email message with invoice
 * @param array $message email message
 * @param obj $order eshop order data
 * @return plain text final email message
 */
add_filter('tlw_gramcrm_conn_invoice_mail_message', function($message, $order) {
     return $message;
}, 10, 2);

tlw_gramcrm_conn_proforma_invoice_mail_subject

  • filter hook for editing the subject of an e-mail with an proforma invoice sent to the customer
/**
 * filter hook for email subject with proforma invoice
 * @param array $subject email subject
 * @param obj $order eshop order data
 * @return str final email subject
 */
add_filter('tlw_gramcrm_conn_proforma_invoice_mail_subject', function($subject, $order) {
     return $subject;
}, 10, 2);

tlw_gramcrm_conn_proforma_invoice_mail_header

  • filter hook for editing the header of the e-mail with the proforma invoice sent to the customer
/**
 * filter hook for email header with proforma invoice
 * @param array $header email header
 * @param obj $order eshop order data
 * @return str final email header
 */
add_filter('tlw_gramcrm_conn_proforma_invoice_mail_header', function($header, $order) {
     return $header;
}, 10, 2);

tlw_gramcrm_conn_proforma_invoice_mail_message

  • filter hook for editing the e-mail message with the proforma invoice sent to the customer
/**
 * filter hook for email message with proforma invoice
 * @param array $message email message
 * @param obj $order eshop order data
 * @return plain text final email message
 */
add_filter('tlw_gramcrm_conn_proforma_invoice_mail_message', function($message, $order) {
     return $message;
}, 10, 2);
Cookie settings
WooConn.sk logo

This website uses cookies so that we can provide you with the best possible experience with the use of our website. We store the information in cookies stored in your browser and thanks to them we know what interests you the most and thanks to that we can create such content that you may be interested in.

Necessary cookies

these cookies are used to ensure the operation of this website

Statistical cookies

these cookies are used to anonymously obtain information about traffic to this website