Initial theme import

This commit is contained in:
3wc
2024-05-08 17:15:09 -03:00
parent 15fd8ed889
commit 8bfea394b6
154 changed files with 9077 additions and 1 deletions

View File

@ -0,0 +1,49 @@
<?php
// every / every 2nd / every 3rd...
$intervals = apply_filters( 'jgtb_change_intervals', wcs_get_subscription_period_interval_strings(), $subscription );
// day / week / month / year
$periods = apply_filters( 'jgtb_change_periods', wcs_get_available_time_periods(), $subscription );
?>
<tr>
<td>
<p><?php esc_html_e( 'Change Frequency', 'jg-toolbox' ); ?></p>
</td>
<td>
<?php
if ( 'cancelled' !== $subscription->get_status() ) {
echo ( isset( $embed_form ) && $embed_form ) ? '<form action="" method="POST">' : '';
wp_nonce_field( 'change_frequency_' . $subscription->get_id() . $subscription->get_billing_interval() . $subscription->get_billing_period(), 'jgtb_change_frequency_nonce', false );
?>
<select name="new_interval" id="new_interval">
<?php
foreach ( $intervals as $interval => $label ) {
?>
<option value="<?php echo esc_attr( $interval ); ?>" <?php selected( $subscription->get_billing_interval(), $interval ); ?>><?php echo esc_html( $label ); ?></option>
<?php
}
?>
</select>
<select name="new_period" id="new_period">
<?php
foreach ( $periods as $period => $label ) {
?>
<option value="<?php echo esc_attr( $period ); ?>" <?php selected( $subscription->get_billing_period(), $period ); ?>><?php echo esc_html( $label ); ?></option>
<?php
}
?>
</select>
<?php
echo ( isset( $embed_form ) && $embed_form ) ? '<button type="submit">' . esc_html_x( 'Go', 'Button to submit date change', 'jg-toolbox' ) . '</button></form>' : '';
} else {
?>
<label>
<?php echo esc_html( $options[ $subscription->get_billing_interval() ] ); ?>
</label>
<?php
}
?>
</td>
</tr>
<?php

View File

@ -0,0 +1,36 @@
<?php
/**
* This template is used to display the next payment date on the view subscription page and edit subscription page.
* On the view subscription page a form is added along with a "Go" button so any date changes can be saved.
*
* This template is called from:
* - templates/myaccount/edit-subscription.php
* - inc/RescheduleNextRenewal.php
*
*/
$current_date = $subscription->get_date( 'next_payment', 'site' ); ?>
<tr>
<td>
<p><?php echo esc_html( apply_filters( 'jgtb_change_next_shipping_date_wording', __( 'Change Next Payment Date', 'jg-toolbox' ) ) ); ?></p>
</td>
<td>
<?php
if ( 'cancelled' !== $subscription->get_status() ) {
echo ( isset( $embed_form ) && $embed_form ) ? '<form action="" method="POST">' : '';
wp_nonce_field( 'change_next_ship_date_' . $subscription->get_id() . $current_date, 'jgtb_nonce', false );
?>
<input type="hidden" name="nsd_subscription_id" value="<?php echo esc_attr( $subscription->get_id() ); ?>">
<input type="hidden" name="old_ship_date" value="<?php echo esc_attr( substr( $current_date, 0, 10 ) ); ?>">
<input type="text" name="new_ship_date" id="pickadate" value="<?php echo esc_attr( substr( $current_date, 0, 10 ) ); ?>">
<?php
echo ( isset( $embed_form ) && $embed_form ) ? '<button type="submit">' . esc_html__( 'Go', 'jg-toolbox' ) . '</button></form>' : ''; // phpcs:ignore.
} else {
?>
<label type="text" name="new_ship_date" >
<?php esc_html_e( 'None', 'jg-toolbox' ); ?>
</label>
<?php
}
?>
</td>
</tr>

View File

@ -0,0 +1,81 @@
<?php
/**
* My Account Dashboard
*
* Shows the first intro screen on the account dashboard.
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/dashboard.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
* @version 4.4.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
$allowed_html = array(
'a' => array(
'href' => array(),
),
);
?>
<p>
<?php
printf(
/* translators: 1: user display name 2: logout url */
wp_kses( __( 'Hello %1$s (not %1$s? <a href="%2$s">Log out</a>)', 'woocommerce' ), $allowed_html ),
'<strong>' . esc_html( $current_user->display_name ) . '</strong>',
esc_url( wc_logout_url() )
);
?>
</p>
<p>
<?php
/* translators: 1: Orders URL 2: Address URL 3: Account URL. */
$dashboard_desc = __( 'From your account dashboard you can view your <a href="%1$s">recent orders</a>, manage your <a href="%2$s">billing address</a>, and <a href="%3$s">edit your password and account details</a>.', 'woocommerce' );
if ( wc_shipping_enabled() ) {
/* translators: 1: Orders URL 2: Addresses URL 3: Account URL. */
$dashboard_desc = __( 'From your account dashboard you can view your <a href="%1$s">recent orders</a>, manage your <a href="%2$s">shipping and billing addresses</a>, and <a href="%3$s">edit your password and account details</a>.', 'woocommerce' );
}
printf(
wp_kses( $dashboard_desc, $allowed_html ),
esc_url( wc_get_endpoint_url( 'orders' ) ),
esc_url( wc_get_endpoint_url( 'edit-address' ) ),
esc_url( wc_get_endpoint_url( 'edit-account' ) )
);
?>
</p>
<?php
/**
* My Account dashboard.
*
* @since 2.6.0
*/
do_action( 'woocommerce_account_dashboard' );
/**
* Deprecated woocommerce_before_my_account action.
*
* @deprecated 2.6.0
*/
do_action( 'woocommerce_before_my_account' );
/**
* Deprecated woocommerce_after_my_account action.
*
* @deprecated 2.6.0
*/
do_action( 'woocommerce_after_my_account' );
/* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */

View File

@ -0,0 +1,46 @@
<?php
/**
* Downloads
*
* Shows downloads on the account page.
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/downloads.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
* @version 3.2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$downloads = WC()->customer->get_downloadable_products();
$has_downloads = (bool) $downloads;
do_action( 'woocommerce_before_account_downloads', $has_downloads ); ?>
<?php if ( $has_downloads ) : ?>
<?php do_action( 'woocommerce_before_available_downloads' ); ?>
<?php do_action( 'woocommerce_available_downloads', $downloads ); ?>
<?php do_action( 'woocommerce_after_available_downloads' ); ?>
<?php else : ?>
<div class="woocommerce-Message woocommerce-Message--info woocommerce-info">
<a class="woocommerce-Button button" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
<?php esc_html_e( 'Browse products', 'woocommerce' ); ?>
</a>
<?php esc_html_e( 'No downloads available yet.', 'woocommerce' ); ?>
</div>
<?php endif; ?>
<?php do_action( 'woocommerce_after_account_downloads', $has_downloads ); ?>

View File

@ -0,0 +1,29 @@
<?php
/**
* Edit address form without the form tags
*
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$page_title = ( 'billing' === $load_address ) ? __( 'Billing Address', 'jg-toolbox' ) : __( 'Shipping Address', 'jg-toolbox' );
if ( ! $load_address ) {
wc_get_template( 'myaccount/my-address.php' );
} else {
?>
<h3>
<?php echo esc_html( apply_filters( 'woocommerce_my_account_edit_address_title', $page_title ) ); ?>
</h3>
<?php
do_action( "woocommerce_before_edit_address_form_{$load_address}" );
foreach ( $address as $key => $field ) {
woocommerce_form_field( $key, $field, ! empty( $_POST[ $key ] ) ? wc_clean( $_POST[ $key ] ) : $field['value'] ); // phpcs: ignore.
}
do_action( "woocommerce_after_edit_address_form_{$load_address}" );
}

View File

@ -0,0 +1,126 @@
<?php
namespace Javorszky\Toolbox;
use WCS_Remove_Item;
?>
<table class="shop_table order_details">
<thead>
<tr>
<?php
if ( $allow_remove_item ) {
?>
<th class="product-remove" style="width: 3em;">&nbsp;</th>
<?php
}
?>
<th class="product-name"><?php echo esc_html_x( 'Product', 'table headings in notification email', 'jg-toolbox' ); ?></th>
<th class="product-total"><?php echo esc_html_x( 'Total', 'table heading', 'jg-toolbox' ); ?></th>
</tr>
</thead>
<tbody>
<?php
$subscription_items = $subscription->get_items();
if ( count( $subscription_items ) > 0 ) {
foreach ( $subscription_items as $item_id => $item ) {
$_product = apply_filters( 'woocommerce_subscriptions_order_item_product', $item->get_product(), $item );
if ( apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
?>
<tr class="<?php echo esc_attr( apply_filters( 'woocommerce_order_item_class', 'order_item', $item, $subscription ) ); ?>">
<?php if ( $allow_remove_item ) : ?>
<td class="remove_item"><a href="<?php echo esc_url( WCS_Remove_Item::get_remove_url( $subscription->get_id(), $item_id ) ); ?>" class="remove" onclick="return confirm('<?php printf( esc_html__( 'Are you sure you want remove this item from your subscription?', 'jg-toolbox' ) ); ?>' );">&times;</a></td>
<?php endif; ?>
<td class="product-name">
<?php
$can_change_products = false;
if ( ( 'no' !== $allow_change_variation ) && $_product && 'variation' === $_product->get_type() ) {
$parent_id = $_product->get_parent_id();
$parent = wc_get_product( $parent_id );
$can_change_products = true;
$prices = array();
?>
<select name="sp_new_variation[<?php echo esc_attr( $item_id ); ?>]">
<?php
foreach ( $parent->get_children() as $children_id ) {
$children = wc_get_product( $children_id );
?>
<option <?php selected( $children_id, absint( $item['variation_id'] ), true ); ?> value="<?php echo esc_attr( $children_id ); ?>"><?php echo $children->get_formatted_name(); ?></option>
<?php
}
?>
</select>
<?php
}
if ( ! $can_change_products ) {
if ( $_product && ! $_product->is_visible() ) {
echo esc_html( apply_filters( 'woocommerce_order_item_name', $item['name'], $item ) );
} else {
echo wp_kses_post( apply_filters( 'woocommerce_order_item_name', sprintf( '<a href="%s">%s</a>', get_permalink( $item['product_id'] ), $item['name'] ), $item ) );
}
}
?>
<strong class="product-quantity">
&times;
<?php
if ( 'no' !== $allow_edit_qty ) {
?>
<input type="number" name="new_quantity_<?php echo esc_attr( $item_id ); ?>" min="0" step="1" max="999" value="<?php echo esc_attr( $item['qty'] ); ?>" style="display: inline-block;width: 4rem">
<?php
} else {
echo esc_html( $item->get_quantity() );
}
?>
</strong>
<?php
// Allow other plugins to add additional product information here
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $subscription );
do_action( 'jgtb_woocommerce_order_item_meta_start', $item_id, $item, $subscription );
$item->get_formatted_meta_data();
if ( $_product && $_product->exists() && $_product->is_downloadable() && $subscription->is_download_permitted() ) {
$download_files = $subscription->get_item_downloads( $item );
$i = 0;
$links = array();
foreach ( $download_files as $download_id => $file ) {
$i++;
// translators: %1$s is the number of the file, %2$s: the name of the file
$link_text = sprintf( _nx( 'Download file %1$s: %2$s', 'Download file %1$s: %2$s', count( $download_files ), 'Used as link text in view-subscription template', 'jg-toolbox' ), $i, $file['name'] );
$links[] = '<small><a href="' . esc_url( $file['download_url'] ) . '">' . esc_html( $link_text ) . '</a></small>';
}
echo '<br/>' . wp_kses_post( implode( '<br/>', $links ) );
}
// Allow other plugins to add additional product information here
do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $subscription );
do_action( 'jgtb_woocommerce_order_item_meta_end', $item_id, $item, $subscription, $allow_edit_qty );
?>
</td>
<td class="product-total">
<?php echo wp_kses_post( $subscription->get_formatted_line_subtotal( $item ) ); ?>
</td>
</tr>
<?php
}
$purchase_note = $_product->get_meta( '_purchase_note', true );
if ( $subscription->has_status( array( 'completed', 'processing' ) ) && $purchase_note ) {
?>
<tr class="product-purchase-note">
<td colspan="3"><?php echo wp_kses_post( wpautop( do_shortcode( $purchase_note ) ) ); ?></td>
</tr>
<?php
}
}
}
?>
</tbody>
</table>

View File

@ -0,0 +1,191 @@
<?php
namespace Javorszky\Toolbox;
/**
* Edit Subscription
*
* Makes the details of a particular subscription editable
*
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
if ( empty( $subscription ) ) {
global $wp;
$error_message = '<div class="woocommerce-error">' . esc_html__( 'Invalid Subscription.', 'jg-toolbox' ) . ' <a href="' . esc_url( wc_get_page_permalink( 'myaccount' ) ) . '" class="wc-forward">' . esc_html( 'My Account' ) . '</a></div>';
if ( ! isset( $wp->query_vars[ JGTB_EDIT_SUB_ENDPOINT ] ) || ! current_user_can( 'view_order', absint( $wp->query_vars[ JGTB_EDIT_SUB_ENDPOINT ] ) ) ) {
echo $error_message;
return;
}
$subscription = wcs_get_subscription( absint( $wp->query_vars[ JGTB_EDIT_SUB_ENDPOINT ] ) );
if ( ! $subscription || ( is_callable( array( $subscription, 'get_type' ) ) && 'shop_subscription' !== $subscription->get_type() ) ) {
echo $error_message;
return;
}
}
wc_print_notices();
?>
<form action="<?php echo esc_url( wc_get_endpoint_url( 'view-subscription', $subscription->get_id(), wc_get_page_permalink( 'myaccount' ) ) ); ?>" method="POST">
<table class="shop_table subscription_details">
<tr>
<td><?php esc_html_e( 'Status', 'jg-toolbox' ); ?></td>
<td><?php echo esc_html( wcs_get_subscription_status_name( $subscription->get_status() ) ); ?></td>
</tr>
<tr>
<td><?php echo esc_html_x( 'Start Date', 'table heading', 'jg-toolbox' ); ?></td>
<td><?php echo esc_html( $subscription->get_date_to_display( 'date_created' ) ); ?></td>
</tr>
<input type="hidden" name="edit_subscription_id" value="<?php echo esc_attr( $subscription->get_id() ); ?>">
<?php
foreach ( array(
'last_order_date_paid' => _x( 'Last Payment Date', 'admin subscription table header', 'jg-toolbox' ),
'next_payment' => _x( 'Next Payment Date', 'admin subscription table header', 'jg-toolbox' ),
'end' => _x( 'End Date', 'table heading', 'jg-toolbox' ),
'trial_end' => _x( 'Trial End Date', 'admin subscription table header', 'jg-toolbox' ),
) as $date_type => $date_title ) {
$date = $subscription->get_date( $date_type );
if ( ! empty( $date ) ) {
?>
<tr>
<td><?php echo esc_html( $date_title ); ?></td>
<td><?php echo esc_html( $subscription->get_date_to_display( $date_type ) ); ?></td>
</tr>
<?php
}
}
$allow_frequency_change = apply_filters( 'jgtb_allow_edit_freq_for_subscription', get_option( JGTB_OPTION_PREFIX . 'freq_change_edit_sub_details', 'yes' ), $subscription );
if ( 'no' !== $allow_frequency_change ) {
// get change frequency markup
wc_get_template( 'myaccount/choose-new-frequency.php', array( 'subscription' => $subscription ), '', JGTB_PATH . 'templates/' );
}
$allow_date_change = apply_filters( 'jgtb_allow_edit_date_for_subscription', 'yes', $subscription );
if ( Utilities\is_change_next_payment_available() && 'yes' === $allow_date_change ) {
// Get change next date markup
wc_get_template(
'myaccount/choose-next-ship-date.php',
array(
'subscription' => $subscription,
'embed_form' => false,
),
'',
JGTB_PATH . 'templates/'
);
}
?>
</table>
<header>
<h2><?php echo esc_html_x( 'Products', 'Heading on the edit subscription details page.', 'jg-toolbox' ); ?></h2>
</header>
<?php
$allow_remove_item = wcs_can_items_be_removed( $subscription );
// The value of this is either (string) 'no', or anything else. The value is a binary 'yes' / 'no'. The code checks if it's not 'no' in the rest of the plugin
$allow_edit_qty = apply_filters( 'jgtb_allow_edit_qty_for_subscription', get_option( JGTB_OPTION_PREFIX . 'qty_change_edit_sub_details', 'yes' ), $subscription );
// Are variation changes allowed?
$allow_variation_change = apply_filters( 'jgtb_allow_edit_variation_for_subscription', get_option( JGTB_OPTION_PREFIX . 'variation_change_edit_sub_details', 'no' ), $subscription );
wc_get_template(
'myaccount/edit-subscription-products.php',
array(
'subscription' => $subscription,
'allow_remove_item' => $allow_remove_item,
'allow_edit_qty' => $allow_edit_qty,
'allow_change_variation' => $allow_variation_change,
),
'',
JGTB_PATH . 'templates/'
);
?>
<header>
<h2><?php echo esc_html_x( 'Customer details', 'Heading on the edit subscription details page', 'jg-toolbox' ); ?></h2>
</header>
<table class="shop_table shop_table_responsive customer_details">
<?php
if ( $subscription->get_billing_email() ) {
// translators: there is markup here, hence can't use Email: %s
echo '<tr><th>' . esc_html_x( 'Email', 'heading in customer details on subscription detail page', 'jg-toolbox' ) . '</th><td data-title="' . esc_attr_x( 'Email', 'Used in data attribute for a td tag, escaped.', 'jg-toolbox' ) . '">' . esc_html( $subscription->get_billing_email() ) . '</td></tr>';
}
if ( $subscription->get_billing_phone() ) {
// translators: there is markup here, hence can't use Email: %s
echo '<tr><th>' . esc_html_x( 'Tel', 'heading in customer details on subscription detail page', 'jg-toolbox' ) . '</th><td data-title="' . esc_attr_x( 'Telephone', 'Used in data attribute for a td tag, escaped.', 'jg-toolbox' ) . '">' . esc_html( $subscription->get_billing_phone() ) . '</td></tr>';
}
// Additional customer details hook
do_action( 'woocommerce_order_details_after_customer_details', $subscription );
?>
</table>
<?php if ( ! wc_ship_to_billing_address_only() && $subscription->needs_shipping_address() && get_option( 'woocommerce_calc_shipping' ) !== 'no' ) : ?>
<div class="col2-set addresses">
<div class="col-1">
<?php endif; ?>
<address>
<?php
$billing_address = get_address( $subscription, 'billing' );
wc_get_template(
'myaccount/edit-subscription-address.php',
array(
'load_address' => 'billing',
'address' => $billing_address,
),
'',
JGTB_PATH . 'templates/'
);
?>
</address>
<?php if ( ! wc_ship_to_billing_address_only() && $subscription->needs_shipping_address() && get_option( 'woocommerce_calc_shipping' ) !== 'no' ) : ?>
</div><!-- /.col-1 -->
<div class="col-2">
<address>
<?php
$shipping_address = get_address( $subscription, 'shipping' );
wc_get_template(
'myaccount/edit-subscription-address.php',
array(
'load_address' => 'shipping',
'address' => $shipping_address,
),
'',
JGTB_PATH . 'templates/'
);
?>
</address>
</div><!-- /.col-2 -->
</div><!-- /.col2-set -->
<?php endif; ?>
<div class="clear"></div>
<input type="hidden" name="jgtb_edit_subscription_details" value="<?php echo esc_attr( $subscription->get_id() ); ?>">
<?php wp_nonce_field( 'wcs_edit_details_of_' . $subscription->get_id(), 'jgtb_edit_details_of_' . $subscription->get_id() ); ?>
<button type="submit" name="edit-subscription-button" value=1><?php echo esc_html_x( 'Save Details', 'Button text on Edit Subscription page', 'jg-toolbox' ); ?></button>
</form>

View File

@ -0,0 +1,61 @@
<?php
/**
* Add payment method form form
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-add-payment-method.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
* @version 7.0.1
*/
defined( 'ABSPATH' ) || exit;
$available_gateways = WC()->payment_gateways->get_available_payment_gateways();
if ( $available_gateways ) : ?>
<form id="add_payment_method" method="post">
<div id="payment" class="woocommerce-Payment">
<ul class="woocommerce-PaymentMethods payment_methods methods">
<?php
// Chosen Method.
if ( count( $available_gateways ) ) {
current( $available_gateways )->set_current();
}
foreach ( $available_gateways as $gateway ) {
?>
<li class="woocommerce-PaymentMethod woocommerce-PaymentMethod--<?php echo esc_attr( $gateway->id ); ?> payment_method_<?php echo esc_attr( $gateway->id ); ?>">
<input id="payment_method_<?php echo esc_attr( $gateway->id ); ?>" type="radio" class="input-radio" name="payment_method" value="<?php echo esc_attr( $gateway->id ); ?>" <?php checked( $gateway->chosen, true ); ?> />
<label for="payment_method_<?php echo esc_attr( $gateway->id ); ?>"><?php echo wp_kses_post( $gateway->get_title() ); ?> <?php echo wp_kses_post( $gateway->get_icon() ); ?></label>
<?php
if ( $gateway->has_fields() || $gateway->get_description() ) {
echo '<div class="woocommerce-PaymentBox woocommerce-PaymentBox--' . esc_attr( $gateway->id ) . ' payment_box payment_method_' . esc_attr( $gateway->id ) . '" style="display: none;">';
$gateway->payment_fields();
echo '</div>';
}
?>
</li>
<?php
}
?>
</ul>
<?php do_action( 'woocommerce_add_payment_method_form_bottom' ); ?>
<div class="form-row">
<?php wp_nonce_field( 'woocommerce-add-payment-method', 'woocommerce-add-payment-method-nonce' ); ?>
<button type="submit" class="woocommerce-Button woocommerce-Button--alt button alt<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" id="place_order" value="<?php esc_attr_e( 'Add payment method', 'woocommerce' ); ?>"><?php esc_html_e( 'Add payment method', 'woocommerce' ); ?></button>
<input type="hidden" name="woocommerce_add_payment_method" id="woocommerce_add_payment_method" value="1" />
</div>
</div>
</form>
<?php else : ?>
<p class="woocommerce-notice woocommerce-notice--info woocommerce-info"><?php esc_html_e( 'New payment methods can only be added during checkout. Please contact us if you require assistance.', 'woocommerce' ); ?></p>
<?php endif; ?>

View File

@ -0,0 +1,127 @@
<?php
/**
* Edit account form
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-edit-account.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
* @version 7.0.1
*/
defined( 'ABSPATH' ) || exit;
do_action( 'woocommerce_before_edit_account_form' ); ?>
<form class="woocommerce-EditAccountForm edit-account" action="" method="post" <?php do_action( 'woocommerce_edit_account_form_tag' ); ?> >
<?php do_action( 'woocommerce_edit_account_form_start' ); ?>
<table class="woocommerce-orders-table woocommerce-MyAccount-orders shop_table shop_table_responsive my_account_orders account-orders-table">
<tr>
<td width="50%">
<p span class="myaccounttable">
<label for="account_first_name"><?php esc_html_e( 'First name', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label></p>
</td>
<td width="50%">
<p span class="myaccounttable">
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="account_first_name" id="account_first_name" autocomplete="given-name" value="<?php echo esc_attr( $user->first_name ); ?>" /></p>
</td>
</tr>
<tr>
<td width="50%">
<p span class="myaccounttable">
<label for="account_last_name"><?php esc_html_e( 'Last name', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label></p>
</td>
<td width="50%">
<p span class="myaccounttable">
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="account_last_name" id="account_last_name" autocomplete="family-name" value="<?php echo esc_attr( $user->last_name ); ?>" /></p>
<div class="clear"></div>
</td>
</tr>
<tr>
<td width="50%">
<p span class="myaccounttable">
<label for="account_display_name"><?php esc_html_e( 'Display name', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label></p>
</td>
<td width="50%">
<p span class="myaccounttable">
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="account_display_name" id="account_display_name" value="<?php echo esc_attr( $user->display_name ); ?>" /> </p>
<div class="clear"></div>
</td>
</tr>
<tr>
<td width="50%">
<p span class="myaccounttable">
<label for="account_email"><?php esc_html_e( 'Email address', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label></p>
</td>
<td width="50%">
<p span class="myaccounttable">
<input type="email" class="woocommerce-Input woocommerce-Input--email input-text" name="account_email" id="account_email" autocomplete="email" value="<?php echo esc_attr( $user->user_email ); ?>" /></p>
</td>
</tr>
<fieldset>
<tr>
<td width="50%">
<p span class="myaccounttable">
<legend><?php esc_html_e( 'Password change', 'woocommerce' ); ?></legend>
<label for="password_current"><?php esc_html_e( 'Current password (leave blank to leave unchanged)', 'woocommerce' ); ?></label></p>
</td>
<td width="50%">
<p span class="myaccounttable">
<input type="password" class="woocommerce-Input woocommerce-Input--password input-text" name="password_current" id="password_current" autocomplete="off" /></p>
</td>
</tr>
<tr>
<td width="50%">
<p span class="myaccounttable">
<label for="password_1"><?php esc_html_e( 'New password (leave blank to leave unchanged)', 'woocommerce' ); ?></label></p>
</td>
<td width="50%">
<p span class="myaccounttable">
<input type="password" class="woocommerce-Input woocommerce-Input--password input-text" name="password_1" id="password_1" autocomplete="off" /></p>
</td>
</tr>
<tr>
<td width="50%">
<p span class="myaccounttable">
<label for="password_2"><?php esc_html_e( 'Confirm new password', 'woocommerce' ); ?></label></p>
</td>
<td width="50%">
<p span class="myaccounttable">
<input type="password" class="woocommerce-Input woocommerce-Input--password input-text" name="password_2" id="password_2" autocomplete="off" /></p>
</td>
</tr>
<div class="clear"></div>
</fieldset>
</table>
<?php do_action( 'woocommerce_edit_account_form' ); ?>
<?php wp_nonce_field( 'save_account_details', 'save-account-details-nonce' ); ?>
<button type="submit" class="woocommerce-Button button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" name="save_account_details" value="<?php esc_attr_e( 'Save changes', 'woocommerce' ); ?>"><?php esc_html_e( 'Save changes', 'woocommerce' ); ?></button>
<input type="hidden" name="action" value="save_account_details" />
<?php do_action( 'woocommerce_edit_account_form_end' ); ?>
</form>
<?php do_action( 'woocommerce_after_edit_account_form' ); ?>

View File

@ -0,0 +1,56 @@
<?php
/**
* Edit address form
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-edit-address.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
* @version 7.0.1
*/
defined( 'ABSPATH' ) || exit;
$page_title = ( 'billing' === $load_address ) ? esc_html__( 'Billing address', 'woocommerce' ) : esc_html__( 'Shipping address', 'woocommerce' );
do_action( 'woocommerce_before_edit_account_address_form' ); ?>
<?php if ( ! $load_address ) : ?>
<?php wc_get_template( 'myaccount/my-address.php' ); ?>
<?php else : ?>
<form method="post">
<h3><?php echo apply_filters( 'woocommerce_my_account_edit_address_title', $page_title, $load_address ); ?></h3><?php // @codingStandardsIgnoreLine ?>
<div class="woocommerce-address-fields">
<?php do_action( "woocommerce_before_edit_address_form_{$load_address}" ); ?>
<div class="woocommerce-address-fields__field-wrapper">
<?php
foreach ( $address as $key => $field ) {
woocommerce_form_field( $key, $field, wc_get_post_data_by_key( $key, $field['value'] ) );
}
?>
</div>
<?php do_action( "woocommerce_after_edit_address_form_{$load_address}" ); ?>
<p>
<button type="submit" class="button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" name="save_address" value="<?php esc_attr_e( 'Save address', 'woocommerce' ); ?>"><?php esc_html_e( 'Save address', 'woocommerce' ); ?></button>
<?php wp_nonce_field( 'woocommerce-edit_address', 'woocommerce-edit-address-nonce' ); ?>
<input type="hidden" name="action" value="edit_address" />
</p>
</div>
</form>
<?php endif; ?>
<?php do_action( 'woocommerce_after_edit_account_address_form' ); ?>

View File

@ -0,0 +1,121 @@
<?php
/**
* Login Form
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-login.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
* @version 7.0.1
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
do_action( 'woocommerce_before_customer_login_form' ); ?>
<?php if ( 'yes' === get_option( 'woocommerce_enable_myaccount_registration' ) ) : ?>
<div class="u-columns col2-set" id="customer_login">
<div class="u-column1 col-1">
<?php endif; ?>
<h2><?php esc_html_e( 'Log In', 'bridge' ); ?></h2>
<form class="woocommerce-form woocommerce-form-login login" method="post">
<?php do_action( 'woocommerce_login_form_start' ); ?>
<?php /*** Our code modification inside Woo template - begin ***/ ?>
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text placeholder" placeholder="<?php esc_html_e('Username or email', 'bridge'); ?>" name="username" id="username" value="<?php if ( ! empty( $_POST['username'] ) ) echo esc_attr( wp_unslash($_POST['username']) ); ?>" /><?php // @codingStandardsIgnoreLine ?>
</p>
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
<input class="woocommerce-Input woocommerce-Input--text input-text placeholder" placeholder="<?php esc_html_e('Password', 'bridge'); ?>" type="password" name="password" id="password" />
</p>
<?php do_action( 'woocommerce_login_form' ); ?>
<p class="form-row">
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox inline woo-my-account-rememberme">
<input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> <span><?php esc_html_e( 'Remember me', 'bridge' ); ?></span>
</label>
<input type="submit" class="woocommerce-Button button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" name="login" value="<?php esc_attr_e( 'Log In', 'bridge' ); ?>" />
<a class="lost_password woo-lost_password2" href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'bridge' ); ?></a>
</p>
<?php /*** Our code modification inside Woo template - end ***/ ?>
<?php do_action( 'woocommerce_login_form_end' ); ?>
</form>
<?php if ( 'yes' === get_option( 'woocommerce_enable_myaccount_registration' ) ) : ?>
</div>
<div class="u-column2 col-2">
<h2><?php esc_html_e( 'Register', 'bridge' ); ?></h2>
<form method="post" class="woocommerce-form woocommerce-form-register register" <?php do_action( 'woocommerce_register_form_tag' ); ?>>
<?php do_action( 'woocommerce_register_form_start' ); ?>
<?php /*** Our code modification inside Woo template - begin ***/ ?>
<?php if ( 'no' === get_option( 'woocommerce_registration_generate_username' ) ) : ?>
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text placeholder" placeholder="<?php esc_html_e('Username', 'bridge'); ?>" name="username" id="reg_username" value="<?php if ( ! empty( $_POST['username'] ) ) echo esc_attr( wp_unslash($_POST['username']) ); ?>" /><?php // @codingStandardsIgnoreLine ?>
</p>
<?php endif; ?>
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
<input type="email" class="woocommerce-Input woocommerce-Input--text input-text placeholder" placeholder="<?php esc_html_e('Email', 'bridge'); ?>" name="email" id="reg_email" value="<?php if ( ! empty( $_POST['email'] ) ) echo esc_attr( wp_unslash($_POST['email']) ); ?>" /><?php // @codingStandardsIgnoreLine ?>
</p>
<?php if ( 'no' === get_option( 'woocommerce_registration_generate_password' ) ) : ?>
<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text placeholder" placeholder="<?php esc_html_e('Password', 'bridge'); ?>" name="password" id="reg_password" />
</p>
<?php else : ?>
<p><?php esc_html_e( 'A password will be sent to your email address.', 'bridge' ); ?></p>
<?php endif; ?>
<?php /*** Our code modification inside Woo template - end ***/ ?>
<?php do_action( 'woocommerce_register_form' ); ?>
<p class="woocommerce-FormRow woocommerce-form-row form-row">
<?php wp_nonce_field( 'woocommerce-register', 'woocommerce-register-nonce' ); ?>
<input type="submit" class="woocommerce-Button woocommerce-button button woocommerce-form-register__submit<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" name="register" value="<?php esc_attr_e( 'Register', 'bridge' ); ?>" />
</p>
<?php do_action( 'woocommerce_register_form_end' ); ?>
</form>
</div>
</div>
<?php endif; ?>
<?php do_action( 'woocommerce_after_customer_login_form' ); ?>

View File

@ -0,0 +1,45 @@
<?php
/**
* Lost password form
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-lost-password.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
* @version 7.0.1
*/
defined( 'ABSPATH' ) || exit;
do_action( 'woocommerce_before_lost_password_form' );
wc_print_notices(); ?>
<form method="post" class="woocommerce-ResetPassword lost_reset_password">
<p><?php echo apply_filters( 'woocommerce_lost_password_message', esc_html__( 'Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.', 'bridge' ) ); ?></p>
<p class="woocommerce-form-row woocommerce-form-row--first form-row form-row-first">
<input class="woocommerce-Input woocommerce-Input--text input-text placeholder" placeholder="<?php esc_html_e('Username or email', 'bridge'); ?>" type="text" name="user_login" id="user_login" />
</p>
<div class="clear"></div>
<?php do_action( 'woocommerce_lostpassword_form' ); ?>
<p class="woocommerce-form-row form-row">
<input type="hidden" name="wc_reset_password" value="true" />
<input type="submit" class="woocommerce-Button button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" value="<?php esc_attr_e( 'Reset Password', 'bridge' ); ?>" />
</p>
<?php wp_nonce_field( 'lost_password', 'woocommerce-lost-password-nonce' ); ?>
</form>
<?php
do_action( 'woocommerce_after_lost_password_form' );

View File

@ -0,0 +1,53 @@
<?php
/**
* Lost password reset form.
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/form-reset-password.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
* @version 7.0.1
*/
defined( 'ABSPATH' ) || exit;
do_action( 'woocommerce_before_reset_password_form' );
?>
<form method="post" class="woocommerce-ResetPassword lost_reset_password">
<p><?php echo apply_filters( 'woocommerce_reset_password_message', esc_html__( 'Enter a new password below.', 'woocommerce' ) ); ?></p><?php // @codingStandardsIgnoreLine ?>
<p class="woocommerce-form-row woocommerce-form-row--first form-row form-row-first">
<label for="password_1"><?php esc_html_e( 'New password', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label>
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text" name="password_1" id="password_1" autocomplete="new-password" />
</p>
<p class="woocommerce-form-row woocommerce-form-row--last form-row form-row-last">
<label for="password_2"><?php esc_html_e( 'Re-enter new password', 'woocommerce' ); ?>&nbsp;<span class="required">*</span></label>
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text" name="password_2" id="password_2" autocomplete="new-password" />
</p>
<input type="hidden" name="reset_key" value="<?php echo esc_attr( $args['key'] ); ?>" />
<input type="hidden" name="reset_login" value="<?php echo esc_attr( $args['login'] ); ?>" />
<div class="clear"></div>
<?php do_action( 'woocommerce_resetpassword_form' ); ?>
<p class="woocommerce-form-row form-row">
<input type="hidden" name="wc_reset_password" value="true" />
<button type="submit" class="woocommerce-Button button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" value="<?php esc_attr_e( 'Save', 'woocommerce' ); ?>"><?php esc_html_e( 'Save', 'woocommerce' ); ?></button>
</p>
<?php wp_nonce_field( 'reset_password', 'woocommerce-reset-password-nonce' ); ?>
</form>
<?php
do_action( 'woocommerce_after_reset_password_form' );

View File

@ -0,0 +1,27 @@
<?php
/**
* Lost password confirmation text.
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/lost-password-confirmation.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
* @version 3.9.0
*/
defined( 'ABSPATH' ) || exit;
wc_print_notice( esc_html__( 'Password reset email has been sent.', 'woocommerce' ) );
?>
<?php do_action( 'woocommerce_before_lost_password_confirmation_message' ); ?>
<p><?php echo esc_html( apply_filters( 'woocommerce_lost_password_confirmation_message', esc_html__( 'A password reset email has been sent to the email address on file for your account, but may take several minutes to show up in your inbox. Please wait at least 10 minutes before attempting another reset.', 'woocommerce' ) ) ); ?></p>
<?php do_action( 'woocommerce_after_lost_password_confirmation_message' ); ?>

View File

@ -0,0 +1,36 @@
<?php
/**
* My Account page
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/my-account.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
* @version 3.5.0
*/
defined( 'ABSPATH' ) || exit;
/**
* My Account navigation.
*
* @since 2.6.0
*/
do_action( 'woocommerce_account_navigation' ); ?>
<div class="woocommerce-MyAccount-content">
<?php
/**
* My Account content.
*
* @since 2.6.0
*/
do_action( 'woocommerce_account_content' );
?>
</div>

View File

@ -0,0 +1,85 @@
<?php
/**
* My Addresses
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/my-address.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/
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.6.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
$customer_id = get_current_user_id();
if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) {
$page_title = apply_filters( 'woocommerce_my_account_my_address_title', esc_html__( 'My Addresses', 'bridge' ) );
$get_addresses = apply_filters( 'woocommerce_my_account_get_addresses', array(
'billing' => esc_html__( 'Billing address', 'bridge' ),
'shipping' => esc_html__( 'Shipping address', 'bridge' )
), $customer_id );
} else {
$page_title = apply_filters( 'woocommerce_my_account_my_address_title', esc_html__( 'My Address', 'bridge' ) );
$get_addresses = apply_filters( 'woocommerce_my_account_get_addresses', array(
'billing' => esc_html__( 'Billing address', 'bridge' )
), $customer_id );
}
$oldcol = 1;
$col = 1;
?>
<h3><?php echo esc_html($page_title); ?></h3>
<p>
<?php echo apply_filters( 'woocommerce_my_account_my_address_description', esc_html__( 'The following addresses will be used on the checkout page by default.', 'bridge' ) ); ?>
</p>
<?php if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) echo '<div class="u-columns woocommerce-Addresses col2-set addresses">'; ?>
<?php foreach ( $get_addresses as $name => $title ) : ?>
<div class="u-column<?php echo ( ( $col = $col * -1 ) < 0 ) ? 1 : 2; ?> col-<?php echo ( ( $oldcol = $oldcol * -1 ) < 0 ) ? 1 : 2; ?> woocommerce-Address address">
<header class="woocommerce-Address-title title">
<h3><?php echo esc_html($title); ?></h3>
<a href="<?php echo esc_url( wc_get_endpoint_url( 'edit-address', $name ) ); ?>" class="edit button"><?php esc_html_e( 'Edit', 'bridge' ); ?></a>
</header>
<address>
<?php
$address = apply_filters( 'woocommerce_my_account_my_address_formatted_address', array(
'first_name' => get_user_meta( $customer_id, $name . '_first_name', true ),
'last_name' => get_user_meta( $customer_id, $name . '_last_name', true ),
'company' => get_user_meta( $customer_id, $name . '_company', true ),
'address_1' => get_user_meta( $customer_id, $name . '_address_1', true ),
'address_2' => get_user_meta( $customer_id, $name . '_address_2', true ),
'city' => get_user_meta( $customer_id, $name . '_city', true ),
'state' => get_user_meta( $customer_id, $name . '_state', true ),
'postcode' => get_user_meta( $customer_id, $name . '_postcode', true ),
'country' => get_user_meta( $customer_id, $name . '_country', true ),
), $customer_id, $name );
$formatted_address = WC()->countries->get_formatted_address( $address );
if ( ! $formatted_address ) {
esc_html_e('You have not set up this type of address yet.', 'bridge');
} else{
echo implode('<br/>', $address);
}
?>
</address>
</div>
<?php endforeach; ?>
<?php if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) echo '</div>'; ?>

View File

@ -0,0 +1,52 @@
<?php
/**
* My Downloads - Deprecated
*
* Shows downloads on the account page.
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/my-downloads.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
* @version 2.0.0
* @deprecated 2.6.0
*/
defined( 'ABSPATH' ) || exit;
$downloads = WC()->customer->get_downloadable_products();
if ( $downloads ) : ?>
<?php do_action( 'woocommerce_before_available_downloads' ); ?>
<h2><?php echo apply_filters( 'woocommerce_my_account_my_downloads_title', esc_html__( 'Available downloads', 'woocommerce' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></h2>
<ul class="woocommerce-Downloads digital-downloads">
<?php foreach ( $downloads as $download ) : ?>
<li>
<?php
do_action( 'woocommerce_available_download_start', $download );
if ( is_numeric( $download['downloads_remaining'] ) ) {
/* translators: %s product name */
echo apply_filters( 'woocommerce_available_download_count', '<span class="woocommerce-Count count">' . sprintf( _n( '%s download remaining', '%s downloads remaining', $download['downloads_remaining'], 'woocommerce' ), $download['downloads_remaining'] ) . '</span> ', $download ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
echo apply_filters( 'woocommerce_available_download_link', '<a href="' . esc_url( $download['download_url'] ) . '">' . $download['download_name'] . '</a>', $download ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
do_action( 'woocommerce_available_download_end', $download );
?>
</li>
<?php endforeach; ?>
</ul>
<?php do_action( 'woocommerce_after_available_downloads' ); ?>
<?php endif; ?>

View File

@ -0,0 +1,109 @@
<?php
/**
* My Orders
*
* @deprecated 2.6.0 this template file is no longer used. My Account shortcode uses orders.php.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$my_orders_columns = apply_filters( 'woocommerce_my_account_my_orders_columns', array(
'order-number' => esc_html__( 'Order', 'bridge' ),
'order-date' => esc_html__( 'Date', 'bridge' ),
'order-status' => esc_html__( 'Status', 'bridge' ),
'order-total' => esc_html__( 'Total', 'bridge' ),
'order-actions' => '&nbsp;',
) );
$customer_orders = get_posts( apply_filters( 'woocommerce_my_account_my_orders_query', array(
'numberposts' => $order_count,
'meta_key' => '_customer_user',
'meta_value' => get_current_user_id(),
'post_type' => wc_get_order_types( 'view-orders' ),
'post_status' => array_keys( wc_get_order_statuses() ),
) ) );
if ( $customer_orders ) : ?>
<h2><?php echo apply_filters( 'woocommerce_my_account_my_orders_title', esc_html__( 'Recent Orders', 'bridge' ) ); ?></h2>
<table class="shop_table shop_table_responsive my_account_orders">
<thead>
<tr>
<?php foreach ( $my_orders_columns as $column_id => $column_name ) : ?>
<th class="<?php echo esc_attr( $column_id ); ?>"><span class="nobr"><?php echo esc_html( $column_name ); ?></span></th>
<?php endforeach; ?>
</tr>
</thead>
<tbody>
<?php foreach ( $customer_orders as $customer_order ) :
$order = wc_get_order( $customer_order );
$item_count = $order->get_item_count();
?>
<tr class="order">
<?php foreach ( $my_orders_columns as $column_id => $column_name ) : ?>
<td class="<?php echo esc_attr( $column_id ); ?>" data-title="<?php echo esc_attr( $column_name ); ?>">
<?php if ( has_action( 'woocommerce_my_account_my_orders_column_' . $column_id ) ) : ?>
<?php do_action( 'woocommerce_my_account_my_orders_column_' . $column_id, $order ); ?>
<?php elseif ( 'order-number' === $column_id ) : ?>
<a href="<?php echo esc_url( $order->get_view_order_url() ); ?>">
<?php echo _x( '#', 'hash before order number', 'bridge' ) . $order->get_order_number(); ?>
</a>
<?php elseif ( 'order-date' === $column_id ) : ?>
<time datetime="<?php echo esc_attr( $order->get_date_created()->date( 'c' ) ); ?>"><?php echo esc_html( wc_format_datetime( $order->get_date_created() ) ); ?></time>
<?php elseif ( 'order-status' === $column_id ) : ?>
<?php echo esc_html( wc_get_order_status_name( $order->get_status() ) ); ?>
<?php elseif ( 'order-total' === $column_id ) : ?>
<?php
/* translators: 1: formatted order total 2: total order items */
printf( _n( '%1$s for %2$s item', '%1$s for %2$s items', $item_count, 'bridge' ), $order->get_formatted_order_total(), $item_count );
?>
<?php elseif ( 'order-actions' === $column_id ) : ?>
<?php
$actions = array(
'pay' => array(
'url' => $order->get_checkout_payment_url(),
'name' => esc_html__( 'Pay', 'bridge' ),
),
'view' => array(
'url' => $order->get_view_order_url(),
'name' => esc_html__( 'View', 'bridge' ),
),
'cancel' => array(
'url' => $order->get_cancel_order_url( wc_get_page_permalink( 'myaccount' ) ),
'name' => esc_html__( 'Cancel', 'bridge' ),
),
);
if ( ! $order->needs_payment() ) {
unset( $actions['pay'] );
}
if ( ! in_array( $order->get_status(), apply_filters( 'woocommerce_valid_order_statuses_for_cancel', array( 'pending', 'failed' ), $order ) ) ) {
unset( $actions['cancel'] );
}
/*** Our code modification inside Woo template - added class name for button element ***/
if ( $actions = apply_filters( 'woocommerce_my_account_my_orders_actions', $actions, $order ) ) {
foreach ( $actions as $key => $action ) {
echo '<a href="' . esc_url( $action['url'] ) . '" class="button qbutton small ' . sanitize_html_class( $key ) . '">' . esc_html( $action['name'] ) . '</a>';
}
}
?>
<?php endif; ?>
</td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>

View File

@ -0,0 +1,120 @@
<?php
/**
* My Subscriptions section on the My Account page
*
* @author Shop Plugins
* @category WooCommerce Subscriptions/Templates
* @version 2.0.2
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
?>
<div class="woocommerce_account_subscriptions">
<?php
if ( ! empty( $subscriptions ) ) {
?>
<form action="#" method="post" name="jgtb_my_subscriptions_form">
<?php
$user_id = get_current_user_id();
// used in checking to see whether the change request came from this page
wp_nonce_field( 'bulk_ship_again_request_' . $user_id, '_wpnonce', false );
if ( Javorszky\Toolbox\Utilities\is_ship_reschedule_available() ) {
$button_text = Javorszky\Toolbox\Utilities\get_button_text( 'ship_reschedule_button_text', 'Ship now and recalculate from today' );
if ( \Javorszky\Toolbox\Utilities\is_ship_reschedule_from_next_payment_available() ) {
$button_text = Javorszky\Toolbox\Utilities\get_button_text( 'ship_reschedule_from_next_payment_button_text', 'Ship now and reschedule from next payment' );
}
?>
<button type="submit" name="submit_button" value="ship_now_reschedule"><?php echo $button_text; ?></button>
<?php
}
if ( Javorszky\Toolbox\Utilities\is_ship_keep_available() ) {
?>
<button type="submit" name="submit_button" value="ship_now_keep"><?php echo Javorszky\Toolbox\Utilities\get_button_text( 'ship_keep_button_text', 'Ship now and keep schedule' ); ?></button>
<?php
}
?>
<table class="shop_table shop_table_responsive my_account_subscriptions my_account_orders">
<thead>
<tr>
<th class="subscription-id order-number"><span class="nobr"><?php esc_html_e( 'Subscription', 'jg-toolbox' ); ?></span></th>
<th class="subscription-status order-status"><span class="nobr"><?php esc_html_e( 'Status', 'jg-toolbox' ); ?></span></th>
<th class="subscription-next-payment order-date"><span class="nobr"><?php echo esc_html_x( 'Next Payment', 'table heading', 'jg-toolbox' ); ?></span></th>
<th class="subscription-total order-total"><span class="nobr"><?php echo esc_html_x( 'Total', 'table heading', 'jg-toolbox' ); ?></span></th>
</tr>
</thead>
<tbody>
<?php
$all_subscriptions = array(); // used in the edit quantities update
foreach ( $subscriptions as $subscription ) {
$subscription_id = $subscription->get_id();
?>
<tr class="order">
<td class="subscription-id order-number" data-title="<?php esc_attr_e( 'ID', 'jg-toolbox' ); ?>">
<input type="checkbox" name="jgtb_my_subscriptions[]" value="<?php echo esc_attr( $subscription_id ); ?>">
<?php
$all_subscriptions[] = $subscription_id;
$completed_payments = $subscription->get_payment_count( 'completed' );
wp_nonce_field( $subscription_id . '_completed_' . $completed_payments, '_completed_' . $subscription_id, false );
wp_nonce_field( $subscription_id . '_completed_adjust_' . $completed_payments, '_completed_adjust_' . $subscription_id, false );
wp_nonce_field( 'wcs_edit_details_of_' . $subscription_id, 'jgtb_edit_details_of_' . $subscription_id, false );
// translators: placeholder is order number for subscription
$order_link = sprintf( _x( '#%s', 'hash before order number', 'jg-toolbox' ), $subscription->get_order_number() );
?>
<a href="<?php echo esc_url( $subscription->get_view_order_url() ); ?>"><?php echo esc_html( $order_link ); ?></a>
</td>
<td class="subscription-status order-status" style="text-align:left; white-space:nowrap;" data-title="<?php esc_attr_e( 'Status', 'jg-toolbox' ); ?>">
<?php echo esc_attr( wcs_get_subscription_status_name( $subscription->get_status() ) ); ?>
</td>
<td class="subscription-next-payment order-date" data-title="<?php echo esc_attr_x( 'Next Payment', 'table heading', 'jg-toolbox' ); ?>">
<?php echo esc_attr( $subscription->get_date_to_display( 'next_payment' ) ); ?>
<?php if ( ! $subscription->is_manual() && $subscription->has_status( 'active' ) && $subscription->get_time( 'next_payment' ) > 0 ) : ?>
<?php
// translators: placeholder is the display name of a payment gateway a subscription was paid by
$payment_method_to_display = sprintf( __( 'Via %s', 'jg-toolbox' ), $subscription->get_payment_method_to_display() );
$payment_method_to_display = apply_filters( 'woocommerce_my_subscriptions_payment_method', $payment_method_to_display, $subscription );
?>
<br/><small><?php echo esc_attr( $payment_method_to_display ); ?></small>
<?php endif; ?>
</td>
<td class="subscription-total order-total" data-title="<?php echo esc_attr_x( 'Total', 'Used in data attribute. Escaped', 'jg-toolbox' ); ?>">
<?php echo wp_kses_post( $subscription->get_formatted_order_total() ); ?></td>
<td><a href="<?php echo esc_url( $subscription->get_view_order_url() ); ?>" class="button view">View</a>
<?php do_action( 'woocommerce_my_subscriptions_actions', $subscription ); ?>
</td>
</tr>
<?php
}
$serialized_all_subscriptions = maybe_serialize( $all_subscriptions );
$hash = wp_hash( $serialized_all_subscriptions, 'jgtb_edit_quantities' );
?>
<input type="hidden" name="jgtb_all_subscriptions" value="<?php echo esc_attr( $serialized_all_subscriptions ); ?>">
<input type="hidden" name="jgtb_all_subscriptions_hash" value="<?php echo esc_attr( $hash ); ?>">
</tbody>
</table>
</form>
<?php
} else {
?>
<p class="no_subscriptions">
<?php
// translators: placeholders are opening and closing link tags to take to the shop page. Don't change the order
printf( esc_html__( 'You have no active subscriptions. Find your first subscription in the %1$sstore%2$s.', 'jg-toolbox' ), '<a href="' . esc_url( apply_filters( 'woocommerce_subscriptions_message_store_url', get_permalink( wc_get_page_id( 'shop' ) ) ) ) . '">', '</a>' );
?>
</p>
<?php
}
?>
</div>
<?php

View File

@ -0,0 +1,35 @@
<?php
/**
* My Account navigation
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/navigation.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
* @version 2.6.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
do_action( 'woocommerce_before_account_navigation' );
?>
<nav class="woocommerce-MyAccount-navigation">
<ul>
<?php foreach ( wc_get_account_menu_items() as $endpoint => $label ) : ?>
<li class="<?php echo wc_get_account_menu_item_classes( $endpoint ); ?>">
<a href="<?php echo esc_url( wc_get_account_endpoint_url( $endpoint ) ); ?>"><?php echo esc_html( $label ); ?></a>
</li>
<?php endforeach; ?>
</ul>
</nav>
<?php do_action( 'woocommerce_after_account_navigation' ); ?>

View File

@ -0,0 +1,105 @@
<?php
/**
* Orders
*
* Shows orders on the account page.
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/orders.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
* @version 7.0.1
*/
defined( 'ABSPATH' ) || exit;
do_action( 'woocommerce_before_account_orders', $has_orders ); ?>
<?php if ( $has_orders ) : ?>
<table class="woocommerce-orders-table woocommerce-MyAccount-orders shop_table shop_table_responsive my_account_orders account-orders-table">
<thead>
<tr>
<?php foreach ( wc_get_account_orders_columns() as $column_id => $column_name ) : ?>
<th class="woocommerce-orders-table__header woocommerce-orders-table__header-<?php echo esc_attr( $column_id ); ?>"><span class="nobr"><?php echo esc_html( $column_name ); ?></span></th>
<?php endforeach; ?>
</tr>
</thead>
<tbody>
<?php
foreach ( $customer_orders->orders as $customer_order ) {
$order = wc_get_order( $customer_order ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
$item_count = $order->get_item_count() - $order->get_item_count_refunded();
?>
<tr class="woocommerce-orders-table__row woocommerce-orders-table__row--status-<?php echo esc_attr( $order->get_status() ); ?> order">
<?php foreach ( wc_get_account_orders_columns() as $column_id => $column_name ) : ?>
<td class="woocommerce-orders-table__cell woocommerce-orders-table__cell-<?php echo esc_attr( $column_id ); ?>" data-title="<?php echo esc_attr( $column_name ); ?>">
<?php if ( has_action( 'woocommerce_my_account_my_orders_column_' . $column_id ) ) : ?>
<?php do_action( 'woocommerce_my_account_my_orders_column_' . $column_id, $order ); ?>
<?php elseif ( 'order-number' === $column_id ) : ?>
<a href="<?php echo esc_url( $order->get_view_order_url() ); ?>">
<?php echo esc_html( _x( '#', 'hash before order number', 'woocommerce' ) . $order->get_order_number() ); ?>
</a>
<?php elseif ( 'order-date' === $column_id ) : ?>
<time datetime="<?php echo esc_attr( $order->get_date_created()->date( 'c' ) ); ?>"><?php echo esc_html( wc_format_datetime( $order->get_date_created() ) ); ?></time>
<?php elseif ( 'order-status' === $column_id ) : ?>
<?php echo esc_html( wc_get_order_status_name( $order->get_status() ) ); ?>
<?php elseif ( 'order-total' === $column_id ) : ?>
<?php
/* translators: 1: formatted order total 2: total order items */
echo wp_kses_post( sprintf( _n( '%1$s for %2$s item', '%1$s for %2$s items', $item_count, 'woocommerce' ), $order->get_formatted_order_total(), $item_count ) );
?>
<?php elseif ( 'order-actions' === $column_id ) : ?>
<?php
$actions = wc_get_account_orders_actions( $order );
if ( ! empty( $actions ) ) {
foreach ( $actions as $key => $action ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
echo '<a href="' . esc_url( $action['url'] ) . '" class="woocommerce-button' . esc_attr( $wp_button_class ) . ' button ' . sanitize_html_class( $key ) . '">' . esc_html( $action['name'] ) . '</a>';
}
}
?>
<?php endif; ?>
</td>
<?php endforeach; ?>
</tr>
<?php
}
?>
</tbody>
</table>
<?php do_action( 'woocommerce_before_account_orders_pagination' ); ?>
<?php if ( 1 < $customer_orders->max_num_pages ) : ?>
<div class="woocommerce-pagination woocommerce-pagination--without-numbers woocommerce-Pagination">
<?php if ( 1 !== $current_page ) : ?>
<a class="woocommerce-button woocommerce-button--previous woocommerce-Button woocommerce-Button--previous button" href="<?php echo esc_url( wc_get_endpoint_url( 'orders', $current_page - 1 ) ); ?>"><?php esc_html_e( 'Previous', 'woocommerce' ); ?></a>
<?php endif; ?>
<?php if ( intval( $customer_orders->max_num_pages ) !== $current_page ) : ?>
<a class="woocommerce-button woocommerce-button--next woocommerce-Button woocommerce-Button--next button" href="<?php echo esc_url( wc_get_endpoint_url( 'orders', $current_page + 1 ) ); ?>"><?php esc_html_e( 'Next', 'woocommerce' ); ?></a>
<?php endif; ?>
</div>
<?php endif; ?>
<?php else : ?>
<div class="woocommerce-message woocommerce-message--info woocommerce-Message woocommerce-Message--info woocommerce-info">
<a class="woocommerce-Button button" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>"><?php esc_html_e( 'Browse products', 'woocommerce' ); ?></a>
<?php esc_html_e( 'No order has been made yet.', 'woocommerce' ); ?>
</div>
<?php endif; ?>
<?php do_action( 'woocommerce_after_account_orders', $has_orders ); ?>

View File

@ -0,0 +1,78 @@
<?php
/**
* Payment methods
*
* Shows customer payment methods on the account page.
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/payment-methods.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
* @version 2.6.0
*/
defined( 'ABSPATH' ) || exit;
$saved_methods = wc_get_customer_saved_methods_list( get_current_user_id() );
$has_methods = (bool) $saved_methods;
$types = wc_get_account_payment_methods_types();
do_action( 'woocommerce_before_account_payment_methods', $has_methods ); ?>
<?php if ( $has_methods ) : ?>
<table class="mypaymenttable">
<thead>
<tr>
<?php foreach ( wc_get_account_payment_methods_columns() as $column_id => $column_name ) : ?>
<th class="woocommerce-PaymentMethod woocommerce-PaymentMethod--<?php echo esc_attr( $column_id ); ?> payment-method-<?php echo esc_attr( $column_id ); ?>"><span class="nobr"><?php echo esc_html( $column_name ); ?></span></th>
<?php endforeach; ?>
</tr>
</thead>
<?php foreach ( $saved_methods as $type => $methods ) : // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited ?>
<?php foreach ( $methods as $method ) : ?>
<tr class="payment-method<?php echo ! empty( $method['is_default'] ) ? ' default-payment-method' : ''; ?>">
<?php foreach ( wc_get_account_payment_methods_columns() as $column_id => $column_name ) : ?>
<td class="woocommerce-PaymentMethod woocommerce-PaymentMethod--<?php echo esc_attr( $column_id ); ?> payment-method-<?php echo esc_attr( $column_id ); ?>" data-title="<?php echo esc_attr( $column_name ); ?>">
<?php
if ( has_action( 'woocommerce_account_payment_methods_column_' . $column_id ) ) {
do_action( 'woocommerce_account_payment_methods_column_' . $column_id, $method );
} elseif ( 'method' === $column_id ) {
if ( ! empty( $method['method']['last4'] ) ) {
/* translators: 1: credit card type 2: last 4 digits */
echo sprintf( esc_html__( '%1$s ending in %2$s', 'woocommerce' ), esc_html( wc_get_credit_card_type_label( $method['method']['brand'] ) ), esc_html( $method['method']['last4'] ) );
} else {
echo esc_html( wc_get_credit_card_type_label( $method['method']['brand'] ) );
}
} elseif ( 'expires' === $column_id ) {
echo esc_html( $method['expires'] );
} elseif ( 'actions' === $column_id ) {
foreach ( $method['actions'] as $key => $action ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
echo '<a href="' . esc_url( $action['url'] ) . '" class="button ' . sanitize_html_class( $key ) . '">' . esc_html( $action['name'] ) . '</a>&nbsp;';
}
}
?>
</td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
<?php endforeach; ?>
</table>
<?php else : ?>
<p class="woocommerce-Message woocommerce-Message--info woocommerce-info"><?php esc_html_e( 'No saved methods found.', 'woocommerce' ); ?></p>
<?php endif; ?>
<?php do_action( 'woocommerce_after_account_payment_methods', $has_methods ); ?>
<?php if ( WC()->payment_gateways->get_available_payment_gateways() ) : ?>
<a class="button" href="<?php echo esc_url( wc_get_endpoint_url( 'add-payment-method' ) ); ?>"><?php esc_html_e( 'Add payment method', 'woocommerce' ); ?></a>
<?php endif; ?>

View File

@ -0,0 +1,56 @@
<?php
/**
* View Order
*
* Shows the details of a particular order on the account page.
*
* This template can be overridden by copying it to yourtheme/woocommerce/myaccount/view-order.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
* @version 3.0.0
*/
defined( 'ABSPATH' ) || exit;
$notes = $order->get_customer_order_notes();
?>
<p>
<?php
printf(
/* translators: 1: order number 2: order date 3: order status */
esc_html__( 'Order #%1$s was placed on %2$s and is currently %3$s.', 'woocommerce' ),
'<mark class="order-number">' . $order->get_order_number() . '</mark>', // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
'<mark class="order-date">' . wc_format_datetime( $order->get_date_created() ) . '</mark>', // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
'<mark class="order-status">' . wc_get_order_status_name( $order->get_status() ) . '</mark>' // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
);
?>
</p>
<?php if ( $notes ) : ?>
<h2><?php esc_html_e( 'Order updates', 'woocommerce' ); ?></h2>
<ol class="woocommerce-OrderUpdates commentlist notes">
<?php foreach ( $notes as $note ) : ?>
<li class="woocommerce-OrderUpdate comment note">
<div class="woocommerce-OrderUpdate-inner comment_container">
<div class="woocommerce-OrderUpdate-text comment-text">
<p class="woocommerce-OrderUpdate-meta meta"><?php echo date_i18n( esc_html__( 'l jS \o\f F Y, h:ia', 'woocommerce' ), strtotime( $note->comment_date ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
<div class="woocommerce-OrderUpdate-description description">
<?php echo wpautop( wptexturize( $note->comment_content ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
</li>
<?php endforeach; ?>
</ol>
<?php endif; ?>
<?php do_action( 'woocommerce_view_order', $order_id ); ?>