get( 'order-tracking.is-module-enabled' ); $endpoint = $c->get( 'order-tracking.endpoint.controller' ); assert( $endpoint instanceof OrderTrackingEndpoint ); add_action( 'wc_ajax_' . OrderTrackingEndpoint::ENDPOINT, array( $endpoint, 'handle_request' ) ); if ( ! $tracking_enabled ) { return; } $asset_loader = $c->get( 'order-tracking.assets' ); assert( $asset_loader instanceof OrderEditPageAssets ); $logger = $c->get( 'woocommerce.logger.woocommerce' ); assert( $logger instanceof LoggerInterface ); add_action( 'init', array( $asset_loader, 'register' ) ); add_action( 'admin_enqueue_scripts', array( $asset_loader, 'enqueue' ) ); $meta_box_renderer = $c->get( 'order-tracking.meta-box.renderer' ); add_action( 'add_meta_boxes', static function() use ( $meta_box_renderer ) { add_meta_box( 'ppcp_order-tracking', __( 'PayPal Shipment Tracking', 'woocommerce-paypal-payments' ), array( $meta_box_renderer, 'render' ), 'shop_order', 'normal' ); }, 10, 2 ); } }