Skip to content

Instantly share code, notes, and snippets.

@dennisnissle
Last active July 14, 2025 06:38
Show Gist options
  • Select an option

  • Save dennisnissle/6274616478b7f80d65c43071c05a8ac8 to your computer and use it in GitHub Desktop.

Select an option

Save dennisnissle/6274616478b7f80d65c43071c05a8ac8 to your computer and use it in GitHub Desktop.
Prevent invoices which are paid by invoice from being marked as paid when order is completed
<?php
add_filter( 'storeabill_woo_order_is_paid', function( $is_paid, $order ) {
if ( 'invoice' === $order->get_payment_method() ) {
$is_paid = false;
}
return $is_paid;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment