sdaland2
Forum Replies Created
-
Forum: Plugins
In reply to: [Event Calendar] Can’t modify calendar eventsIn 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.
Forum: Plugins
In reply to: [WooCommerce] Adding Unit Price to Order EmailYou’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.phpinto the folder
wp-content/themes/YOUR-THEME-NAME/woocommerce/emailsin 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.