src/WooCommerce/Shop/InvoiceStatusOverviewForm.php
private function getLinksField($token)
    {
        $uri = $this->service->getInvoicePdfUri($token);
        $text = ucfirst($this->t('invoice'));
        $title = sprintf($this->t('open_as_pdf'), $text);
        /** @noinspection HtmlUnknownTarget */
        $invoiceLink = sprintf('<a class="%4$s" href="%1$s" title="%3$s">%2$s</a>', $uri, $text, $title, 'pdf');

        $uri = $this->service->getPackingSlipUri($token);
        $text = ucfirst($this->t('packing_slip'));
        $title = sprintf($this->t('open_as_pdf'), $text);
        /** @noinspection HtmlUnknownTarget */
        $packingSlipLink = sprintf('<a class="%4$s" href="%1$s" title="%3$s">%2$s</a>', $uri, $text, $title, 'pdf');

        $fields = array(
            'links' => array(
                'type' => 'markup',
                'label' => $this->t('documents'),
                'value' => "$invoiceLink $packingSlipLink",
            ),
        );
        return $fields;
    }
private function getLinksField($token)
    {
        $uri = $this->service->getInvoicePdfUri($token);
        $text = ucfirst($this->t('invoice'));
        $title = sprintf($this->t('open_as_pdf'), $text);
        /** @noinspection HtmlUnknownTarget */
        $invoiceLink = sprintf('<a class="%4$s" href="%1$s" title="%3$s">%2$s</a>', $uri, $text, $title, 'pdf');

        $uri = $this->service->getPackingSlipUri($token);
        $text = ucfirst($this->t('packing_slip'));
        $title = sprintf($this->t('open_as_pdf'), $text);
        /** @noinspection HtmlUnknownTarget */
        $packingSlipLink = sprintf('<a class="%4$s" href="%1$s" title="%3$s">%2$s</a>', $uri, $text, $title, 'pdf');

        $fields = array(
            'links' => array(
                'type' => 'markup',
                'label' => $this->t('documents'),
                'value' => "$invoiceLink $packingSlipLink",
            ),
        );
        return $fields;
    }
private function getLinksField ( $ token ) { $ uri = $ this -> service -> getInvoicePdfUri ( $ token ) ; $ text = ucfirst ( $ this -> t ( 'invoice' ) ) ; $ title = sprintf ( $ this -> t ( 'open_as_pdf' ) , $ text ) ; /** @noinspection HtmlUnknownTarget */ $ invoiceLink = sprintf ( '<a class="%4$s" href="%1$s" title="%3$s">%2$s</a>' , $ uri , $ text , $ title , 'pdf' ) ; $ uri = $ this -> service -> getPackingSlipUri ( $ token ) ; $ text = ucfirst ( $ this -> t ( 'packing_slip' ) ) ; $ title = sprintf ( $ this -> t ( 'open_as_pdf' ) , $ text ) ; /** @noinspection HtmlUnknownTarget */ $ packingSlipLink = sprintf ( '<a class="%4$s" href="%1$s" title="%3$s">%2$s</a>' , $ uri , $ text , $ title , 'pdf' ) ; $ fields = array ( 'links' => array ( 'type' => 'markup' , 'label' => $ this -> t ( 'documents' ) , 'value' => "$invoiceLink $packingSlipLink" , ) , ) ; return $ fields ; }
Returns links to the invoice and packing slip documents.

@param string $token

@return array[]
Array with form field that contains links to documents related to this
invoice.
Returns links to the invoice and packing slip documents .