Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • In the main plugin file: ajax_event_calendar.php you will find a function, convert_date()

    in convert_date change

    function convert_date($date, $from, $to=false) {
    			// if date format is d/m/Y, modify token to 'd-m-Y' so strtotime parses date correctly
    			if (strpos($from, 'd') == 0) {
    				$date = str_replace("/", "-", $date);
    			}
    			if ($to) {
    				return date_i18n($to, strtotime($date));
    			}
    			return strtotime($date);
    		}

    To

    function convert_date($date, $from, $to=false) {
    			// if date format is d/m/Y, modify token to 'd-m-Y' so strtotime parses date correctly
    			if (strpos($from, 'd') == 0) {
    				$date = str_replace("/", "-", $date);
    			}
    			if ($to) {
    			    return date($to, strtotime($date));
    			}
    			return strtotime($date);
    		}

    This fixed the times showing up incorrectly for me.

    You’ll need to edit two files in the Woocommerce template folder.

    Copy
    wp-content/plugins/woocommerce/emails/email-order-items.php
    wp-content/plugins/woocommerce/emails/admin-new-order.php

    into the folder
    wp-content/themes/YOUR-THEME-NAME/woocommerce/emails

    in admin-new-order.php find the line
    <th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Quantity', 'woocommerce' ); ?></th>

    Add this line right after
    <th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Unit Price', 'woocommerce' ); ?></th>

    In email-order-items.php find this line
    <td style="text-align:left; vertical-align:middle; border: 1px solid #eee;"><?php echo $item['qty'] ;?></td>

    add this line right after
    <td style="text-align:left; vertical-align:middle; border: 1px solid #eee;"><?php echo $_product->get_price_html(); ?> </td>

    That should do it.

Viewing 2 replies - 1 through 2 (of 2 total)