mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Listen for tracking from module
This commit is contained in:
parent
28af99e71f
commit
43095654ff
1 changed files with 9 additions and 0 deletions
|
@ -21,6 +21,7 @@ use WooCommerce\PayPalCommerce\OrderTracking\Endpoint\OrderTrackingEndpoint;
|
|||
use WooCommerce\PayPalCommerce\WcGateway\Exception\NotFoundException;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Helper\PayUponInvoiceHelper;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Settings\Settings;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Settings\SettingsListener;
|
||||
|
||||
/**
|
||||
* Class OrderTrackingModule
|
||||
|
@ -62,6 +63,14 @@ class OrderTrackingModule implements ModuleInterface {
|
|||
$settings->persist();
|
||||
}
|
||||
|
||||
/**
|
||||
* The settings listener.
|
||||
*
|
||||
* @var SettingsListener $listener
|
||||
*/
|
||||
$listener = $c->get( 'wcgateway.settings.listener' );
|
||||
$listener->listen_for_tracking_enabled();
|
||||
|
||||
$tracking_enabled = $settings->has( 'tracking_enabled' ) && $settings->get( 'tracking_enabled' );
|
||||
|
||||
if ( ! $tracking_enabled ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue