How do I skip invoice generation altogether?

In order to skip invoice generation completely, simply add the following action to your themes  functions.php

function bewpi_skip_invoice_generation( $skip, $status, $order ) {
    // Do your stuff based on the order.

    return true; // True to skip.
add_filter( 'bewpi_skip_invoice_generation', 'bewpi_skip_invoice_generation', 10, 3 );

Please test the functionality on a development environment of your website. If it ceases to work, please revert back to the original state of your website and follow the tutorial again.

Still need help? Contact Us Contact Us