Skip to content

Instantly share code, notes, and snippets.

@verygoodplugins
Created August 10, 2023 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save verygoodplugins/b6fbf7287ffa187039624b6cbe19b526 to your computer and use it in GitHub Desktop.
Save verygoodplugins/b6fbf7287ffa187039624b6cbe19b526 to your computer and use it in GitHub Desktop.
Prevent the Enhanced Ecommerce addon from syncing free orders to the CRM
<?php
function wpf_dont_sync_free_orders( $order_args ) {
if ( empty( $order_args['total'] ) ) {
return false;
}
return $order_args;
}
add_filter( 'wpf_ecommerce_order_args', 'wpf_dont_sync_free_orders' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment