Developer Hooks

Developer Hooks

The action hooks filters here allow you to modify the data before data is sent to Zoho or saved in WooCommerce. Feel free to suggest more action hooks to fit make this plugin work for your business workflows. 

Notes
`cmbird_zi_order_sync_ignored_statuses`: Filter to modify the array of ignored order statuses for syncing. Default is `array( 'cancelled', 'failed', 'draft', 'trash' )`. You can add or remove statuses as needed.
Example usage:
  1. add_filter( 'cmbird_zi_order_sync_ignored_statuses', function( $statuses ) {
  2.     // Add 'on-hold' status to ignored statuses
  3.     $statuses[] = 'on-hold';
  4.     return $statuses;
  5. } );

Notes
`cmbird_zi_item_regular_price`: Filter to modify the Zoho item rate before it is saved as the WooCommerce regular price during batch item sync.
Example usage:
  1. add_filter( 'cmbird_zi_item_regular_price', function( $rate, $item, $product_id ) {
  2.     return $rate * 1.1;
  3. }, 10, 3 );

Notes
`cmbird_zi_custom_field_updated`: Action hook triggered after a Zoho custom field is updated on a product. Allows snippet code to execute custom logic in response to custom field updates.
Example usage:
  1. add_action( 'cmbird_zi_custom_field_updated', function( $pdt_id ) {
  2.     // Execute custom logic after field update
  3.     // $pdt_id: Product ID
  4. }, 10, 3 );