Hi @macsi,
Does your shop only sell in Euros? If yes, then coming up with the code snippet is quite simple:
add_filter('wpo_wcpdf_custom_attachment_condition', function( $condition, $order, $status, $template_type ) {
if ( $template_type == 'invoice' ) {
$total = $order->get_total();
if ($total < 100) {
$condition = false;
}
}
return $condition;
}, 10, 4 );
If you will deal with multiple currencies, the code snippet you’ll need will be more complex.
-
This reply was modified 5 years, 2 months ago by
Darren Peyou. Reason: forgot to add snippet
-
This reply was modified 5 years, 2 months ago by
Darren Peyou. Reason: fix mistake
Thread Starter
macsi
(@macsi)
Hi
Yes I only use Euros currency.
Thanks a lot for your efficiency 😊
Hi @macsi,
I made a little correction, removing a line that didn’t need to be there.
This line was just for testing -> var_dump($total)
Please recopy the code in my previous answer as it has been updated. 🙂
Thread Starter
macsi
(@macsi)
Great
I tell you as soon as I have tested.
Thanks again