• Hello guys.

    Is there any option when we can override the generation of the invoice? For example, we want to make a check before we create the invoice if this order needs invoice or receipt (here in Greece these two things are different!).

    I am looking for a hook or filter maybe.

    Thanks in advance!

Viewing 1 replies (of 1 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    Hi @dichagr

    If it’s a manual check you can always generate documents manually from the order (sidebar).

    If it’s other thing, you could always filter like this:

    add_filter( 'wpo_wcpdf_document_is_allowed', 'wpo_wcpdf_document_is_allowed', 10, 2 );
    function wpo_wcpdf_document_is_allowed ( $condition, $document ) {
    	if( $document->type == 'invoice' && $order = $document->order ) {
    		// Do your stuff
    	}
    	return $condition;
    }
    • This reply was modified 4 years, 8 months ago by alexmigf.
Viewing 1 replies (of 1 total)
  • The topic ‘Customize orders to generate Invoice’ is closed to new replies.