diff --git a/includes/settings/class-wcpdf-settings-ubl.php b/includes/settings/class-wcpdf-settings-ubl.php index be05ea320..cd2dc1528 100644 --- a/includes/settings/class-wcpdf-settings-ubl.php +++ b/includes/settings/class-wcpdf-settings-ubl.php @@ -146,7 +146,7 @@ public function save_order_taxes( $order ) { public function vat_coc_required_for_ubl_invoice() { $invoice_ubl_settings = WPO_WCPDF()->settings->get_document_settings( 'invoice', 'ubl' ); - if ( isset( $invoice_ubl_settings['enabled'] ) && ( ! isset( $this->general_settings['vat_number'] ) || ! isset( $this->general_settings['coc_number'] ) ) ) { + if ( isset( $invoice_ubl_settings['enabled'] ) && ( ! isset( WPO_WCPDF()->settings->general_settings['vat_number'] ) || ! isset( WPO_WCPDF()->settings->general_settings['coc_number'] ) ) ) { $message = sprintf( /* translators: 1. General Settings, 2. UBL Settings */ __( 'You\'ve enabled UBL output for a document, but some essential details are missing. Please ensure you\'ve added your VAT and CoC numbers in the %1$s. Also, specify your tax rates in the %2$s.', 'woocommerce-pdf-invoices-packing-slips' ),