Files
torebki-fabiola.pl/wp-content/plugins/flexible-invoices-woocommerce/src/PluginInvoiceIntegration.php
2026-03-05 13:07:40 +01:00

42 lines
1.1 KiB
PHP

<?php
namespace WPDesk\FlexibleInvoicesPro;
use WPDeskWCInvoicesVendor\Psr\Log\LoggerInterface;
use WPDesk\FlexibleInvoicesPro\WooCommerce\Creators\CorrectionCreator;
use WPDesk\FlexibleInvoicesPro\WooCommerce\Creators\ProformaCreator;
use WPDeskWCInvoicesVendor\WPDesk\Library\FlexibleInvoicesCore\InvoicesIntegration;
use WPDeskWCInvoicesVendor\WPDesk_Plugin_Info;
/**
* Integrate with Invoices library.
*/
class PluginInvoiceIntegration extends InvoicesIntegration {
public function __construct( WPDesk_Plugin_Info $plugin_info, LoggerInterface $logger ) {
parent::__construct( $plugin_info, $logger );
}
/**
* Set document creators.
*/
public function set_documents_creators() {
parent::set_documents_creators();
$this->add_creator(
new ProformaCreator(
$this->get_source_factory(),
__( 'Issue Proforma', 'flexible-invoices-woocommerce' ),
__( 'Proforma', 'flexible-invoices-woocommerce' )
)
);
$this->add_creator(
new CorrectionCreator(
$this->get_source_factory(),
__( 'Issue Correction', 'flexible-invoices-woocommerce' ),
__( 'Correction', 'flexible-invoices-woocommerce' )
)
);
}
}