Can you just confirm that I have done the right thing. We sell both free and paid for downloads and occasionally a customer only buys free items. Obviously we don't want the payment module to show so have changed the code so it looks like
Code: Select all
function __construct() {
global $order, $payment;
// disable the module if the order only contains virtual products
if ( 'virtual' === $GLOBALS['order']->content_type ) {
$this->enabled = false;
return;
}Steve