| @@ -16,9 +16,8 @@ | ||
| 16 | 16 | use Packetery\Latte\Engine; |
| 17 | 17 | use Packetery\Module\Dashboard\DashboardPage; |
| 18 | 18 | use Packetery\Module\EntityFactory; |
| 19 | 19 | use Packetery\Module\MessageManager; |
| 20 | -use Packetery\Module\Options\OptionsProvider; | |
| 21 | 20 | use Packetery\Module\Plugin; |
| 22 | 21 | use Packetery\Module\Transients; |
| 23 | 22 | use Packetery\Module\Views\UrlBuilder; |
| 24 | 23 | use Packetery\Nette\Http; |
| @@ -86,13 +85,8 @@ | ||
| 86 | 85 | * @var UrlBuilder |
| 87 | 86 | */ |
| 88 | 87 | private $urlBuilder; |
| 89 | 88 | |
| 90 | - /** | |
| 91 | - * @var OptionsProvider | |
| 92 | - */ | |
| 93 | - private $optionsProvider; | |
| 94 | - | |
| 95 | 89 | public function __construct( |
| 96 | 90 | Engine $latteEngine, |
| 97 | 91 | Http\Request $httpRequest, |
| 98 | 92 | Client $soapApiClient, |
| @@ -99,10 +93,9 @@ | ||
| 99 | 93 | MessageManager $messageManager, |
| 100 | 94 | EntityFactory\Address $addressFactory, |
| 101 | 95 | Repository $orderRepository, |
| 102 | 96 | PacketActionsCommonLogic $packetActionsCommonLogic, |
| 103 | - UrlBuilder $urlBuilder, | |
| 104 | - OptionsProvider $optionsProvider | |
| 97 | + UrlBuilder $urlBuilder | |
| 105 | 98 | ) { |
| 106 | 99 | $this->latteEngine = $latteEngine; |
| 107 | 100 | $this->httpRequest = $httpRequest; |
| 108 | 101 | $this->soapApiClient = $soapApiClient; |
| @@ -110,9 +103,8 @@ | ||
| 110 | 103 | $this->addressFactory = $addressFactory; |
| 111 | 104 | $this->orderRepository = $orderRepository; |
| 112 | 105 | $this->commonLogic = $packetActionsCommonLogic; |
| 113 | 106 | $this->urlBuilder = $urlBuilder; |
| 114 | - $this->optionsProvider = $optionsProvider; | |
| 115 | 107 | } |
| 116 | 108 | |
| 117 | 109 | /** |
| 118 | 110 | * Generates id of transient to store order ids. |
| @@ -180,20 +172,19 @@ | ||
| 180 | 172 | $storeAddress = $this->addressFactory->fromWcStoreOptions(); |
| 181 | 173 | $this->latteEngine->render( |
| 182 | 174 | PACKETERY_PLUGIN_DIR . '/template/order/collection-print.latte', |
| 183 | 175 | [ |
| 184 | - 'storeAddress' => $storeAddress, | |
| 185 | - 'storeName' => get_option( 'blogname', '' ), | |
| 186 | - 'shipmentBarcodeText' => $shipmentResult->getSimpleBarcodeText(), | |
| 187 | - 'shipmentBarcode' => $shipmentBarcodeResult->getImageContent(), | |
| 188 | - 'orders' => $orders, | |
| 189 | - 'packetIds' => $packetIds, | |
| 190 | - 'wpOrders' => $wpOrders, | |
| 191 | - 'orderCount' => count( $packetIds ), | |
| 192 | - 'printedAt' => ( new \DateTimeImmutable() )->setTimezone( wp_timezone() ), | |
| 193 | - 'stylesheet' => $this->urlBuilder->buildAssetUrl( 'public/css/order-collection-print.css' ), | |
| 194 | - 'showConsignPasswordForZBox' => $this->optionsProvider->isShowConsignPasswordForZBoxEnabled(), | |
| 195 | - 'translations' => [ | |
| 176 | + 'storeAddress' => $storeAddress, | |
| 177 | + 'storeName' => get_option( 'blogname', '' ), | |
| 178 | + 'shipmentBarcodeText' => $shipmentResult->getSimpleBarcodeText(), | |
| 179 | + 'shipmentBarcode' => $shipmentBarcodeResult->getImageContent(), | |
| 180 | + 'orders' => $orders, | |
| 181 | + 'packetIds' => $packetIds, | |
| 182 | + 'wpOrders' => $wpOrders, | |
| 183 | + 'orderCount' => count( $packetIds ), | |
| 184 | + 'printedAt' => ( new \DateTimeImmutable() )->setTimezone( wp_timezone() ), | |
| 185 | + 'stylesheet' => $this->urlBuilder->buildAssetUrl( 'public/css/order-collection-print.css' ), | |
| 186 | + 'translations' => [ | |
| 196 | 187 | 'handoverPacketsHeading' => __( 'Handover packets', 'packeta' ), |
| 197 | 188 | 'packetCount' => __( 'Packet count', 'packeta' ), |
| 198 | 189 | 'printedAt' => __( 'Printed at', 'packeta' ), |
| 199 | 190 | 'sender' => __( 'Sender', 'packeta' ), |
| @@ -199,9 +190,8 @@ | ||
| 199 | 190 | 'sender' => __( 'Sender', 'packeta' ), |
| 200 | 191 | 'recipient' => __( 'Recipient', 'packeta' ), |
| 201 | 192 | 'orderNumber' => __( 'Order number', 'packeta' ), |
| 202 | 193 | 'barcode' => __( 'Barcode', 'packeta' ), |
| 203 | - 'zboxConsignPassword' => __( 'Consignment code', 'packeta' ), | |
| 204 | 194 | 'created' => __( 'Created', 'packeta' ), |
| 205 | 195 | 'nameAndSurname' => __( 'Name and surname', 'packeta' ), |
| 206 | 196 | 'cod' => __( 'C.O.D.', 'packeta' ), |
| 207 | 197 | 'pickUpPointOrCarrier' => __( 'Pickup point or carrier', 'packeta' ), |