Hooks and Filters
16 min read
Este documento lista los hooks en PHP (filtros/acciones) y los eventos en JS para extender Flow POS sin modificar el core.
Hooks en PHP #
Productos #
flow_pos_product_categories(filter)- Cuándo: después de cargar categorías de productos para el POS.
- Args:
array $categories,array $terms. - Ejemplo:
add_filter('flow_pos_product_categories', function ($categories, $terms) { return array_values(array_filter($categories, function ($category) { return $category['slug'] !== 'uncategorized'; })); }, 10, 2);
- Cuándo: después de cargar categorías de productos para el POS.
- Args:
array $categories,array $terms. - Ejemplo:
add_filter('flow_pos_product_categories', function ($categories, $terms) { return array_values(array_filter($categories, function ($category) { return $category['slug'] !== 'uncategorized'; })); }, 10, 2); flow_pos_products_query_args(filter)- Cuándo: antes de ejecutar
WC_Product_Querypara el listado de productos. - Args:
array $query_args,array $context. - Contexto:
search,search_mode,category,page,per_page,hide_out_of_stock,is_search. - Ejemplo:
add_filter('flow_pos_products_query_args', function ($args, $context) { if (!empty($context['category'])) { $args['orderby'] = 'menu_order'; $args['order'] = 'ASC'; } return $args; }, 10, 2);
- Cuándo: antes de ejecutar
- Cuándo: antes de ejecutar
WC_Product_Querypara el listado de productos. - Args:
array $query_args,array $context. - Contexto:
search,search_mode,category,page,per_page,hide_out_of_stock,is_search. - Ejemplo:
add_filter('flow_pos_products_query_args', function ($args, $context) { if (!empty($context['category'])) { $args['orderby'] = 'menu_order'; $args['order'] = 'ASC'; } return $args; }, 10, 2); flow_pos_product_data(filter)- Cuándo: después de formatear un producto para el POS.
- Args:
array $product_data,WC_Product $product. - Ejemplo:
add_filter('flow_pos_product_data', function ($data, $product) { $data['sku'] = $product->get_sku(); return $data; }, 10, 2);
- Cuándo: después de formatear un producto para el POS.
- Args:
array $product_data,WC_Product $product. - Ejemplo:
add_filter('flow_pos_product_data', function ($data, $product) { $data['sku'] = $product->get_sku(); return $data; }, 10, 2); flow_pos_products_response(filter)- Cuándo: antes de devolver la respuesta del listado de productos.
- Args:
array $response,array $context. - Response:
products,page,total_pages. - Ejemplo:
add_filter('flow_pos_products_response', function ($response, $context) { $response['has_more'] = $response['page'] < $response['total_pages']; return $response; }, 10, 2);
- Cuándo: antes de devolver la respuesta del listado de productos.
- Args:
array $response,array $context. - Response:
products,page,total_pages. - Ejemplo:
add_filter('flow_pos_products_response', function ($response, $context) { $response['has_more'] = $response['page'] < $response['total_pages']; return $response; }, 10, 2);
Clientes #
flow_pos_customers_search_args(filter)- Cuándo: antes de cada
WP_User_Queryen la búsqueda de clientes. - Args:
array $query_args,array $context. - Contexto:
term,limit,exclude,type(search,phone,recent). - Ejemplo:
add_filter('flow_pos_customers_search_args', function ($args, $context) { if ($context['type'] === 'search') { $args['meta_query'] = isset($args['meta_query']) ? $args['meta_query'] : []; $args['meta_query'][] = [ 'key' => 'billing_country', 'value' => 'MX', ]; } return $args; }, 10, 2);
- Cuándo: antes de cada
- Cuándo: antes de cada
WP_User_Queryen la búsqueda de clientes. - Args:
array $query_args,array $context. - Contexto:
term,limit,exclude,type(search,phone,recent). - Ejemplo:
add_filter('flow_pos_customers_search_args', function ($args, $context) { if ($context['type'] === 'search') { $args['meta_query'] = isset($args['meta_query']) ? $args['meta_query'] : []; $args['meta_query'][] = [ 'key' => 'billing_country', 'value' => 'MX', ]; } return $args; }, 10, 2); flow_pos_customers_search_response(filter)- Cuándo: antes de devolver la respuesta de búsqueda.
- Args:
array $response,array $context. - Response:
customers,has_more. - Ejemplo:
add_filter('flow_pos_customers_search_response', function ($response, $context) { $response['total'] = count($response['customers']); return $response; }, 10, 2);
- Cuándo: antes de devolver la respuesta de búsqueda.
- Args:
array $response,array $context. - Response:
customers,has_more. - Ejemplo:
add_filter('flow_pos_customers_search_response', function ($response, $context) { $response['total'] = count($response['customers']); return $response; }, 10, 2); flow_pos_customer_create_payload(filter)- Cuándo: antes de validar/crear un cliente desde POS.
- Args:
array $payload,int $user_id. - Payload:
name,phone,email,billing,shipping,shipping_different. - Ejemplo:
add_filter('flow_pos_customer_create_payload', function ($payload, $user_id) { $payload['billing']['country'] = 'MX'; return $payload; }, 10, 2);
- Cuándo: antes de validar/crear un cliente desde POS.
- Args:
array $payload,int $user_id. - Payload:
name,phone,email,billing,shipping,shipping_different. - Ejemplo:
add_filter('flow_pos_customer_create_payload', function ($payload, $user_id) { $payload['billing']['country'] = 'MX'; return $payload; }, 10, 2); flow_pos_customer_response(filter)- Cuándo: antes de devolver el payload del cliente creado.
- Args:
array $customer_response,int $user_id,array $payload. - Ejemplo:
add_filter('flow_pos_customer_response', function ($customer, $user_id, $payload) { $customer['billing_email'] = $payload['billing']['email'] ?? ''; return $customer; }, 10, 3);
- Cuándo: antes de devolver el payload del cliente creado.
- Args:
array $customer_response,int $user_id,array $payload. - Ejemplo:
add_filter('flow_pos_customer_response', function ($customer, $user_id, $payload) { $customer['billing_email'] = $payload['billing']['email'] ?? ''; return $customer; }, 10, 3); flow_pos_customer_created(action)- Cuándo: después de crear un cliente.
- Args:
int $user_id,array $payload,array $customer_response. - Ejemplo:
add_action('flow_pos_customer_created', function ($user_id, $payload, $customer_response) { update_user_meta($user_id, '_flow_pos_created', '1'); }, 10, 3);
- Cuándo: después de crear un cliente.
- Args:
int $user_id,array $payload,array $customer_response. - Ejemplo:
add_action('flow_pos_customer_created', function ($user_id, $payload, $customer_response) { update_user_meta($user_id, '_flow_pos_created', '1'); }, 10, 3);
Cajas / sesiones #
flow_pos_register_open_response(filter)- Cuándo: antes de devolver la respuesta de apertura de caja.
- Args:
array $response,int $session_id,int $store_id,int $register_id,int $user_id. - Ejemplo:
add_filter('flow_pos_register_open_response', function ($response, $session_id, $store_id, $register_id, $user_id) { $response['timezone'] = wp_timezone_string(); return $response; }, 10, 5);
- Cuándo: antes de devolver la respuesta de apertura de caja.
- Args:
array $response,int $session_id,int $store_id,int $register_id,int $user_id. - Ejemplo:
add_filter('flow_pos_register_open_response', function ($response, $session_id, $store_id, $register_id, $user_id) { $response['timezone'] = wp_timezone_string(); return $response; }, 10, 5); flow_pos_register_opened(action)- Cuándo: después de abrir una caja.
- Args:
int $session_id,int $store_id,int $register_id,int $user_id,string $opening_cash. - Ejemplo:
add_action('flow_pos_register_opened', function ($session_id, $store_id, $register_id, $user_id, $opening_cash) { // custom log }, 10, 5);
- Cuándo: después de abrir una caja.
- Args:
int $session_id,int $store_id,int $register_id,int $user_id,string $opening_cash. - Ejemplo:
add_action('flow_pos_register_opened', function ($session_id, $store_id, $register_id, $user_id, $opening_cash) { // custom log }, 10, 5); flow_pos_register_close_summary(filter)- Cuándo: antes de devolver o usar el resumen de cierre.
- Args:
array $summary,array $open_session,int $user_id. - Ejemplo:
add_filter('flow_pos_register_close_summary', function ($summary, $open_session, $user_id) { $summary['expected_cash'] = max(0, (float) $summary['expected_cash']); return $summary; }, 10, 3);
- Cuándo: antes de devolver o usar el resumen de cierre.
- Args:
array $summary,array $open_session,int $user_id. - Ejemplo:
add_filter('flow_pos_register_close_summary', function ($summary, $open_session, $user_id) { $summary['expected_cash'] = max(0, (float) $summary['expected_cash']); return $summary; }, 10, 3); flow_pos_register_close_response(filter)- Cuándo: antes de devolver la respuesta de cierre.
- Args:
array $response,array $open_session,int $user_id. - Ejemplo:
add_filter('flow_pos_register_close_response', function ($response, $open_session, $user_id) { $response['closed_at'] = current_time('mysql'); return $response; }, 10, 3);
- Cuándo: antes de devolver la respuesta de cierre.
- Args:
array $response,array $open_session,int $user_id. - Ejemplo:
add_filter('flow_pos_register_close_response', function ($response, $open_session, $user_id) { $response['closed_at'] = current_time('mysql'); return $response; }, 10, 3); flow_pos_register_closed(action)- Cuándo: después de cerrar una caja.
- Args:
array $open_session,array $summary,float $closing_cash,float $cash_difference,string $notes,int $user_id. - Ejemplo:
add_action('flow_pos_register_closed', function ($open_session, $summary, $closing_cash, $cash_difference, $notes, $user_id) { // custom log }, 10, 6);
- Cuándo: después de cerrar una caja.
- Args:
array $open_session,array $summary,float $closing_cash,float $cash_difference,string $notes,int $user_id. - Ejemplo:
add_action('flow_pos_register_closed', function ($open_session, $summary, $closing_cash, $cash_difference, $notes, $user_id) { // custom log }, 10, 6);
Carritos suspendidos #
flow_pos_suspend_cart_data(filter)- Cuándo: antes de guardar un carrito como suspendido.
- Args:
array $cart_data,array $open_session,int $user_id. - Ejemplo:
add_filter('flow_pos_suspend_cart_data', function ($cart_data, $open_session, $user_id) { $cart_data['meta']['source'] = 'pos'; return $cart_data; }, 10, 3);
- Cuándo: antes de guardar un carrito como suspendido.
- Args:
array $cart_data,array $open_session,int $user_id. - Ejemplo:
add_filter('flow_pos_suspend_cart_data', function ($cart_data, $open_session, $user_id) { $cart_data['meta']['source'] = 'pos'; return $cart_data; }, 10, 3); flow_pos_cart_suspended(action)- Cuándo: después de suspender un carrito.
- Args:
string $cart_key,array $cart_data,array $open_session,int $user_id. - Ejemplo:
add_action('flow_pos_cart_suspended', function ($cart_key, $cart_data, $open_session, $user_id) { // custom log }, 10, 4);
- Cuándo: después de suspender un carrito.
- Args:
string $cart_key,array $cart_data,array $open_session,int $user_id. - Ejemplo:
add_action('flow_pos_cart_suspended', function ($cart_key, $cart_data, $open_session, $user_id) { // custom log }, 10, 4); flow_pos_suspended_carts_list(filter)- Cuándo: antes de devolver la lista de suspendidos.
- Args:
array $rows,array $open_session,int $user_id. - Ejemplo:
add_filter('flow_pos_suspended_carts_list', function ($rows, $open_session, $user_id) { return array_slice($rows, 0, 10); }, 10, 3);
- Cuándo: antes de devolver la lista de suspendidos.
- Args:
array $rows,array $open_session,int $user_id. - Ejemplo:
add_filter('flow_pos_suspended_carts_list', function ($rows, $open_session, $user_id) { return array_slice($rows, 0, 10); }, 10, 3); flow_pos_resume_cart_data(filter)- Cuándo: antes de devolver un carrito reanudado al POS.
- Args:
array $cart_data,array $row,array $open_session,int $user_id. - Ejemplo:
add_filter('flow_pos_resume_cart_data', function ($cart_data, $row, $open_session, $user_id) { unset($cart_data['meta']['internal_flag']); return $cart_data; }, 10, 4);
- Cuándo: antes de devolver un carrito reanudado al POS.
- Args:
array $cart_data,array $row,array $open_session,int $user_id. - Ejemplo:
add_filter('flow_pos_resume_cart_data', function ($cart_data, $row, $open_session, $user_id) { unset($cart_data['meta']['internal_flag']); return $cart_data; }, 10, 4); flow_pos_cart_resumed(action)- Cuándo: después de reanudar un carrito.
- Args:
string $cart_key,array $cart_data,array $open_session,int $user_id. - Ejemplo:
add_action('flow_pos_cart_resumed', function ($cart_key, $cart_data, $open_session, $user_id) { // custom log }, 10, 4);
- Cuándo: después de reanudar un carrito.
- Args:
string $cart_key,array $cart_data,array $open_session,int $user_id. - Ejemplo:
add_action('flow_pos_cart_resumed', function ($cart_key, $cart_data, $open_session, $user_id) { // custom log }, 10, 4); flow_pos_cart_voided(action)- Cuándo: después de anular un carrito suspendido.
- Args:
string $cart_key,array $open_session,int $user_id. - Ejemplo:
add_action('flow_pos_cart_voided', function ($cart_key, $open_session, $user_id) { // custom log }, 10, 3);
- Cuándo: después de anular un carrito suspendido.
- Args:
string $cart_key,array $open_session,int $user_id. - Ejemplo:
add_action('flow_pos_cart_voided', function ($cart_key, $open_session, $user_id) { // custom log }, 10, 3);
Checkout #
flow_pos_checkout_cart_data(filter)- Cuándo: antes de validar y procesar el carrito.
- Args:
array $cart_data,array $open_session,int $user_id. - Ejemplo:
add_filter('flow_pos_checkout_cart_data', function ($cart_data, $open_session, $user_id) { foreach ($cart_data['items'] as &$item) { $item['qty'] = min(99, (int) $item['qty']); } return $cart_data; }, 10, 3);
- Cuándo: antes de validar y procesar el carrito.
- Args:
array $cart_data,array $open_session,int $user_id. - Ejemplo:
add_filter('flow_pos_checkout_cart_data', function ($cart_data, $open_session, $user_id) { foreach ($cart_data['items'] as &$item) { $item['qty'] = min(99, (int) $item['qty']); } return $cart_data; }, 10, 3); flow_pos_checkout_payments_payload(filter)- Cuándo: antes de normalizar los pagos.
- Args:
array $payments_payload,array $cart_data,array $open_session,int $user_id. - Ejemplo:
add_filter('flow_pos_checkout_payments_payload', function ($payments, $cart_data, $open_session, $user_id) { return array_map(function ($payment) { $payment['reference'] = isset($payment['reference']) ? trim($payment['reference']) : ''; return $payment; }, $payments); }, 10, 4);
- Cuándo: antes de normalizar los pagos.
- Args:
array $payments_payload,array $cart_data,array $open_session,int $user_id. - Ejemplo:
add_filter('flow_pos_checkout_payments_payload', function ($payments, $cart_data, $open_session, $user_id) { return array_map(function ($payment) { $payment['reference'] = isset($payment['reference']) ? trim($payment['reference']) : ''; return $payment; }, $payments); }, 10, 4); flow_pos_checkout_order_args(filter)- Cuándo: antes de crear la orden en WooCommerce.
- Args:
array $order_args,array $cart_data,array $payments,array $open_session,int $user_id. - Ejemplo:
add_filter('flow_pos_checkout_order_args', function ($order_args, $cart_data, $payments, $open_session, $user_id) { $order_args['created_via'] = 'flow-pos'; return $order_args; }, 10, 5);
- Cuándo: antes de crear la orden en WooCommerce.
- Args:
array $order_args,array $cart_data,array $payments,array $open_session,int $user_id. - Ejemplo:
add_filter('flow_pos_checkout_order_args', function ($order_args, $cart_data, $payments, $open_session, $user_id) { $order_args['created_via'] = 'flow-pos'; return $order_args; }, 10, 5); flow_pos_checkout_completed(action)- Cuándo: después de crear la orden y la transacción.
- Args:
int $order_id,int $transaction_id,array $cart_data,array $payments,array $open_session,int $user_id. - Ejemplo:
add_action('flow_pos_checkout_completed', function ($order_id, $transaction_id, $cart_data, $payments, $open_session, $user_id) { update_post_meta($order_id, '_flow_pos_custom_flag', '1'); }, 10, 6);
- Cuándo: después de crear la orden y la transacción.
- Args:
int $order_id,int $transaction_id,array $cart_data,array $payments,array $open_session,int $user_id. - Ejemplo:
add_action('flow_pos_checkout_completed', function ($order_id, $transaction_id, $cart_data, $payments, $open_session, $user_id) { update_post_meta($order_id, '_flow_pos_custom_flag', '1'); }, 10, 6); flow_pos_checkout_response(filter)- Cuándo: antes de devolver la respuesta del checkout.
- Args:
array $response,WC_Order $order,array $cart_data,array $payments,array $open_session,int $user_id. - Ejemplo:
add_filter('flow_pos_checkout_response', function ($response, $order, $cart_data, $payments, $open_session, $user_id) { $response['receipt_url'] = $order->get_checkout_order_received_url(); return $response; }, 10, 6);
- Cuándo: antes de devolver la respuesta del checkout.
- Args:
array $response,WC_Order $order,array $cart_data,array $payments,array $open_session,int $user_id. - Ejemplo:
add_filter('flow_pos_checkout_response', function ($response, $order, $cart_data, $payments, $open_session, $user_id) { $response['receipt_url'] = $order->get_checkout_order_received_url(); return $response; }, 10, 6);
Eventos en JS #
Todos los hooks JS se emiten como CustomEvent en window.
Ejemplo:
window.addEventListener('flowPos:customer:selected', (event) => {
console.log('Cliente seleccionado', event.detail.customer);
});
Productos #
flowPos:productsLoaded- Detail:
{ products, page, totalPages, hasMore, search, searchMode, category }. - Ejemplo:
window.addEventListener('flowPos:productsLoaded', (event) => { const { products, hasMore } = event.detail; console.log(products.length, hasMore); });
- Detail:
- Detail:
{ products, page, totalPages, hasMore, search, searchMode, category }. - Ejemplo:
window.addEventListener('flowPos:productsLoaded', (event) => { const { products, hasMore } = event.detail; console.log(products.length, hasMore); }); flowPos:productsLoadFailed- Detail:
{ error, page, search, searchMode, category }. - Ejemplo:
window.addEventListener('flowPos:productsLoadFailed', (event) => { console.error(event.detail.error); });
- Detail:
- Detail:
{ error, page, search, searchMode, category }. - Ejemplo:
window.addEventListener('flowPos:productsLoadFailed', (event) => { console.error(event.detail.error); });
Carrito #
flowPos:cartChanged- Detail:
{ cart, reason }. - Reasons:
add,increase,decrease,remove,clear. - Ejemplo:
window.addEventListener('flowPos:cartChanged', (event) => { const { cart, reason } = event.detail; console.log(reason, cart?.items?.length || 0); });
- Detail:
- Detail:
{ cart, reason }. - Reasons:
add,increase,decrease,remove,clear. - Ejemplo:
window.addEventListener('flowPos:cartChanged', (event) => { const { cart, reason } = event.detail; console.log(reason, cart?.items?.length || 0); }); flowPos:cartCleared- Detail:
{ cart }. - Ejemplo:
window.addEventListener('flowPos:cartCleared', (event) => { console.log('cart cleared', event.detail.cart); });
- Detail:
- Detail:
{ cart }. - Ejemplo:
window.addEventListener('flowPos:cartCleared', (event) => { console.log('cart cleared', event.detail.cart); });
Clientes #
flowPos:customer:selected- Detail:
{ customer }. - Ejemplo:
window.addEventListener('flowPos:customer:selected', (event) => { console.log(event.detail.customer); });
- Detail:
- Detail:
{ customer }. - Ejemplo:
window.addEventListener('flowPos:customer:selected', (event) => { console.log(event.detail.customer); }); flowPos:customer:cleared- Detail:
{ customer }. - Ejemplo:
window.addEventListener('flowPos:customer:cleared', (event) => { console.log(event.detail.customer); });
- Detail:
- Detail:
{ customer }. - Ejemplo:
window.addEventListener('flowPos:customer:cleared', (event) => { console.log(event.detail.customer); }); flowPos:customer:created- Detail:
{ customer }. - Ejemplo:
window.addEventListener('flowPos:customer:created', (event) => { console.log('created', event.detail.customer); });
- Detail:
- Detail:
{ customer }. - Ejemplo:
window.addEventListener('flowPos:customer:created', (event) => { console.log('created', event.detail.customer); }); flowPos:customer:searchResults- Detail:
{ term, customers, hasMore, append }. - Ejemplo:
window.addEventListener('flowPos:customer:searchResults', (event) => { const { term, customers } = event.detail; console.log(term, customers.length); });
- Detail:
- Detail:
{ term, customers, hasMore, append }. - Ejemplo:
window.addEventListener('flowPos:customer:searchResults', (event) => { const { term, customers } = event.detail; console.log(term, customers.length); }); flowPos:customer:searchFailed- Detail:
{ term, message }. - Ejemplo:
window.addEventListener('flowPos:customer:searchFailed', (event) => { console.error(event.detail.term, event.detail.message); });
- Detail:
- Detail:
{ term, message }. - Ejemplo:
window.addEventListener('flowPos:customer:searchFailed', (event) => { console.error(event.detail.term, event.detail.message); });
Checkout #
flowPos:checkout:before- Detail:
{ cart, payments }. - Ejemplo:
window.addEventListener('flowPos:checkout:before', (event) => { console.log(event.detail.cart, event.detail.payments); });
- Detail:
- Detail:
{ cart, payments }. - Ejemplo:
window.addEventListener('flowPos:checkout:before', (event) => { console.log(event.detail.cart, event.detail.payments); }); flowPos:checkout:after- Detail:
{ orderId, summary }. - Ejemplo:
window.addEventListener('flowPos:checkout:after', (event) => { console.log(event.detail.orderId); });
- Detail:
- Detail:
{ orderId, summary }. - Ejemplo:
window.addEventListener('flowPos:checkout:after', (event) => { console.log(event.detail.orderId); });
Carritos suspendidos #
flowPos:suspended:created- Detail:
{ cartKey, cart }. - Ejemplo:
window.addEventListener('flowPos:suspended:created', (event) => { console.log(event.detail.cartKey); });
- Detail:
- Detail:
{ cartKey, cart }. - Ejemplo:
window.addEventListener('flowPos:suspended:created', (event) => { console.log(event.detail.cartKey); }); flowPos:suspended:list- Detail:
{ carts }. - Ejemplo:
window.addEventListener('flowPos:suspended:list', (event) => { console.log(event.detail.carts.length); });
- Detail:
- Detail:
{ carts }. - Ejemplo:
window.addEventListener('flowPos:suspended:list', (event) => { console.log(event.detail.carts.length); }); flowPos:suspended:resumed- Detail:
{ cartKey, cart }. - Ejemplo:
window.addEventListener('flowPos:suspended:resumed', (event) => { console.log(event.detail.cartKey); });
- Detail:
- Detail:
{ cartKey, cart }. - Ejemplo:
window.addEventListener('flowPos:suspended:resumed', (event) => { console.log(event.detail.cartKey); }); flowPos:suspended:voided- Detail:
{ cartKey }. - Ejemplo:
window.addEventListener('flowPos:suspended:voided', (event) => { console.log(event.detail.cartKey); });
- Detail:
- Detail:
{ cartKey }. - Ejemplo:
window.addEventListener('flowPos:suspended:voided', (event) => { console.log(event.detail.cartKey); });
Sesiones #
flowPos:session:contextLoaded- Detail:
{ hasSession, sessionContext, stores, registers }. - Ejemplo:
window.addEventListener('flowPos:session:contextLoaded', (event) => { console.log(event.detail.hasSession); });
- Detail:
- Detail:
{ hasSession, sessionContext, stores, registers }. - Ejemplo:
window.addEventListener('flowPos:session:contextLoaded', (event) => { console.log(event.detail.hasSession); }); flowPos:session:opened- Detail:
{ sessionId, sessionContext }. - Ejemplo:
window.addEventListener('flowPos:session:opened', (event) => { console.log(event.detail.sessionId); });
- Detail:
- Detail:
{ sessionId, sessionContext }. - Ejemplo:
window.addEventListener('flowPos:session:opened', (event) => { console.log(event.detail.sessionId); }); flowPos:session:closed- Detail:
{ sessionId, summary, closingCash, cashDifference }. - Ejemplo:
window.addEventListener('flowPos:session:closed', (event) => { console.log(event.detail.sessionId, event.detail.summary); });
- Detail:
- Detail:
{ sessionId, summary, closingCash, cashDifference }. - Ejemplo:
window.addEventListener('flowPos:session:closed', (event) => { console.log(event.detail.sessionId, event.detail.summary); }); flowPosSessionContextChanged- Detail:
{ storeId, registerId, sessionId, hasSession, defaultPrimaryColor, ... }. - Ejemplo:
window.addEventListener('flowPosSessionContextChanged', (event) => { console.log(event.detail.hasSession); });
- Detail:
- Detail:
{ storeId, registerId, sessionId, hasSession, defaultPrimaryColor, ... }. - Ejemplo:
window.addEventListener('flowPosSessionContextChanged', (event) => { console.log(event.detail.hasSession); });