plugin install
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/**
|
||||
* The Template for displaying product archives, including the main shop page which is a post type archive
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/archive-product.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 8.6.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
get_header( 'shop' );
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_before_main_content.
|
||||
*
|
||||
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
|
||||
* @hooked woocommerce_breadcrumb - 20
|
||||
* @hooked WC_Structured_Data::generate_website_data() - 30
|
||||
*/
|
||||
do_action( 'woocommerce_before_main_content' );
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_shop_loop_header.
|
||||
*
|
||||
* @since 8.6.0
|
||||
*
|
||||
* @hooked woocommerce_product_taxonomy_archive_header - 10
|
||||
*/
|
||||
do_action( 'woocommerce_shop_loop_header' );
|
||||
|
||||
if ( woocommerce_product_loop() ) {
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_before_shop_loop.
|
||||
*
|
||||
* @hooked woocommerce_output_all_notices - 10
|
||||
* @hooked woocommerce_result_count - 20
|
||||
* @hooked woocommerce_catalog_ordering - 30
|
||||
*/
|
||||
do_action( 'woocommerce_before_shop_loop' );
|
||||
|
||||
woocommerce_product_loop_start();
|
||||
|
||||
if ( wc_get_loop_prop( 'total' ) ) {
|
||||
while ( have_posts() ) {
|
||||
the_post();
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_shop_loop.
|
||||
*/
|
||||
do_action( 'woocommerce_shop_loop' );
|
||||
|
||||
wc_get_template_part( 'content', 'product' );
|
||||
}
|
||||
}
|
||||
|
||||
woocommerce_product_loop_end();
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_after_shop_loop.
|
||||
*
|
||||
* @hooked woocommerce_pagination - 10
|
||||
*/
|
||||
do_action( 'woocommerce_after_shop_loop' );
|
||||
} else {
|
||||
/**
|
||||
* Hook: woocommerce_no_products_found.
|
||||
*
|
||||
* @hooked wc_no_products_found - 10
|
||||
*/
|
||||
do_action( 'woocommerce_no_products_found' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_after_main_content.
|
||||
*
|
||||
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
|
||||
*/
|
||||
do_action( 'woocommerce_after_main_content' );
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_sidebar.
|
||||
*
|
||||
* @hooked woocommerce_get_sidebar - 10
|
||||
*/
|
||||
do_action( 'woocommerce_sidebar' );
|
||||
|
||||
get_footer( 'shop' );
|
||||
25
wp/wp-content/plugins/woocommerce/templates/auth/footer.php
Normal file
25
wp/wp-content/plugins/woocommerce/templates/auth/footer.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Auth footer
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/auth/footer.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Auth
|
||||
* @version 2.4.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
/**
|
||||
* Auth form grant access
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/auth/form-grant-access.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Auth
|
||||
* @version 8.8.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
?>
|
||||
|
||||
<?php do_action( 'woocommerce_auth_page_header' ); ?>
|
||||
|
||||
<h1>
|
||||
<?php
|
||||
/* Translators: %s App name. */
|
||||
printf( esc_html__( '%s would like to connect to your store', 'woocommerce' ), esc_html( $app_name ) );
|
||||
?>
|
||||
</h1>
|
||||
|
||||
<?php wc_print_notices(); ?>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
/* Translators: %1$s App name, %2$s scope. */
|
||||
printf( esc_html__( 'This will give "%1$s" %2$s access which will allow it to:', 'woocommerce' ), '<strong>' . esc_html( $app_name ) . '</strong>', '<strong>' . esc_html( $scope ) . '</strong>' );
|
||||
?>
|
||||
</p>
|
||||
|
||||
<ul class="wc-auth-permissions">
|
||||
<?php foreach ( $permissions as $permission ) : ?>
|
||||
<li><?php echo esc_html( $permission ); ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
/* Translators: %s Domain name from the callback URL. */
|
||||
printf( esc_html__( 'Approving will share credentials with %s. Do not proceed if this looks suspicious in any way.', 'woocommerce' ), '<strong>' . esc_html( wp_parse_url( $callback_url, PHP_URL_HOST ) ) . '</strong>' );
|
||||
?>
|
||||
</p>
|
||||
|
||||
<div class="wc-auth-logged-in-as">
|
||||
<?php echo get_avatar( $user->ID, 70 ); ?>
|
||||
<p>
|
||||
<?php
|
||||
/* Translators: %s display name. */
|
||||
printf( esc_html__( 'Logged in as %s', 'woocommerce' ), esc_html( $user->display_name ) );
|
||||
?>
|
||||
<a href="<?php echo esc_url( $logout_url ); ?>" class="wc-auth-logout"><?php esc_html_e( 'Logout', 'woocommerce' ); ?></a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p class="wc-auth-actions">
|
||||
<a href="<?php echo esc_url( $granted_url ); ?>" class="button button-primary wc-auth-approve"><?php esc_html_e( 'Approve', 'woocommerce' ); ?></a>
|
||||
<a href="<?php echo esc_url( $return_url ); ?>" class="button wc-auth-deny"><?php esc_html_e( 'Deny', 'woocommerce' ); ?></a>
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_auth_page_footer' ); ?>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* Auth form login
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/auth/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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Auth
|
||||
* @version 7.0.1
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
do_action( 'woocommerce_auth_page_header' ); ?>
|
||||
|
||||
<h1>
|
||||
<?php
|
||||
/* translators: %s: app name */
|
||||
printf( esc_html__( '%s would like to connect to your store', 'woocommerce' ), esc_html( $app_name ) );
|
||||
?>
|
||||
</h1>
|
||||
|
||||
<?php wc_print_notices(); ?>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
/* translators: %1$s: app name, %2$s: URL */
|
||||
echo wp_kses_post( sprintf( __( 'To connect to %1$s you need to be logged in. Log in to your store below, or <a href="%2$s">cancel and return to %1$s</a>', 'woocommerce' ), esc_html( wc_clean( $app_name ) ), esc_url( $return_url ) ) );
|
||||
?>
|
||||
</p>
|
||||
|
||||
<form method="post" class="wc-auth-login">
|
||||
<p class="form-row form-row-wide">
|
||||
<label for="username"><?php esc_html_e( 'Username or email address', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="input-text" name="username" id="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( $_POST['username'] ) : ''; ?>" /><?php //@codingStandardsIgnoreLine ?>
|
||||
</p>
|
||||
<p class="form-row form-row-wide">
|
||||
<label for="password"><?php esc_html_e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input class="input-text" type="password" name="password" id="password" />
|
||||
</p>
|
||||
<p class="wc-auth-actions">
|
||||
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
|
||||
<button type="submit" class="button button-large button-primary wc-auth-login-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( 'Login', 'woocommerce' ); ?>"><?php esc_html_e( 'Login', 'woocommerce' ); ?></button>
|
||||
<input type="hidden" name="redirect" value="<?php echo esc_url( $redirect_url ); ?>" />
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<?php do_action( 'woocommerce_auth_page_footer' ); ?>
|
||||
33
wp/wp-content/plugins/woocommerce/templates/auth/header.php
Normal file
33
wp/wp-content/plugins/woocommerce/templates/auth/header.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Auth header
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/auth/header.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Auth
|
||||
* @version 2.4.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
// phpcs:disable WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet
|
||||
?><!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<title><?php esc_html_e( 'Application authentication request', 'woocommerce' ); ?></title>
|
||||
<?php wp_admin_css( 'install', true ); ?>
|
||||
<link rel="stylesheet" href="<?php echo esc_url( str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/css/auth.css' ); ?>" type="text/css" />
|
||||
</head>
|
||||
<body class="wc-auth wp-core-ui">
|
||||
<h1 id="wc-logo"><img src="<?php echo esc_url( WC()->plugin_url() ); ?>/assets/images/woocommerce_logo.png" alt="<?php esc_attr_e( 'WooCommerce', 'woocommerce' ); ?>" /></h1>
|
||||
<div class="wc-auth-content">
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* Show error messages
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/notices/error.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 8.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( ! $notices ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$multiple = count( $notices ) > 1;
|
||||
|
||||
?>
|
||||
|
||||
<div class="wc-block-components-notice-banner is-error" role="alert" <?php echo $multiple ? '' : wc_get_notice_data_attr( $notices[0] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false">
|
||||
<path d="M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"></path>
|
||||
</svg>
|
||||
<div class="wc-block-components-notice-banner__content">
|
||||
<?php if ( $multiple ) { ?>
|
||||
<p class="wc-block-components-notice-banner__summary"><?php esc_html_e( 'The following problems were found:', 'woocommerce' ); ?></p>
|
||||
<ul>
|
||||
<?php foreach ( $notices as $notice ) : ?>
|
||||
<li<?php echo wc_get_notice_data_attr( $notice ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
|
||||
<?php echo wc_kses_notice( $notice['notice'] ); ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php
|
||||
} else {
|
||||
echo wc_kses_notice( $notices[0]['notice'] );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* Show info messages
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/notices/notice.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 8.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( ! $notices ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php foreach ( $notices as $notice ) : ?>
|
||||
<div class="wc-block-components-notice-banner is-info"<?php echo wc_get_notice_data_attr( $notice ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> role="alert">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false">
|
||||
<path d="M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"></path>
|
||||
</svg>
|
||||
<div class="wc-block-components-notice-banner__content">
|
||||
<?php echo wc_kses_notice( $notice['notice'] ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* Show success messages
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/notices/success.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 8.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( ! $notices ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php foreach ( $notices as $notice ) : ?>
|
||||
<div class="wc-block-components-notice-banner is-success"<?php echo wc_get_notice_data_attr( $notice ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> role="alert">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false">
|
||||
<path d="M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"></path>
|
||||
</svg>
|
||||
<div class="wc-block-components-notice-banner__content">
|
||||
<?php echo wc_kses_notice( $notice['notice'] ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* Empty cart page
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/cart/cart-empty.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 7.0.1
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
/*
|
||||
* @hooked wc_empty_cart_message - 10
|
||||
*/
|
||||
do_action( 'woocommerce_cart_is_empty' );
|
||||
|
||||
if ( wc_get_page_id( 'shop' ) > 0 ) : ?>
|
||||
<p class="return-to-shop">
|
||||
<a class="button wc-backward<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
|
||||
<?php
|
||||
/**
|
||||
* Filter "Return To Shop" text.
|
||||
*
|
||||
* @since 4.6.0
|
||||
* @param string $default_text Default text.
|
||||
*/
|
||||
echo esc_html( apply_filters( 'woocommerce_return_to_shop_text', __( 'Return to shop', 'woocommerce' ) ) );
|
||||
?>
|
||||
</a>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Cart item data (when outputting non-flat)
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/cart/cart-item-data.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 2.4.0
|
||||
*/
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<dl class="variation">
|
||||
<?php foreach ( $item_data as $data ) : ?>
|
||||
<dt class="<?php echo sanitize_html_class( 'variation-' . $data['key'] ); ?>"><?php echo wp_kses_post( $data['key'] ); ?>:</dt>
|
||||
<dd class="<?php echo sanitize_html_class( 'variation-' . $data['key'] ); ?>"><?php echo wp_kses_post( wpautop( $data['display'] ) ); ?></dd>
|
||||
<?php endforeach; ?>
|
||||
</dl>
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/**
|
||||
* Shipping Methods Display
|
||||
*
|
||||
* In 2.1 we show methods per package. This allows for multiple methods per order if so desired.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/cart/cart-shipping.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 8.8.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
$formatted_destination = isset( $formatted_destination ) ? $formatted_destination : WC()->countries->get_formatted_address( $package['destination'], ', ' );
|
||||
$has_calculated_shipping = ! empty( $has_calculated_shipping );
|
||||
$show_shipping_calculator = ! empty( $show_shipping_calculator );
|
||||
$calculator_text = '';
|
||||
?>
|
||||
<tr class="woocommerce-shipping-totals shipping">
|
||||
<th><?php echo wp_kses_post( $package_name ); ?></th>
|
||||
<td data-title="<?php echo esc_attr( $package_name ); ?>">
|
||||
<?php if ( ! empty( $available_methods ) && is_array( $available_methods ) ) : ?>
|
||||
<ul id="shipping_method" class="woocommerce-shipping-methods">
|
||||
<?php foreach ( $available_methods as $method ) : ?>
|
||||
<li>
|
||||
<?php
|
||||
if ( 1 < count( $available_methods ) ) {
|
||||
printf( '<input type="radio" name="shipping_method[%1$d]" data-index="%1$d" id="shipping_method_%1$d_%2$s" value="%3$s" class="shipping_method" %4$s />', $index, esc_attr( sanitize_title( $method->id ) ), esc_attr( $method->id ), checked( $method->id, $chosen_method, false ) ); // WPCS: XSS ok.
|
||||
} else {
|
||||
printf( '<input type="hidden" name="shipping_method[%1$d]" data-index="%1$d" id="shipping_method_%1$d_%2$s" value="%3$s" class="shipping_method" />', $index, esc_attr( sanitize_title( $method->id ) ), esc_attr( $method->id ) ); // WPCS: XSS ok.
|
||||
}
|
||||
printf( '<label for="shipping_method_%1$s_%2$s">%3$s</label>', $index, esc_attr( sanitize_title( $method->id ) ), wc_cart_totals_shipping_method_label( $method ) ); // WPCS: XSS ok.
|
||||
do_action( 'woocommerce_after_shipping_rate', $method, $index );
|
||||
?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php if ( is_cart() ) : ?>
|
||||
<p class="woocommerce-shipping-destination">
|
||||
<?php
|
||||
if ( $formatted_destination ) {
|
||||
// Translators: $s shipping destination.
|
||||
printf( esc_html__( 'Shipping to %s.', 'woocommerce' ) . ' ', '<strong>' . esc_html( $formatted_destination ) . '</strong>' );
|
||||
$calculator_text = esc_html__( 'Change address', 'woocommerce' );
|
||||
} else {
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_shipping_estimate_html', __( 'Shipping options will be updated during checkout.', 'woocommerce' ) ) );
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
elseif ( ! $has_calculated_shipping || ! $formatted_destination ) :
|
||||
if ( is_cart() && 'no' === get_option( 'woocommerce_enable_shipping_calc' ) ) {
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_shipping_not_enabled_on_cart_html', __( 'Shipping costs are calculated during checkout.', 'woocommerce' ) ) );
|
||||
} else {
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_shipping_may_be_available_html', __( 'Enter your address to view shipping options.', 'woocommerce' ) ) );
|
||||
}
|
||||
elseif ( ! is_cart() ) :
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_no_shipping_available_html', __( 'There are no shipping options available. Please ensure that your address has been entered correctly, or contact us if you need any help.', 'woocommerce' ) ) );
|
||||
else :
|
||||
echo wp_kses_post(
|
||||
/**
|
||||
* Provides a means of overriding the default 'no shipping available' HTML string.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $html HTML message.
|
||||
* @param string $formatted_destination The formatted shipping destination.
|
||||
*/
|
||||
apply_filters(
|
||||
'woocommerce_cart_no_shipping_available_html',
|
||||
// Translators: $s shipping destination.
|
||||
sprintf( esc_html__( 'No shipping options were found for %s.', 'woocommerce' ) . ' ', '<strong>' . esc_html( $formatted_destination ) . '</strong>' ),
|
||||
$formatted_destination
|
||||
)
|
||||
);
|
||||
$calculator_text = esc_html__( 'Enter a different address', 'woocommerce' );
|
||||
endif;
|
||||
?>
|
||||
|
||||
<?php if ( $show_package_details ) : ?>
|
||||
<?php echo '<p class="woocommerce-shipping-contents"><small>' . esc_html( $package_details ) . '</small></p>'; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $show_shipping_calculator ) : ?>
|
||||
<?php woocommerce_shipping_calculator( $calculator_text ); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
112
wp/wp-content/plugins/woocommerce/templates/cart/cart-totals.php
Normal file
112
wp/wp-content/plugins/woocommerce/templates/cart/cart-totals.php
Normal file
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
/**
|
||||
* Cart totals
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/cart/cart-totals.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 2.3.6
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
?>
|
||||
<div class="cart_totals <?php echo ( WC()->customer->has_calculated_shipping() ) ? 'calculated_shipping' : ''; ?>">
|
||||
|
||||
<?php do_action( 'woocommerce_before_cart_totals' ); ?>
|
||||
|
||||
<h2><?php esc_html_e( 'Cart totals', 'woocommerce' ); ?></h2>
|
||||
|
||||
<table cellspacing="0" class="shop_table shop_table_responsive">
|
||||
|
||||
<tr class="cart-subtotal">
|
||||
<th><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?></th>
|
||||
<td data-title="<?php esc_attr_e( 'Subtotal', 'woocommerce' ); ?>"><?php wc_cart_totals_subtotal_html(); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php foreach ( WC()->cart->get_coupons() as $code => $coupon ) : ?>
|
||||
<tr class="cart-discount coupon-<?php echo esc_attr( sanitize_title( $code ) ); ?>">
|
||||
<th><?php wc_cart_totals_coupon_label( $coupon ); ?></th>
|
||||
<td data-title="<?php echo esc_attr( wc_cart_totals_coupon_label( $coupon, false ) ); ?>"><?php wc_cart_totals_coupon_html( $coupon ); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if ( WC()->cart->needs_shipping() && WC()->cart->show_shipping() ) : ?>
|
||||
|
||||
<?php do_action( 'woocommerce_cart_totals_before_shipping' ); ?>
|
||||
|
||||
<?php wc_cart_totals_shipping_html(); ?>
|
||||
|
||||
<?php do_action( 'woocommerce_cart_totals_after_shipping' ); ?>
|
||||
|
||||
<?php elseif ( WC()->cart->needs_shipping() && 'yes' === get_option( 'woocommerce_enable_shipping_calc' ) ) : ?>
|
||||
|
||||
<tr class="shipping">
|
||||
<th><?php esc_html_e( 'Shipping', 'woocommerce' ); ?></th>
|
||||
<td data-title="<?php esc_attr_e( 'Shipping', 'woocommerce' ); ?>"><?php woocommerce_shipping_calculator(); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php foreach ( WC()->cart->get_fees() as $fee ) : ?>
|
||||
<tr class="fee">
|
||||
<th><?php echo esc_html( $fee->name ); ?></th>
|
||||
<td data-title="<?php echo esc_attr( $fee->name ); ?>"><?php wc_cart_totals_fee_html( $fee ); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php
|
||||
if ( wc_tax_enabled() && ! WC()->cart->display_prices_including_tax() ) {
|
||||
$taxable_address = WC()->customer->get_taxable_address();
|
||||
$estimated_text = '';
|
||||
|
||||
if ( WC()->customer->is_customer_outside_base() && ! WC()->customer->has_calculated_shipping() ) {
|
||||
/* translators: %s location. */
|
||||
$estimated_text = sprintf( ' <small>' . esc_html__( '(estimated for %s)', 'woocommerce' ) . '</small>', WC()->countries->estimated_for_prefix( $taxable_address[0] ) . WC()->countries->countries[ $taxable_address[0] ] );
|
||||
}
|
||||
|
||||
if ( 'itemized' === get_option( 'woocommerce_tax_total_display' ) ) {
|
||||
foreach ( WC()->cart->get_tax_totals() as $code => $tax ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
||||
?>
|
||||
<tr class="tax-rate tax-rate-<?php echo esc_attr( sanitize_title( $code ) ); ?>">
|
||||
<th><?php echo esc_html( $tax->label ) . $estimated_text; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></th>
|
||||
<td data-title="<?php echo esc_attr( $tax->label ); ?>"><?php echo wp_kses_post( $tax->formatted_amount ); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<tr class="tax-total">
|
||||
<th><?php echo esc_html( WC()->countries->tax_or_vat() ) . $estimated_text; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></th>
|
||||
<td data-title="<?php echo esc_attr( WC()->countries->tax_or_vat() ); ?>"><?php wc_cart_totals_taxes_total_html(); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php do_action( 'woocommerce_cart_totals_before_order_total' ); ?>
|
||||
|
||||
<tr class="order-total">
|
||||
<th><?php esc_html_e( 'Total', 'woocommerce' ); ?></th>
|
||||
<td data-title="<?php esc_attr_e( 'Total', 'woocommerce' ); ?>"><?php wc_cart_totals_order_total_html(); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php do_action( 'woocommerce_cart_totals_after_order_total' ); ?>
|
||||
|
||||
</table>
|
||||
|
||||
<div class="wc-proceed-to-checkout">
|
||||
<?php do_action( 'woocommerce_proceed_to_checkout' ); ?>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_after_cart_totals' ); ?>
|
||||
|
||||
</div>
|
||||
195
wp/wp-content/plugins/woocommerce/templates/cart/cart.php
Normal file
195
wp/wp-content/plugins/woocommerce/templates/cart/cart.php
Normal file
@@ -0,0 +1,195 @@
|
||||
<?php
|
||||
/**
|
||||
* Cart Page
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/cart/cart.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 7.9.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
do_action( 'woocommerce_before_cart' ); ?>
|
||||
|
||||
<form class="woocommerce-cart-form" action="<?php echo esc_url( wc_get_cart_url() ); ?>" method="post">
|
||||
<?php do_action( 'woocommerce_before_cart_table' ); ?>
|
||||
|
||||
<table class="shop_table shop_table_responsive cart woocommerce-cart-form__contents" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="product-remove"><span class="screen-reader-text"><?php esc_html_e( 'Remove item', 'woocommerce' ); ?></span></th>
|
||||
<th class="product-thumbnail"><span class="screen-reader-text"><?php esc_html_e( 'Thumbnail image', 'woocommerce' ); ?></span></th>
|
||||
<th class="product-name"><?php esc_html_e( 'Product', 'woocommerce' ); ?></th>
|
||||
<th class="product-price"><?php esc_html_e( 'Price', 'woocommerce' ); ?></th>
|
||||
<th class="product-quantity"><?php esc_html_e( 'Quantity', 'woocommerce' ); ?></th>
|
||||
<th class="product-subtotal"><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php do_action( 'woocommerce_before_cart_contents' ); ?>
|
||||
|
||||
<?php
|
||||
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
|
||||
$_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
|
||||
$product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key );
|
||||
/**
|
||||
* Filter the product name.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @param string $product_name Name of the product in the cart.
|
||||
* @param array $cart_item The product in the cart.
|
||||
* @param string $cart_item_key Key for the product in the cart.
|
||||
*/
|
||||
$product_name = apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key );
|
||||
|
||||
if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
|
||||
$product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key );
|
||||
?>
|
||||
<tr class="woocommerce-cart-form__cart-item <?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">
|
||||
|
||||
<td class="product-remove">
|
||||
<?php
|
||||
echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
'woocommerce_cart_item_remove_link',
|
||||
sprintf(
|
||||
'<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">×</a>',
|
||||
esc_url( wc_get_cart_remove_url( $cart_item_key ) ),
|
||||
/* translators: %s is the product name */
|
||||
esc_attr( sprintf( __( 'Remove %s from cart', 'woocommerce' ), wp_strip_all_tags( $product_name ) ) ),
|
||||
esc_attr( $product_id ),
|
||||
esc_attr( $_product->get_sku() )
|
||||
),
|
||||
$cart_item_key
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-thumbnail">
|
||||
<?php
|
||||
$thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );
|
||||
|
||||
if ( ! $product_permalink ) {
|
||||
echo $thumbnail; // PHPCS: XSS ok.
|
||||
} else {
|
||||
printf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $thumbnail ); // PHPCS: XSS ok.
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-name" data-title="<?php esc_attr_e( 'Product', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
if ( ! $product_permalink ) {
|
||||
echo wp_kses_post( $product_name . ' ' );
|
||||
} else {
|
||||
/**
|
||||
* This filter is documented above.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*/
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', sprintf( '<a href="%s">%s</a>', esc_url( $product_permalink ), $_product->get_name() ), $cart_item, $cart_item_key ) );
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_after_cart_item_name', $cart_item, $cart_item_key );
|
||||
|
||||
// Meta data.
|
||||
echo wc_get_formatted_cart_item_data( $cart_item ); // PHPCS: XSS ok.
|
||||
|
||||
// Backorder notification.
|
||||
if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $cart_item['quantity'] ) ) {
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_cart_item_backorder_notification', '<p class="backorder_notification">' . esc_html__( 'Available on backorder', 'woocommerce' ) . '</p>', $product_id ) );
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-price" data-title="<?php esc_attr_e( 'Price', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
echo apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); // PHPCS: XSS ok.
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-quantity" data-title="<?php esc_attr_e( 'Quantity', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
if ( $_product->is_sold_individually() ) {
|
||||
$min_quantity = 1;
|
||||
$max_quantity = 1;
|
||||
} else {
|
||||
$min_quantity = 0;
|
||||
$max_quantity = $_product->get_max_purchase_quantity();
|
||||
}
|
||||
|
||||
$product_quantity = woocommerce_quantity_input(
|
||||
array(
|
||||
'input_name' => "cart[{$cart_item_key}][qty]",
|
||||
'input_value' => $cart_item['quantity'],
|
||||
'max_value' => $max_quantity,
|
||||
'min_value' => $min_quantity,
|
||||
'product_name' => $product_name,
|
||||
),
|
||||
$_product,
|
||||
false
|
||||
);
|
||||
|
||||
echo apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item ); // PHPCS: XSS ok.
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="product-subtotal" data-title="<?php esc_attr_e( 'Subtotal', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); // PHPCS: XSS ok.
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php do_action( 'woocommerce_cart_contents' ); ?>
|
||||
|
||||
<tr>
|
||||
<td colspan="6" class="actions">
|
||||
|
||||
<?php if ( wc_coupons_enabled() ) { ?>
|
||||
<div class="coupon">
|
||||
<label for="coupon_code" class="screen-reader-text"><?php esc_html_e( 'Coupon:', 'woocommerce' ); ?></label> <input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" /> <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="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?>"><?php esc_html_e( 'Apply coupon', 'woocommerce' ); ?></button>
|
||||
<?php do_action( 'woocommerce_cart_coupon' ); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<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="update_cart" value="<?php esc_attr_e( 'Update cart', 'woocommerce' ); ?>"><?php esc_html_e( 'Update cart', 'woocommerce' ); ?></button>
|
||||
|
||||
<?php do_action( 'woocommerce_cart_actions' ); ?>
|
||||
|
||||
<?php wp_nonce_field( 'woocommerce-cart', 'woocommerce-cart-nonce' ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php do_action( 'woocommerce_after_cart_contents' ); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php do_action( 'woocommerce_after_cart_table' ); ?>
|
||||
</form>
|
||||
|
||||
<?php do_action( 'woocommerce_before_cart_collaterals' ); ?>
|
||||
|
||||
<div class="cart-collaterals">
|
||||
<?php
|
||||
/**
|
||||
* Cart collaterals hook.
|
||||
*
|
||||
* @hooked woocommerce_cross_sell_display
|
||||
* @hooked woocommerce_cart_totals - 10
|
||||
*/
|
||||
do_action( 'woocommerce_cart_collaterals' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_after_cart' ); ?>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* Cross-sells
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/cart/cross-sells.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 4.4.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
if ( $cross_sells ) : ?>
|
||||
|
||||
<div class="cross-sells">
|
||||
<?php
|
||||
$heading = apply_filters( 'woocommerce_product_cross_sells_products_heading', __( 'You may be interested in…', 'woocommerce' ) );
|
||||
|
||||
if ( $heading ) :
|
||||
?>
|
||||
<h2><?php echo esc_html( $heading ); ?></h2>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php woocommerce_product_loop_start(); ?>
|
||||
|
||||
<?php foreach ( $cross_sells as $cross_sell ) : ?>
|
||||
|
||||
<?php
|
||||
$post_object = get_post( $cross_sell->get_id() );
|
||||
|
||||
setup_postdata( $GLOBALS['post'] =& $post_object ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited, Squiz.PHP.DisallowMultipleAssignments.Found
|
||||
|
||||
wc_get_template_part( 'content', 'product' );
|
||||
?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php woocommerce_product_loop_end(); ?>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
wp_reset_postdata();
|
||||
102
wp/wp-content/plugins/woocommerce/templates/cart/mini-cart.php
Normal file
102
wp/wp-content/plugins/woocommerce/templates/cart/mini-cart.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
/**
|
||||
* Mini-cart
|
||||
*
|
||||
* Contains the markup for the mini-cart, used by the cart widget.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/cart/mini-cart.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 7.9.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
do_action( 'woocommerce_before_mini_cart' ); ?>
|
||||
|
||||
<?php if ( ! WC()->cart->is_empty() ) : ?>
|
||||
|
||||
<ul class="woocommerce-mini-cart cart_list product_list_widget <?php echo esc_attr( $args['list_class'] ); ?>">
|
||||
<?php
|
||||
do_action( 'woocommerce_before_mini_cart_contents' );
|
||||
|
||||
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
|
||||
$_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
|
||||
$product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key );
|
||||
|
||||
if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_widget_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
|
||||
/**
|
||||
* This filter is documented in woocommerce/templates/cart/cart.php.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*/
|
||||
$product_name = apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key );
|
||||
$thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );
|
||||
$product_price = apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key );
|
||||
$product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key );
|
||||
?>
|
||||
<li class="woocommerce-mini-cart-item <?php echo esc_attr( apply_filters( 'woocommerce_mini_cart_item_class', 'mini_cart_item', $cart_item, $cart_item_key ) ); ?>">
|
||||
<?php
|
||||
echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
'woocommerce_cart_item_remove_link',
|
||||
sprintf(
|
||||
'<a href="%s" class="remove remove_from_cart_button" aria-label="%s" data-product_id="%s" data-cart_item_key="%s" data-product_sku="%s">×</a>',
|
||||
esc_url( wc_get_cart_remove_url( $cart_item_key ) ),
|
||||
/* translators: %s is the product name */
|
||||
esc_attr( sprintf( __( 'Remove %s from cart', 'woocommerce' ), wp_strip_all_tags( $product_name ) ) ),
|
||||
esc_attr( $product_id ),
|
||||
esc_attr( $cart_item_key ),
|
||||
esc_attr( $_product->get_sku() )
|
||||
),
|
||||
$cart_item_key
|
||||
);
|
||||
?>
|
||||
<?php if ( empty( $product_permalink ) ) : ?>
|
||||
<?php echo $thumbnail . wp_kses_post( $product_name ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php else : ?>
|
||||
<a href="<?php echo esc_url( $product_permalink ); ?>">
|
||||
<?php echo $thumbnail . wp_kses_post( $product_name ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php echo wc_get_formatted_cart_item_data( $cart_item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php echo apply_filters( 'woocommerce_widget_cart_item_quantity', '<span class="quantity">' . sprintf( '%s × %s', $cart_item['quantity'], $product_price ) . '</span>', $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_mini_cart_contents' );
|
||||
?>
|
||||
</ul>
|
||||
|
||||
<p class="woocommerce-mini-cart__total total">
|
||||
<?php
|
||||
/**
|
||||
* Hook: woocommerce_widget_shopping_cart_total.
|
||||
*
|
||||
* @hooked woocommerce_widget_shopping_cart_subtotal - 10
|
||||
*/
|
||||
do_action( 'woocommerce_widget_shopping_cart_total' );
|
||||
?>
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_widget_shopping_cart_before_buttons' ); ?>
|
||||
|
||||
<p class="woocommerce-mini-cart__buttons buttons"><?php do_action( 'woocommerce_widget_shopping_cart_buttons' ); ?></p>
|
||||
|
||||
<?php do_action( 'woocommerce_widget_shopping_cart_after_buttons' ); ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<p class="woocommerce-mini-cart__empty-message"><?php esc_html_e( 'No products in the cart.', 'woocommerce' ); ?></p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_after_mini_cart' ); ?>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Proceed to checkout button
|
||||
*
|
||||
* Contains the markup for the proceed to checkout button on the cart.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/cart/proceed-to-checkout-button.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 7.0.1
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
?>
|
||||
|
||||
<a href="<?php echo esc_url( wc_get_checkout_url() ); ?>" class="checkout-button button alt wc-forward<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>">
|
||||
<?php esc_html_e( 'Proceed to checkout', 'woocommerce' ); ?>
|
||||
</a>
|
||||
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
/**
|
||||
* Shipping Calculator
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/cart/shipping-calculator.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 7.0.1
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
do_action( 'woocommerce_before_shipping_calculator' ); ?>
|
||||
|
||||
<form class="woocommerce-shipping-calculator" action="<?php echo esc_url( wc_get_cart_url() ); ?>" method="post">
|
||||
|
||||
<?php printf( '<a href="#" class="shipping-calculator-button">%s</a>', esc_html( ! empty( $button_text ) ? $button_text : __( 'Calculate shipping', 'woocommerce' ) ) ); ?>
|
||||
|
||||
<section class="shipping-calculator-form" style="display:none;">
|
||||
|
||||
<?php if ( apply_filters( 'woocommerce_shipping_calculator_enable_country', true ) ) : ?>
|
||||
<p class="form-row form-row-wide" id="calc_shipping_country_field">
|
||||
<label for="calc_shipping_country" class="screen-reader-text"><?php esc_html_e( 'Country / region:', 'woocommerce' ); ?></label>
|
||||
<select name="calc_shipping_country" id="calc_shipping_country" class="country_to_state country_select" rel="calc_shipping_state">
|
||||
<option value="default"><?php esc_html_e( 'Select a country / region…', 'woocommerce' ); ?></option>
|
||||
<?php
|
||||
foreach ( WC()->countries->get_shipping_countries() as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '"' . selected( WC()->customer->get_shipping_country(), esc_attr( $key ), false ) . '>' . esc_html( $value ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( apply_filters( 'woocommerce_shipping_calculator_enable_state', true ) ) : ?>
|
||||
<p class="form-row form-row-wide" id="calc_shipping_state_field">
|
||||
<?php
|
||||
$current_cc = WC()->customer->get_shipping_country();
|
||||
$current_r = WC()->customer->get_shipping_state();
|
||||
$states = WC()->countries->get_states( $current_cc );
|
||||
|
||||
if ( is_array( $states ) && empty( $states ) ) {
|
||||
?>
|
||||
<input type="hidden" name="calc_shipping_state" id="calc_shipping_state" placeholder="<?php esc_attr_e( 'State / County', 'woocommerce' ); ?>" />
|
||||
<?php
|
||||
} elseif ( is_array( $states ) ) {
|
||||
?>
|
||||
<span>
|
||||
<label for="calc_shipping_state" class="screen-reader-text"><?php esc_html_e( 'State / County:', 'woocommerce' ); ?></label>
|
||||
<select name="calc_shipping_state" class="state_select" id="calc_shipping_state" data-placeholder="<?php esc_attr_e( 'State / County', 'woocommerce' ); ?>">
|
||||
<option value=""><?php esc_html_e( 'Select an option…', 'woocommerce' ); ?></option>
|
||||
<?php
|
||||
foreach ( $states as $ckey => $cvalue ) {
|
||||
echo '<option value="' . esc_attr( $ckey ) . '" ' . selected( $current_r, $ckey, false ) . '>' . esc_html( $cvalue ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<label for="calc_shipping_state" class="screen-reader-text"><?php esc_html_e( 'State / County:', 'woocommerce' ); ?></label>
|
||||
<input type="text" class="input-text" value="<?php echo esc_attr( $current_r ); ?>" placeholder="<?php esc_attr_e( 'State / County', 'woocommerce' ); ?>" name="calc_shipping_state" id="calc_shipping_state" />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( apply_filters( 'woocommerce_shipping_calculator_enable_city', true ) ) : ?>
|
||||
<p class="form-row form-row-wide" id="calc_shipping_city_field">
|
||||
<label for="calc_shipping_city" class="screen-reader-text"><?php esc_html_e( 'City:', 'woocommerce' ); ?></label>
|
||||
<input type="text" class="input-text" value="<?php echo esc_attr( WC()->customer->get_shipping_city() ); ?>" placeholder="<?php esc_attr_e( 'City', 'woocommerce' ); ?>" name="calc_shipping_city" id="calc_shipping_city" />
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( apply_filters( 'woocommerce_shipping_calculator_enable_postcode', true ) ) : ?>
|
||||
<p class="form-row form-row-wide" id="calc_shipping_postcode_field">
|
||||
<label for="calc_shipping_postcode" class="screen-reader-text"><?php esc_html_e( 'Postcode / ZIP:', 'woocommerce' ); ?></label>
|
||||
<input type="text" class="input-text" value="<?php echo esc_attr( WC()->customer->get_shipping_postcode() ); ?>" placeholder="<?php esc_attr_e( 'Postcode / ZIP', 'woocommerce' ); ?>" name="calc_shipping_postcode" id="calc_shipping_postcode" />
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<p><button type="submit" name="calc_shipping" value="1" class="button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>"><?php esc_html_e( 'Update', 'woocommerce' ); ?></button></p>
|
||||
<?php wp_nonce_field( 'woocommerce-shipping-calculator', 'woocommerce-shipping-calculator-nonce' ); ?>
|
||||
</section>
|
||||
</form>
|
||||
|
||||
<?php do_action( 'woocommerce_after_shipping_calculator' ); ?>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Cart errors page
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/cart-errors.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.5.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
?>
|
||||
|
||||
<p><?php esc_html_e( 'There are some issues with the items in your cart. Please go back to the cart page and resolve these issues before checking out.', 'woocommerce' ); ?></p>
|
||||
|
||||
<?php do_action( 'woocommerce_cart_has_errors' ); ?>
|
||||
|
||||
<p><a class="button wc-backward" href="<?php echo esc_url( wc_get_cart_url() ); ?>"><?php esc_html_e( 'Return to cart', 'woocommerce' ); ?></a></p>
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* Checkout billing information form
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-billing.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.6.0
|
||||
* @global WC_Checkout $checkout
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
?>
|
||||
<div class="woocommerce-billing-fields">
|
||||
<?php if ( wc_ship_to_billing_address_only() && WC()->cart->needs_shipping() ) : ?>
|
||||
|
||||
<h3><?php esc_html_e( 'Billing & Shipping', 'woocommerce' ); ?></h3>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<h3><?php esc_html_e( 'Billing details', 'woocommerce' ); ?></h3>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_before_checkout_billing_form', $checkout ); ?>
|
||||
|
||||
<div class="woocommerce-billing-fields__field-wrapper">
|
||||
<?php
|
||||
$fields = $checkout->get_checkout_fields( 'billing' );
|
||||
|
||||
foreach ( $fields as $key => $field ) {
|
||||
woocommerce_form_field( $key, $field, $checkout->get_value( $key ) );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_after_checkout_billing_form', $checkout ); ?>
|
||||
</div>
|
||||
|
||||
<?php if ( ! is_user_logged_in() && $checkout->is_registration_enabled() ) : ?>
|
||||
<div class="woocommerce-account-fields">
|
||||
<?php if ( ! $checkout->is_registration_required() ) : ?>
|
||||
|
||||
<p class="form-row form-row-wide create-account">
|
||||
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox">
|
||||
<input class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" id="createaccount" <?php checked( ( true === $checkout->get_value( 'createaccount' ) || ( true === apply_filters( 'woocommerce_create_account_default_checked', false ) ) ), true ); ?> type="checkbox" name="createaccount" value="1" /> <span><?php esc_html_e( 'Create an account?', 'woocommerce' ); ?></span>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_before_checkout_registration_form', $checkout ); ?>
|
||||
|
||||
<?php if ( $checkout->get_checkout_fields( 'account' ) ) : ?>
|
||||
|
||||
<div class="create-account">
|
||||
<?php foreach ( $checkout->get_checkout_fields( 'account' ) as $key => $field ) : ?>
|
||||
<?php woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); ?>
|
||||
<?php endforeach; ?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_after_checkout_registration_form', $checkout ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* Checkout Form
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-checkout.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.5.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_before_checkout_form', $checkout );
|
||||
|
||||
// If checkout registration is disabled and not logged in, the user cannot checkout.
|
||||
if ( ! $checkout->is_registration_enabled() && $checkout->is_registration_required() && ! is_user_logged_in() ) {
|
||||
echo esc_html( apply_filters( 'woocommerce_checkout_must_be_logged_in_message', __( 'You must be logged in to checkout.', 'woocommerce' ) ) );
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<form name="checkout" method="post" class="checkout woocommerce-checkout" action="<?php echo esc_url( wc_get_checkout_url() ); ?>" enctype="multipart/form-data">
|
||||
|
||||
<?php if ( $checkout->get_checkout_fields() ) : ?>
|
||||
|
||||
<?php do_action( 'woocommerce_checkout_before_customer_details' ); ?>
|
||||
|
||||
<div class="col2-set" id="customer_details">
|
||||
<div class="col-1">
|
||||
<?php do_action( 'woocommerce_checkout_billing' ); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<?php do_action( 'woocommerce_checkout_shipping' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_checkout_after_customer_details' ); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_checkout_before_order_review_heading' ); ?>
|
||||
|
||||
<h3 id="order_review_heading"><?php esc_html_e( 'Your order', 'woocommerce' ); ?></h3>
|
||||
|
||||
<?php do_action( 'woocommerce_checkout_before_order_review' ); ?>
|
||||
|
||||
<div id="order_review" class="woocommerce-checkout-review-order">
|
||||
<?php do_action( 'woocommerce_checkout_order_review' ); ?>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_checkout_after_order_review' ); ?>
|
||||
|
||||
</form>
|
||||
|
||||
<?php do_action( 'woocommerce_after_checkout_form', $checkout ); ?>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Checkout coupon form
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-coupon.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 7.0.1
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
if ( ! wc_coupons_enabled() ) { // @codingStandardsIgnoreLine.
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="woocommerce-form-coupon-toggle">
|
||||
<?php wc_print_notice( apply_filters( 'woocommerce_checkout_coupon_message', esc_html__( 'Have a coupon?', 'woocommerce' ) . ' <a href="#" class="showcoupon">' . esc_html__( 'Click here to enter your code', 'woocommerce' ) . '</a>' ), 'notice' ); ?>
|
||||
</div>
|
||||
|
||||
<form class="checkout_coupon woocommerce-form-coupon" method="post" style="display:none">
|
||||
|
||||
<p><?php esc_html_e( 'If you have a coupon code, please apply it below.', 'woocommerce' ); ?></p>
|
||||
|
||||
<p class="form-row form-row-first">
|
||||
<label for="coupon_code" class="screen-reader-text"><?php esc_html_e( 'Coupon:', 'woocommerce' ); ?></label>
|
||||
<input type="text" name="coupon_code" class="input-text" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" id="coupon_code" value="" />
|
||||
</p>
|
||||
|
||||
<p class="form-row form-row-last">
|
||||
<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="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?>"><?php esc_html_e( 'Apply coupon', 'woocommerce' ); ?></button>
|
||||
</p>
|
||||
|
||||
<div class="clear"></div>
|
||||
</form>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* Checkout login form
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.8.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
if ( is_user_logged_in() || 'no' === get_option( 'woocommerce_enable_checkout_login_reminder' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="woocommerce-form-login-toggle">
|
||||
<?php wc_print_notice( apply_filters( 'woocommerce_checkout_login_message', esc_html__( 'Returning customer?', 'woocommerce' ) ) . ' <a href="#" class="showlogin">' . esc_html__( 'Click here to login', 'woocommerce' ) . '</a>', 'notice' ); ?>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
woocommerce_login_form(
|
||||
array(
|
||||
'message' => esc_html__( 'If you have shopped with us before, please enter your details below. If you are a new customer, please proceed to the Billing section.', 'woocommerce' ),
|
||||
'redirect' => wc_get_checkout_url(),
|
||||
'hidden' => true,
|
||||
)
|
||||
);
|
||||
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
/**
|
||||
* Pay for order form
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-pay.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 8.2.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
$totals = $order->get_order_item_totals(); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
||||
?>
|
||||
<form id="order_review" method="post">
|
||||
|
||||
<table class="shop_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="product-name"><?php esc_html_e( 'Product', 'woocommerce' ); ?></th>
|
||||
<th class="product-quantity"><?php esc_html_e( 'Qty', 'woocommerce' ); ?></th>
|
||||
<th class="product-total"><?php esc_html_e( 'Totals', 'woocommerce' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ( count( $order->get_items() ) > 0 ) : ?>
|
||||
<?php foreach ( $order->get_items() as $item_id => $item ) : ?>
|
||||
<?php
|
||||
if ( ! apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<tr class="<?php echo esc_attr( apply_filters( 'woocommerce_order_item_class', 'order_item', $item, $order ) ); ?>">
|
||||
<td class="product-name">
|
||||
<?php
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, false ) );
|
||||
|
||||
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, false );
|
||||
|
||||
wc_display_item_meta( $item );
|
||||
|
||||
do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, false );
|
||||
?>
|
||||
</td>
|
||||
<td class="product-quantity"><?php echo apply_filters( 'woocommerce_order_item_quantity_html', ' <strong class="product-quantity">' . sprintf( '× %s', esc_html( $item->get_quantity() ) ) . '</strong>', $item ); ?></td><?php // @codingStandardsIgnoreLine ?>
|
||||
<td class="product-subtotal"><?php echo $order->get_formatted_line_subtotal( $item ); ?></td><?php // @codingStandardsIgnoreLine ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<?php if ( $totals ) : ?>
|
||||
<?php foreach ( $totals as $total ) : ?>
|
||||
<tr>
|
||||
<th scope="row" colspan="2"><?php echo $total['label']; ?></th><?php // @codingStandardsIgnoreLine ?>
|
||||
<td class="product-total"><?php echo $total['value']; ?></td><?php // @codingStandardsIgnoreLine ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Triggered from within the checkout/form-pay.php template, immediately before the payment section.
|
||||
*
|
||||
* @since 8.2.0
|
||||
*/
|
||||
do_action( 'woocommerce_pay_order_before_payment' );
|
||||
?>
|
||||
|
||||
<div id="payment">
|
||||
<?php if ( $order->needs_payment() ) : ?>
|
||||
<ul class="wc_payment_methods payment_methods methods">
|
||||
<?php
|
||||
if ( ! empty( $available_gateways ) ) {
|
||||
foreach ( $available_gateways as $gateway ) {
|
||||
wc_get_template( 'checkout/payment-method.php', array( 'gateway' => $gateway ) );
|
||||
}
|
||||
} else {
|
||||
echo '<li>';
|
||||
wc_print_notice( apply_filters( 'woocommerce_no_available_payment_methods_message', esc_html__( 'Sorry, it seems that there are no available payment methods for your location. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) ), 'notice' ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
|
||||
echo '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<div class="form-row">
|
||||
<input type="hidden" name="woocommerce_pay" value="1" />
|
||||
|
||||
<?php wc_get_template( 'checkout/terms.php' ); ?>
|
||||
|
||||
<?php do_action( 'woocommerce_pay_order_before_submit' ); ?>
|
||||
|
||||
<?php echo apply_filters( 'woocommerce_pay_order_button_html', '<button type="submit" class="button alt' . esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ) . '" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) . '</button>' ); // @codingStandardsIgnoreLine ?>
|
||||
|
||||
<?php do_action( 'woocommerce_pay_order_after_submit' ); ?>
|
||||
|
||||
<?php wp_nonce_field( 'woocommerce-pay', 'woocommerce-pay-nonce' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* Checkout shipping information form
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-shipping.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.6.0
|
||||
* @global WC_Checkout $checkout
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
?>
|
||||
<div class="woocommerce-shipping-fields">
|
||||
<?php if ( true === WC()->cart->needs_shipping_address() ) : ?>
|
||||
|
||||
<h3 id="ship-to-different-address">
|
||||
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox">
|
||||
<input id="ship-to-different-address-checkbox" class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" <?php checked( apply_filters( 'woocommerce_ship_to_different_address_checked', 'shipping' === get_option( 'woocommerce_ship_to_destination' ) ? 1 : 0 ), 1 ); ?> type="checkbox" name="ship_to_different_address" value="1" /> <span><?php esc_html_e( 'Ship to a different address?', 'woocommerce' ); ?></span>
|
||||
</label>
|
||||
</h3>
|
||||
|
||||
<div class="shipping_address">
|
||||
|
||||
<?php do_action( 'woocommerce_before_checkout_shipping_form', $checkout ); ?>
|
||||
|
||||
<div class="woocommerce-shipping-fields__field-wrapper">
|
||||
<?php
|
||||
$fields = $checkout->get_checkout_fields( 'shipping' );
|
||||
|
||||
foreach ( $fields as $key => $field ) {
|
||||
woocommerce_form_field( $key, $field, $checkout->get_value( $key ) );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_after_checkout_shipping_form', $checkout ); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="woocommerce-additional-fields">
|
||||
<?php do_action( 'woocommerce_before_order_notes', $checkout ); ?>
|
||||
|
||||
<?php if ( apply_filters( 'woocommerce_enable_order_notes_field', 'yes' === get_option( 'woocommerce_enable_order_comments', 'yes' ) ) ) : ?>
|
||||
|
||||
<?php if ( ! WC()->cart->needs_shipping() || wc_ship_to_billing_address_only() ) : ?>
|
||||
|
||||
<h3><?php esc_html_e( 'Additional information', 'woocommerce' ); ?></h3>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="woocommerce-additional-fields__field-wrapper">
|
||||
<?php foreach ( $checkout->get_checkout_fields( 'order' ) as $key => $field ) : ?>
|
||||
<?php woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_after_order_notes', $checkout ); ?>
|
||||
</div>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/**
|
||||
* Email verification page.
|
||||
*
|
||||
* This displays instead of the thankyou page any time that the customer cannot be identified.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/thankyou-verify-email.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 7.9.0
|
||||
*
|
||||
* @var bool $failed_submission Indicates if the last attempt to verify failed.
|
||||
* @var string $verify_url The URL for the email verification form.
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
?>
|
||||
<form name="checkout" method="post" class="woocommerce-form woocommerce-verify-email" action="<?php echo esc_url( $verify_url ); ?>" enctype="multipart/form-data">
|
||||
|
||||
<?php
|
||||
wp_nonce_field( 'wc_verify_email', 'check_submission' );
|
||||
|
||||
if ( $failed_submission ) {
|
||||
wc_print_notice( esc_html__( 'We were unable to verify the email address you provided. Please try again.', 'woocommerce' ), 'error' );
|
||||
}
|
||||
?>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: 1: opening login link 2: closing login link */
|
||||
esc_html__( 'To view this page, you must either %1$slogin%2$s or verify the email address associated with the order.', 'woocommerce' ),
|
||||
'<a href="' . esc_url( wc_get_page_permalink( 'myaccount' ) ) . '">',
|
||||
'</a>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
|
||||
<p class="form-row">
|
||||
<label for="email"><?php esc_html_e( 'Email address', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="email" class="input-text" name="email" id="email" autocomplete="email" />
|
||||
</p>
|
||||
|
||||
<p class="form-row">
|
||||
<button type="submit" class="woocommerce-button button <?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ); ?>" name="verify" value="1">
|
||||
<?php esc_html_e( 'Verify', 'woocommerce' ); ?>
|
||||
</button>
|
||||
</p>
|
||||
</form>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Checkout Order Receipt Template
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/order-receipt.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.2.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
|
||||
<ul class="order_details">
|
||||
<li class="order">
|
||||
<?php esc_html_e( 'Order number:', 'woocommerce' ); ?>
|
||||
<strong><?php echo esc_html( $order->get_order_number() ); ?></strong>
|
||||
</li>
|
||||
<li class="date">
|
||||
<?php esc_html_e( 'Date:', 'woocommerce' ); ?>
|
||||
<strong><?php echo esc_html( wc_format_datetime( $order->get_date_created() ) ); ?></strong>
|
||||
</li>
|
||||
<li class="total">
|
||||
<?php esc_html_e( 'Total:', 'woocommerce' ); ?>
|
||||
<strong><?php echo wp_kses_post( $order->get_formatted_order_total() ); ?></strong>
|
||||
</li>
|
||||
<?php if ( $order->get_payment_method_title() ) : ?>
|
||||
<li class="method">
|
||||
<?php esc_html_e( 'Payment method:', 'woocommerce' ); ?>
|
||||
<strong><?php echo wp_kses_post( $order->get_payment_method_title() ); ?></strong>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
|
||||
<?php do_action( 'woocommerce_receipt_' . $order->get_payment_method(), $order->get_id() ); ?>
|
||||
|
||||
<div class="clear"></div>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* "Order received" message.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/order-received.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 8.8.0
|
||||
*
|
||||
* @var WC_Order|false $order
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
?>
|
||||
|
||||
<p class="woocommerce-notice woocommerce-notice--success woocommerce-thankyou-order-received">
|
||||
<?php
|
||||
/**
|
||||
* Filter the message shown after a checkout is complete.
|
||||
*
|
||||
* @since 2.2.0
|
||||
*
|
||||
* @param string $message The message.
|
||||
* @param WC_Order|false $order The order created during checkout, or false if order data is not available.
|
||||
*/
|
||||
$message = apply_filters(
|
||||
'woocommerce_thankyou_order_received_text',
|
||||
esc_html( __( 'Thank you. Your order has been received.', 'woocommerce' ) ),
|
||||
$order
|
||||
);
|
||||
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo $message;
|
||||
?>
|
||||
</p>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Output a single payment method
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.5.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<li class="wc_payment_method 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 ); ?> data-order_button_text="<?php echo esc_attr( $gateway->order_button_text ); ?>" />
|
||||
|
||||
<label for="payment_method_<?php echo esc_attr( $gateway->id ); ?>">
|
||||
<?php echo $gateway->get_title(); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?> <?php echo $gateway->get_icon(); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
|
||||
</label>
|
||||
<?php if ( $gateway->has_fields() || $gateway->get_description() ) : ?>
|
||||
<div class="payment_box payment_method_<?php echo esc_attr( $gateway->id ); ?>" <?php if ( ! $gateway->chosen ) : /* phpcs:ignore Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace */ ?>style="display:none;"<?php endif; /* phpcs:ignore Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace */ ?>>
|
||||
<?php $gateway->payment_fields(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* Checkout Payment Section
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/payment.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 8.1.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
if ( ! wp_doing_ajax() ) {
|
||||
do_action( 'woocommerce_review_order_before_payment' );
|
||||
}
|
||||
?>
|
||||
<div id="payment" class="woocommerce-checkout-payment">
|
||||
<?php if ( WC()->cart->needs_payment() ) : ?>
|
||||
<ul class="wc_payment_methods payment_methods methods">
|
||||
<?php
|
||||
if ( ! empty( $available_gateways ) ) {
|
||||
foreach ( $available_gateways as $gateway ) {
|
||||
wc_get_template( 'checkout/payment-method.php', array( 'gateway' => $gateway ) );
|
||||
}
|
||||
} else {
|
||||
echo '<li>';
|
||||
wc_print_notice( apply_filters( 'woocommerce_no_available_payment_methods_message', WC()->customer->get_billing_country() ? esc_html__( 'Sorry, it seems that there are no available payment methods. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) : esc_html__( 'Please fill in your details above to see available payment methods.', 'woocommerce' ) ), 'notice' ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
|
||||
echo '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<div class="form-row place-order">
|
||||
<noscript>
|
||||
<?php
|
||||
/* translators: $1 and $2 opening and closing emphasis tags respectively */
|
||||
printf( esc_html__( 'Since your browser does not support JavaScript, or it is disabled, please ensure you click the %1$sUpdate Totals%2$s button before placing your order. You may be charged more than the amount stated above if you fail to do so.', 'woocommerce' ), '<em>', '</em>' );
|
||||
?>
|
||||
<br/><button type="submit" class="button alt<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?>" name="woocommerce_checkout_update_totals" value="<?php esc_attr_e( 'Update totals', 'woocommerce' ); ?>"><?php esc_html_e( 'Update totals', 'woocommerce' ); ?></button>
|
||||
</noscript>
|
||||
|
||||
<?php wc_get_template( 'checkout/terms.php' ); ?>
|
||||
|
||||
<?php do_action( 'woocommerce_review_order_before_submit' ); ?>
|
||||
|
||||
<?php echo apply_filters( 'woocommerce_order_button_html', '<button type="submit" class="button alt' . esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ) . '" name="woocommerce_checkout_place_order" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '">' . esc_html( $order_button_text ) . '</button>' ); // @codingStandardsIgnoreLine ?>
|
||||
|
||||
<?php do_action( 'woocommerce_review_order_after_submit' ); ?>
|
||||
|
||||
<?php wp_nonce_field( 'woocommerce-process_checkout', 'woocommerce-process-checkout-nonce' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if ( ! wp_doing_ajax() ) {
|
||||
do_action( 'woocommerce_review_order_after_payment' );
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
/**
|
||||
* Review order table
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/review-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 5.2.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
?>
|
||||
<table class="shop_table woocommerce-checkout-review-order-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="product-name"><?php esc_html_e( 'Product', 'woocommerce' ); ?></th>
|
||||
<th class="product-total"><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
do_action( 'woocommerce_review_order_before_cart_contents' );
|
||||
|
||||
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
|
||||
$_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
|
||||
|
||||
if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_checkout_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
|
||||
?>
|
||||
<tr class="<?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">
|
||||
<td class="product-name">
|
||||
<?php echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) ) . ' '; ?>
|
||||
<?php echo apply_filters( 'woocommerce_checkout_cart_item_quantity', ' <strong class="product-quantity">' . sprintf( '× %s', $cart_item['quantity'] ) . '</strong>', $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php echo wc_get_formatted_cart_item_data( $cart_item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</td>
|
||||
<td class="product-total">
|
||||
<?php echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_review_order_after_cart_contents' );
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
|
||||
<tr class="cart-subtotal">
|
||||
<th><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?></th>
|
||||
<td><?php wc_cart_totals_subtotal_html(); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php foreach ( WC()->cart->get_coupons() as $code => $coupon ) : ?>
|
||||
<tr class="cart-discount coupon-<?php echo esc_attr( sanitize_title( $code ) ); ?>">
|
||||
<th><?php wc_cart_totals_coupon_label( $coupon ); ?></th>
|
||||
<td><?php wc_cart_totals_coupon_html( $coupon ); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if ( WC()->cart->needs_shipping() && WC()->cart->show_shipping() ) : ?>
|
||||
|
||||
<?php do_action( 'woocommerce_review_order_before_shipping' ); ?>
|
||||
|
||||
<?php wc_cart_totals_shipping_html(); ?>
|
||||
|
||||
<?php do_action( 'woocommerce_review_order_after_shipping' ); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php foreach ( WC()->cart->get_fees() as $fee ) : ?>
|
||||
<tr class="fee">
|
||||
<th><?php echo esc_html( $fee->name ); ?></th>
|
||||
<td><?php wc_cart_totals_fee_html( $fee ); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if ( wc_tax_enabled() && ! WC()->cart->display_prices_including_tax() ) : ?>
|
||||
<?php if ( 'itemized' === get_option( 'woocommerce_tax_total_display' ) ) : ?>
|
||||
<?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited ?>
|
||||
<tr class="tax-rate tax-rate-<?php echo esc_attr( sanitize_title( $code ) ); ?>">
|
||||
<th><?php echo esc_html( $tax->label ); ?></th>
|
||||
<td><?php echo wp_kses_post( $tax->formatted_amount ); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php else : ?>
|
||||
<tr class="tax-total">
|
||||
<th><?php echo esc_html( WC()->countries->tax_or_vat() ); ?></th>
|
||||
<td><?php wc_cart_totals_taxes_total_html(); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_review_order_before_order_total' ); ?>
|
||||
|
||||
<tr class="order-total">
|
||||
<th><?php esc_html_e( 'Total', 'woocommerce' ); ?></th>
|
||||
<td><?php wc_cart_totals_order_total_html(); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php do_action( 'woocommerce_review_order_after_order_total' ); ?>
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* Checkout terms and conditions area.
|
||||
*
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.4.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
if ( apply_filters( 'woocommerce_checkout_show_terms', true ) && function_exists( 'wc_terms_and_conditions_checkbox_enabled' ) ) {
|
||||
do_action( 'woocommerce_checkout_before_terms_and_conditions' );
|
||||
|
||||
?>
|
||||
<div class="woocommerce-terms-and-conditions-wrapper">
|
||||
<?php
|
||||
/**
|
||||
* Terms and conditions hook used to inject content.
|
||||
*
|
||||
* @since 3.4.0.
|
||||
* @hooked wc_checkout_privacy_policy_text() Shows custom privacy policy text. Priority 20.
|
||||
* @hooked wc_terms_and_conditions_page_content() Shows t&c page content. Priority 30.
|
||||
*/
|
||||
do_action( 'woocommerce_checkout_terms_and_conditions' );
|
||||
?>
|
||||
|
||||
<?php if ( wc_terms_and_conditions_checkbox_enabled() ) : ?>
|
||||
<p class="form-row validate-required">
|
||||
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox">
|
||||
<input type="checkbox" class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" name="terms" <?php checked( apply_filters( 'woocommerce_terms_is_checked_default', isset( $_POST['terms'] ) ), true ); // WPCS: input var ok, csrf ok. ?> id="terms" />
|
||||
<span class="woocommerce-terms-and-conditions-checkbox-text"><?php wc_terms_and_conditions_checkbox_text(); ?></span> <abbr class="required" title="<?php esc_attr_e( 'required', 'woocommerce' ); ?>">*</abbr>
|
||||
</label>
|
||||
<input type="hidden" name="terms-field" value="1" />
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
do_action( 'woocommerce_checkout_after_terms_and_conditions' );
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
/**
|
||||
* Thankyou page
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/thankyou.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 8.1.0
|
||||
*
|
||||
* @var WC_Order $order
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
?>
|
||||
|
||||
<div class="woocommerce-order">
|
||||
|
||||
<?php
|
||||
if ( $order ) :
|
||||
|
||||
do_action( 'woocommerce_before_thankyou', $order->get_id() );
|
||||
?>
|
||||
|
||||
<?php if ( $order->has_status( 'failed' ) ) : ?>
|
||||
|
||||
<p class="woocommerce-notice woocommerce-notice--error woocommerce-thankyou-order-failed"><?php esc_html_e( 'Unfortunately your order cannot be processed as the originating bank/merchant has declined your transaction. Please attempt your purchase again.', 'woocommerce' ); ?></p>
|
||||
|
||||
<p class="woocommerce-notice woocommerce-notice--error woocommerce-thankyou-order-failed-actions">
|
||||
<a href="<?php echo esc_url( $order->get_checkout_payment_url() ); ?>" class="button pay"><?php esc_html_e( 'Pay', 'woocommerce' ); ?></a>
|
||||
<?php if ( is_user_logged_in() ) : ?>
|
||||
<a href="<?php echo esc_url( wc_get_page_permalink( 'myaccount' ) ); ?>" class="button pay"><?php esc_html_e( 'My account', 'woocommerce' ); ?></a>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<?php wc_get_template( 'checkout/order-received.php', array( 'order' => $order ) ); ?>
|
||||
|
||||
<ul class="woocommerce-order-overview woocommerce-thankyou-order-details order_details">
|
||||
|
||||
<li class="woocommerce-order-overview__order order">
|
||||
<?php esc_html_e( 'Order number:', 'woocommerce' ); ?>
|
||||
<strong><?php echo $order->get_order_number(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
|
||||
</li>
|
||||
|
||||
<li class="woocommerce-order-overview__date date">
|
||||
<?php esc_html_e( 'Date:', 'woocommerce' ); ?>
|
||||
<strong><?php echo wc_format_datetime( $order->get_date_created() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
|
||||
</li>
|
||||
|
||||
<?php if ( is_user_logged_in() && $order->get_user_id() === get_current_user_id() && $order->get_billing_email() ) : ?>
|
||||
<li class="woocommerce-order-overview__email email">
|
||||
<?php esc_html_e( 'Email:', 'woocommerce' ); ?>
|
||||
<strong><?php echo $order->get_billing_email(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<li class="woocommerce-order-overview__total total">
|
||||
<?php esc_html_e( 'Total:', 'woocommerce' ); ?>
|
||||
<strong><?php echo $order->get_formatted_order_total(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
|
||||
</li>
|
||||
|
||||
<?php if ( $order->get_payment_method_title() ) : ?>
|
||||
<li class="woocommerce-order-overview__payment-method method">
|
||||
<?php esc_html_e( 'Payment method:', 'woocommerce' ); ?>
|
||||
<strong><?php echo wp_kses_post( $order->get_payment_method_title() ); ?></strong>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
</ul>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_thankyou_' . $order->get_payment_method(), $order->get_id() ); ?>
|
||||
<?php do_action( 'woocommerce_thankyou', $order->get_id() ); ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<?php wc_get_template( 'checkout/order-received.php', array( 'order' => false ) ); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying product category thumbnails within loops
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/content-product-cat.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 4.7.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<li <?php wc_product_cat_class( '', $category ); ?>>
|
||||
<?php
|
||||
/**
|
||||
* The woocommerce_before_subcategory hook.
|
||||
*
|
||||
* @hooked woocommerce_template_loop_category_link_open - 10
|
||||
*/
|
||||
do_action( 'woocommerce_before_subcategory', $category );
|
||||
|
||||
/**
|
||||
* The woocommerce_before_subcategory_title hook.
|
||||
*
|
||||
* @hooked woocommerce_subcategory_thumbnail - 10
|
||||
*/
|
||||
do_action( 'woocommerce_before_subcategory_title', $category );
|
||||
|
||||
/**
|
||||
* The woocommerce_shop_loop_subcategory_title hook.
|
||||
*
|
||||
* @hooked woocommerce_template_loop_category_title - 10
|
||||
*/
|
||||
do_action( 'woocommerce_shop_loop_subcategory_title', $category );
|
||||
|
||||
/**
|
||||
* The woocommerce_after_subcategory_title hook.
|
||||
*/
|
||||
do_action( 'woocommerce_after_subcategory_title', $category );
|
||||
|
||||
/**
|
||||
* The woocommerce_after_subcategory hook.
|
||||
*
|
||||
* @hooked woocommerce_template_loop_category_link_close - 10
|
||||
*/
|
||||
do_action( 'woocommerce_after_subcategory', $category );
|
||||
?>
|
||||
</li>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying product content within loops
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/content-product.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.6.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
global $product;
|
||||
|
||||
// Ensure visibility.
|
||||
if ( empty( $product ) || ! $product->is_visible() ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<li <?php wc_product_class( '', $product ); ?>>
|
||||
<?php
|
||||
/**
|
||||
* Hook: woocommerce_before_shop_loop_item.
|
||||
*
|
||||
* @hooked woocommerce_template_loop_product_link_open - 10
|
||||
*/
|
||||
do_action( 'woocommerce_before_shop_loop_item' );
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_before_shop_loop_item_title.
|
||||
*
|
||||
* @hooked woocommerce_show_product_loop_sale_flash - 10
|
||||
* @hooked woocommerce_template_loop_product_thumbnail - 10
|
||||
*/
|
||||
do_action( 'woocommerce_before_shop_loop_item_title' );
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_shop_loop_item_title.
|
||||
*
|
||||
* @hooked woocommerce_template_loop_product_title - 10
|
||||
*/
|
||||
do_action( 'woocommerce_shop_loop_item_title' );
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_after_shop_loop_item_title.
|
||||
*
|
||||
* @hooked woocommerce_template_loop_rating - 5
|
||||
* @hooked woocommerce_template_loop_price - 10
|
||||
*/
|
||||
do_action( 'woocommerce_after_shop_loop_item_title' );
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_after_shop_loop_item.
|
||||
*
|
||||
* @hooked woocommerce_template_loop_product_link_close - 5
|
||||
* @hooked woocommerce_template_loop_add_to_cart - 10
|
||||
*/
|
||||
do_action( 'woocommerce_after_shop_loop_item' );
|
||||
?>
|
||||
</li>
|
||||
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying product content in the single-product.php template
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/content-single-product.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.6.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
global $product;
|
||||
|
||||
/**
|
||||
* Hook: woocommerce_before_single_product.
|
||||
*
|
||||
* @hooked woocommerce_output_all_notices - 10
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product' );
|
||||
|
||||
if ( post_password_required() ) {
|
||||
echo get_the_password_form(); // WPCS: XSS ok.
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div id="product-<?php the_ID(); ?>" <?php wc_product_class( '', $product ); ?>>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Hook: woocommerce_before_single_product_summary.
|
||||
*
|
||||
* @hooked woocommerce_show_product_sale_flash - 10
|
||||
* @hooked woocommerce_show_product_images - 20
|
||||
*/
|
||||
do_action( 'woocommerce_before_single_product_summary' );
|
||||
?>
|
||||
|
||||
<div class="summary entry-summary">
|
||||
<?php
|
||||
/**
|
||||
* Hook: woocommerce_single_product_summary.
|
||||
*
|
||||
* @hooked woocommerce_template_single_title - 5
|
||||
* @hooked woocommerce_template_single_rating - 10
|
||||
* @hooked woocommerce_template_single_price - 10
|
||||
* @hooked woocommerce_template_single_excerpt - 20
|
||||
* @hooked woocommerce_template_single_add_to_cart - 30
|
||||
* @hooked woocommerce_template_single_meta - 40
|
||||
* @hooked woocommerce_template_single_sharing - 50
|
||||
* @hooked WC_Structured_Data::generate_product_data() - 60
|
||||
*/
|
||||
do_action( 'woocommerce_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Hook: woocommerce_after_single_product_summary.
|
||||
*
|
||||
* @hooked woocommerce_output_product_data_tabs - 10
|
||||
* @hooked woocommerce_upsell_display - 15
|
||||
* @hooked woocommerce_output_related_products - 20
|
||||
*/
|
||||
do_action( 'woocommerce_after_single_product_summary' );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_after_single_product' ); ?>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying product price filter widget.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/content-widget-price-filter.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 7.0.1
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
?>
|
||||
<?php do_action( 'woocommerce_widget_price_filter_start', $args ); ?>
|
||||
|
||||
<form method="get" action="<?php echo esc_url( $form_action ); ?>">
|
||||
<div class="price_slider_wrapper">
|
||||
<div class="price_slider" style="display:none;"></div>
|
||||
<div class="price_slider_amount" data-step="<?php echo esc_attr( $step ); ?>">
|
||||
<label class="screen-reader-text" for="min_price"><?php esc_html_e( 'Min price', 'woocommerce' ); ?></label>
|
||||
<input type="text" id="min_price" name="min_price" value="<?php echo esc_attr( $current_min_price ); ?>" data-min="<?php echo esc_attr( $min_price ); ?>" placeholder="<?php echo esc_attr__( 'Min price', 'woocommerce' ); ?>" />
|
||||
<label class="screen-reader-text" for="max_price"><?php esc_html_e( 'Max price', 'woocommerce' ); ?></label>
|
||||
<input type="text" id="max_price" name="max_price" value="<?php echo esc_attr( $current_max_price ); ?>" data-max="<?php echo esc_attr( $max_price ); ?>" placeholder="<?php echo esc_attr__( 'Max price', 'woocommerce' ); ?>" />
|
||||
<?php /* translators: Filter: verb "to filter" */ ?>
|
||||
<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' ) : '' ); ?>"><?php echo esc_html__( 'Filter', 'woocommerce' ); ?></button>
|
||||
<div class="price_label" style="display:none;">
|
||||
<?php echo esc_html__( 'Price:', 'woocommerce' ); ?> <span class="from"></span> — <span class="to"></span>
|
||||
</div>
|
||||
<?php echo wc_query_string_form_fields( null, array( 'min_price', 'max_price', 'paged' ), '', true ); ?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php do_action( 'woocommerce_widget_price_filter_end', $args ); ?>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying product widget entries.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/content-widget-product.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.5.5
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
global $product;
|
||||
|
||||
if ( ! is_a( $product, 'WC_Product' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<li>
|
||||
<?php do_action( 'woocommerce_widget_product_item_start', $args ); ?>
|
||||
|
||||
<a href="<?php echo esc_url( $product->get_permalink() ); ?>">
|
||||
<?php echo $product->get_image(); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<span class="product-title"><?php echo wp_kses_post( $product->get_name() ); ?></span>
|
||||
</a>
|
||||
|
||||
<?php if ( ! empty( $show_rating ) ) : ?>
|
||||
<?php echo wc_get_rating_html( $product->get_average_rating() ); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo $product->get_price_html(); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
|
||||
<?php do_action( 'woocommerce_widget_product_item_end', $args ); ?>
|
||||
</li>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying product widget entries.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/content-widget-reviews.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.4.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
?>
|
||||
<li>
|
||||
<?php do_action( 'woocommerce_widget_product_review_item_start', $args ); ?>
|
||||
|
||||
<?php
|
||||
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
?>
|
||||
|
||||
<a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
|
||||
<?php echo $product->get_image(); ?>
|
||||
<span class="product-title"><?php echo wp_kses_post( $product->get_name() ); ?></span>
|
||||
</a>
|
||||
|
||||
<?php echo wc_get_rating_html( intval( get_comment_meta( $comment->comment_ID, 'rating', true ) ) ); ?>
|
||||
|
||||
<span class="reviewer">
|
||||
<?php
|
||||
/* translators: %s: Comment author. */
|
||||
echo sprintf( esc_html__( 'by %s', 'woocommerce' ), get_comment_author( $comment->comment_ID ) );
|
||||
?>
|
||||
</span>
|
||||
|
||||
<?php
|
||||
// phpcs:enable WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
?>
|
||||
|
||||
<?php do_action( 'woocommerce_widget_product_review_item_end', $args ); ?>
|
||||
</li>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin cancelled order email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-cancelled-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails
|
||||
* @version 4.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %1$s: Order number, %2$s: Customer full name. */ ?>
|
||||
<p><?php printf( esc_html__( 'Notification to let you know — order #%1$s belonging to %2$s has been cancelled:', 'woocommerce' ), esc_html( $order->get_order_number() ), esc_html( $order->get_formatted_billing_full_name() ) ); ?></p>
|
||||
|
||||
<?php
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin failed order email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-failed-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %1$s: Order number. %2$s: Customer full name. */ ?>
|
||||
<p><?php printf( esc_html__( 'Payment for order #%1$s from %2$s has failed. The order was as follows:', 'woocommerce' ), esc_html( $order->get_order_number() ), esc_html( $order->get_formatted_billing_full_name() ) ); ?></p>
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin new order email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-new-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails\HTML
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer billing full name */ ?>
|
||||
<p><?php printf( esc_html__( 'You’ve received the following order from %s:', 'woocommerce' ), $order->get_formatted_billing_full_name() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer completed order email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-completed-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer first name */ ?>
|
||||
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
|
||||
<p><?php esc_html_e( 'We have finished processing your order.', 'woocommerce' ); ?></p>
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer invoice email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-invoice.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the e-mail header.
|
||||
*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer first name */ ?>
|
||||
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
|
||||
|
||||
<?php if ( $order->needs_payment() ) { ?>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
wp_kses(
|
||||
/* translators: %1$s Site title, %2$s Order pay link */
|
||||
__( 'An order has been created for you on %1$s. Your invoice is below, with a link to make payment when you’re ready: %2$s', 'woocommerce' ),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
)
|
||||
),
|
||||
esc_html( get_bloginfo( 'name', 'display' ) ),
|
||||
'<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay for this order', 'woocommerce' ) . '</a>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
|
||||
<?php } else { ?>
|
||||
<p>
|
||||
<?php
|
||||
/* translators: %s Order date */
|
||||
printf( esc_html__( 'Here are the details of your order placed on %s:', 'woocommerce' ), esc_html( wc_format_datetime( $order->get_date_created() ) ) );
|
||||
?>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook for the woocommerce_email_order_details.
|
||||
*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Hook for the woocommerce_email_order_meta.
|
||||
*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Hook for woocommerce_email_customer_details.
|
||||
*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the email footer.
|
||||
*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer new account email - html.
|
||||
*
|
||||
* This is intended as a replacement to WC_Email_Customer_New_Account(),
|
||||
* with a set password link instead of including the new password in email
|
||||
* content.
|
||||
*
|
||||
* @package WooCommerce/Blocks
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
/**
|
||||
* Fires to output the email header.
|
||||
*
|
||||
* @hooked WC_Emails::email_header()
|
||||
*
|
||||
* @since 3.7.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer username */ ?>
|
||||
<p><?php printf( esc_html__( 'Hello %s,', 'woocommerce' ), esc_html( $user_login ) ); ?></p>
|
||||
<?php /* translators: %1$s: Site title, %2$s: Username, %3$s: My account link */ ?>
|
||||
<p><?php printf( esc_html__( 'Thanks for creating an account on %1$s. Your username is %2$s. You can access your account area to view orders, change your password, and more at: %3$s', 'woocommerce' ), esc_html( $blogname ), '<strong>' . esc_html( $user_login ) . '</strong>', make_clickable( esc_url( wc_get_page_permalink( 'myaccount' ) ) ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
|
||||
<?php if ( $set_password_url ) : ?>
|
||||
<p><a href="<?php echo esc_attr( $set_password_url ); ?>"><?php printf( esc_html__( 'Click here to set your new password.', 'woocommerce' ) ); ?></a></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
/**
|
||||
* Fires to output the email footer.
|
||||
*
|
||||
* @hooked WC_Emails::email_footer()
|
||||
*
|
||||
* @since 3.7.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer new account email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-new-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails
|
||||
* @version 6.0.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer username */ ?>
|
||||
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_login ) ); ?></p>
|
||||
<?php /* translators: %1$s: Site title, %2$s: Username, %3$s: My account link */ ?>
|
||||
<p><?php printf( esc_html__( 'Thanks for creating an account on %1$s. Your username is %2$s. You can access your account area to view orders, change your password, and more at: %3$s', 'woocommerce' ), esc_html( $blogname ), '<strong>' . esc_html( $user_login ) . '</strong>', make_clickable( esc_url( wc_get_page_permalink( 'myaccount' ) ) ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
|
||||
<?php if ( 'yes' === get_option( 'woocommerce_registration_generate_password' ) && $password_generated && $set_password_url ) : ?>
|
||||
<?php // If the password has not been set by the user during the sign up process, send them a link to set a new password ?>
|
||||
<p><a href="<?php echo esc_attr( $set_password_url ); ?>"><?php printf( esc_html__( 'Click here to set your new password.', 'woocommerce' ) ); ?></a></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer note email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-note.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer first name */ ?>
|
||||
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
|
||||
<p><?php esc_html_e( 'The following note has been added to your order:', 'woocommerce' ); ?></p>
|
||||
|
||||
<blockquote><?php echo wpautop( wptexturize( make_clickable( $customer_note ) ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></blockquote>
|
||||
|
||||
<p><?php esc_html_e( 'As a reminder, here are your order details:', 'woocommerce' ); ?></p>
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer on-hold order email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-on-hold-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails
|
||||
* @version 7.3.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer first name */ ?>
|
||||
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
|
||||
<p><?php esc_html_e( 'Thanks for your order. It’s on-hold until we confirm that payment has been received.', 'woocommerce' ); ?></p>
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer processing order email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-processing-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer first name */ ?>
|
||||
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
|
||||
<?php /* translators: %s: Order number */ ?>
|
||||
<p><?php printf( esc_html__( 'Just to let you know — we\'ve received your order #%s, and it is now being processed:', 'woocommerce' ), esc_html( $order->get_order_number() ) ); ?></p>
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer refunded order email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-refunded-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer first name */ ?>
|
||||
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
if ( $partial_refund ) {
|
||||
/* translators: %s: Site title */
|
||||
printf( esc_html__( 'Your order on %s has been partially refunded. There are more details below for your reference:', 'woocommerce' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
} else {
|
||||
/* translators: %s: Site title */
|
||||
printf( esc_html__( 'Your order on %s has been refunded. There are more details below for your reference:', 'woocommerce' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer Reset Password email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails
|
||||
* @version 4.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
||||
|
||||
<?php /* translators: %s: Customer username */ ?>
|
||||
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_login ) ); ?></p>
|
||||
<?php /* translators: %s: Store name */ ?>
|
||||
<p><?php printf( esc_html__( 'Someone has requested a new password for the following account on %s:', 'woocommerce' ), esc_html( wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ) ); ?></p>
|
||||
<?php /* translators: %s: Customer username */ ?>
|
||||
<p><?php printf( esc_html__( 'Username: %s', 'woocommerce' ), esc_html( $user_login ) ); ?></p>
|
||||
<p><?php esc_html_e( 'If you didn\'t make this request, just ignore this email. If you\'d like to proceed:', 'woocommerce' ); ?></p>
|
||||
<p>
|
||||
<a class="link" href="<?php echo esc_url( add_query_arg( array( 'key' => $reset_key, 'id' => $user_id ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) ) ) ); ?>"><?php // phpcs:ignore ?>
|
||||
<?php esc_html_e( 'Click here to reset your password', 'woocommerce' ); ?>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_email_footer', $email );
|
||||
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/**
|
||||
* Email Addresses
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-addresses.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails
|
||||
* @version 8.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$text_align = is_rtl() ? 'right' : 'left';
|
||||
$address = $order->get_formatted_billing_address();
|
||||
$shipping = $order->get_formatted_shipping_address();
|
||||
|
||||
?><table id="addresses" cellspacing="0" cellpadding="0" style="width: 100%; vertical-align: top; margin-bottom: 40px; padding:0;" border="0">
|
||||
<tr>
|
||||
<td style="text-align:<?php echo esc_attr( $text_align ); ?>; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; border:0; padding:0;" valign="top" width="50%">
|
||||
<h2><?php esc_html_e( 'Billing address', 'woocommerce' ); ?></h2>
|
||||
|
||||
<address class="address">
|
||||
<?php echo wp_kses_post( $address ? $address : esc_html__( 'N/A', 'woocommerce' ) ); ?>
|
||||
<?php if ( $order->get_billing_phone() ) : ?>
|
||||
<br/><?php echo wc_make_phone_clickable( $order->get_billing_phone() ); ?>
|
||||
<?php endif; ?>
|
||||
<?php if ( $order->get_billing_email() ) : ?>
|
||||
<br/><?php echo esc_html( $order->get_billing_email() ); ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
/**
|
||||
* Fires after the core address fields in emails.
|
||||
*
|
||||
* @since 8.6.0
|
||||
*
|
||||
* @param string $type Address type. Either 'billing' or 'shipping'.
|
||||
* @param WC_Order $order Order instance.
|
||||
* @param bool $sent_to_admin If this email is being sent to the admin or not.
|
||||
* @param bool $plain_text If this email is plain text or not.
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_address_section', 'billing', $order, $sent_to_admin, false );
|
||||
?>
|
||||
</address>
|
||||
</td>
|
||||
<?php if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && $shipping ) : ?>
|
||||
<td style="text-align:<?php echo esc_attr( $text_align ); ?>; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; padding:0;" valign="top" width="50%">
|
||||
<h2><?php esc_html_e( 'Shipping address', 'woocommerce' ); ?></h2>
|
||||
|
||||
<address class="address">
|
||||
<?php echo wp_kses_post( $shipping ); ?>
|
||||
<?php if ( $order->get_shipping_phone() ) : ?>
|
||||
<br /><?php echo wc_make_phone_clickable( $order->get_shipping_phone() ); ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
/**
|
||||
* Fires after the core address fields in emails.
|
||||
*
|
||||
* @since 8.6.0
|
||||
*
|
||||
* @param string $type Address type. Either 'billing' or 'shipping'.
|
||||
* @param WC_Order $order Order instance.
|
||||
* @param bool $sent_to_admin If this email is being sent to the admin or not.
|
||||
* @param bool $plain_text If this email is plain text or not.
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_address_section', 'shipping', $order, $sent_to_admin, false );
|
||||
?>
|
||||
</address>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Additional Customer Details
|
||||
*
|
||||
* This is extra customer data which can be filtered by plugins. It outputs below the order item table.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-customer-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails
|
||||
* @version 2.5.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
?>
|
||||
<?php if ( ! empty( $fields ) ) : ?>
|
||||
<div style="font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; margin-bottom: 40px;">
|
||||
<h2><?php esc_html_e( 'Customer details', 'woocommerce' ); ?></h2>
|
||||
<ul>
|
||||
<?php foreach ( $fields as $field ) : ?>
|
||||
<li><strong><?php echo wp_kses_post( $field['label'] ); ?>:</strong> <span class="text"><?php echo wp_kses_post( $field['value'] ); ?></span></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
/**
|
||||
* Email Downloads.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.4.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
$text_align = is_rtl() ? 'right' : 'left';
|
||||
|
||||
?><h2 class="woocommerce-order-downloads__title"><?php esc_html_e( 'Downloads', 'woocommerce' ); ?></h2>
|
||||
|
||||
<table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; margin-bottom: 40px;" border="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php foreach ( $columns as $column_id => $column_name ) : ?>
|
||||
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo esc_html( $column_name ); ?></th>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<?php foreach ( $downloads as $download ) : ?>
|
||||
<tr>
|
||||
<?php foreach ( $columns as $column_id => $column_name ) : ?>
|
||||
<td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>;">
|
||||
<?php
|
||||
if ( has_action( 'woocommerce_email_downloads_column_' . $column_id ) ) {
|
||||
do_action( 'woocommerce_email_downloads_column_' . $column_id, $download, $plain_text );
|
||||
} else {
|
||||
switch ( $column_id ) {
|
||||
case 'download-product':
|
||||
?>
|
||||
<a href="<?php echo esc_url( get_permalink( $download['product_id'] ) ); ?>"><?php echo wp_kses_post( $download['product_name'] ); ?></a>
|
||||
<?php
|
||||
break;
|
||||
case 'download-file':
|
||||
?>
|
||||
<a href="<?php echo esc_url( $download['download_url'] ); ?>" class="woocommerce-MyAccount-downloads-file button alt"><?php echo esc_html( $download['download_name'] ); ?></a>
|
||||
<?php
|
||||
break;
|
||||
case 'download-expires':
|
||||
if ( ! empty( $download['access_expires'] ) ) {
|
||||
?>
|
||||
<time datetime="<?php echo esc_attr( date( 'Y-m-d', strtotime( $download['access_expires'] ) ) ); ?>" title="<?php echo esc_attr( strtotime( $download['access_expires'] ) ); ?>"><?php echo esc_html( date_i18n( get_option( 'date_format' ), strtotime( $download['access_expires'] ) ) ); ?></time>
|
||||
<?php
|
||||
} else {
|
||||
esc_html_e( 'Never', 'woocommerce' );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/**
|
||||
* Email Footer
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-footer.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails
|
||||
* @version 7.4.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- End Content -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- End Body -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top">
|
||||
<!-- Footer -->
|
||||
<table border="0" cellpadding="10" cellspacing="0" width="100%" id="template_footer">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<table border="0" cellpadding="10" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td colspan="2" valign="middle" id="credit">
|
||||
<?php
|
||||
echo wp_kses_post(
|
||||
wpautop(
|
||||
wptexturize(
|
||||
/**
|
||||
* Provides control over the email footer text used for most order emails.
|
||||
*
|
||||
* @since 4.0.0
|
||||
*
|
||||
* @param string $email_footer_text
|
||||
*/
|
||||
apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) )
|
||||
)
|
||||
)
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- End Footer -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
<td><!-- Deliberately empty to support consistent sizing and layout across multiple email clients. --></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/**
|
||||
* Email Header
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-header.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails
|
||||
* @version 7.4.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
||||
<title><?php echo get_bloginfo( 'name', 'display' ); ?></title>
|
||||
</head>
|
||||
<body <?php echo is_rtl() ? 'rightmargin' : 'leftmargin'; ?>="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
|
||||
<table width="100%" id="outer_wrapper">
|
||||
<tr>
|
||||
<td><!-- Deliberately empty to support consistent sizing and layout across multiple email clients. --></td>
|
||||
<td width="600">
|
||||
<div id="wrapper" dir="<?php echo is_rtl() ? 'rtl' : 'ltr'; ?>">
|
||||
<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
|
||||
<tr>
|
||||
<td align="center" valign="top">
|
||||
<div id="template_header_image">
|
||||
<?php
|
||||
$img = get_option( 'woocommerce_email_header_image' );
|
||||
|
||||
if ( $img ) {
|
||||
echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" /></p>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_container">
|
||||
<tr>
|
||||
<td align="center" valign="top">
|
||||
<!-- Header -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_header">
|
||||
<tr>
|
||||
<td id="header_wrapper">
|
||||
<h1><?php echo esc_html( $email_heading ); ?></h1>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- End Header -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top">
|
||||
<!-- Body -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_body">
|
||||
<tr>
|
||||
<td valign="top" id="body_content">
|
||||
<!-- Content -->
|
||||
<table border="0" cellpadding="20" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<div id="body_content_inner">
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* Email mobile messaging
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-mobile-messaging.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails
|
||||
* @version 7.0
|
||||
*/
|
||||
|
||||
use Automattic\WooCommerce\Internal\Orders\MobileMessagingHandler;
|
||||
|
||||
echo wp_kses_post( MobileMessagingHandler::prepare_mobile_message( $order, $blog_id, $now, $domain ) );
|
||||
@@ -0,0 +1,90 @@
|
||||
<?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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
$text_align = is_rtl() ? 'right' : 'left';
|
||||
|
||||
do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ); ?>
|
||||
|
||||
<h2>
|
||||
<?php
|
||||
if ( $sent_to_admin ) {
|
||||
$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 . sprintf( __( '[Order #%s]', 'woocommerce' ) . $after . ' (<time datetime="%s">%s</time>)', $order->get_order_number(), $order->get_date_created()->format( 'c' ), wc_format_datetime( $order->get_date_created() ) ) );
|
||||
?>
|
||||
</h2>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
<table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;" border="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Product', 'woocommerce' ); ?></th>
|
||||
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Quantity', 'woocommerce' ); ?></th>
|
||||
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Price', 'woocommerce' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
echo wc_get_email_order_items( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
$order,
|
||||
array(
|
||||
'show_sku' => $sent_to_admin,
|
||||
'show_image' => false,
|
||||
'image_size' => array( 32, 32 ),
|
||||
'plain_text' => $plain_text,
|
||||
'sent_to_admin' => $sent_to_admin,
|
||||
)
|
||||
);
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<?php
|
||||
$item_totals = $order->get_order_item_totals();
|
||||
|
||||
if ( $item_totals ) {
|
||||
$i = 0;
|
||||
foreach ( $item_totals as $total ) {
|
||||
$i++;
|
||||
?>
|
||||
<tr>
|
||||
<th class="td" scope="row" colspan="2" style="text-align:<?php echo esc_attr( $text_align ); ?>; <?php echo ( 1 === $i ) ? 'border-top-width: 4px;' : ''; ?>"><?php echo wp_kses_post( $total['label'] ); ?></th>
|
||||
<td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>; <?php echo ( 1 === $i ) ? 'border-top-width: 4px;' : ''; ?>"><?php echo wp_kses_post( $total['value'] ); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if ( $order->get_customer_note() ) {
|
||||
?>
|
||||
<tr>
|
||||
<th class="td" scope="row" colspan="2" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Note:', 'woocommerce' ); ?></th>
|
||||
<td class="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>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text, $email ); ?>
|
||||
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
/**
|
||||
* Email Order Items
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-order-items.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
$text_align = is_rtl() ? 'right' : 'left';
|
||||
$margin_side = is_rtl() ? 'left' : 'right';
|
||||
|
||||
foreach ( $items as $item_id => $item ) :
|
||||
$product = $item->get_product();
|
||||
$sku = '';
|
||||
$purchase_note = '';
|
||||
$image = '';
|
||||
|
||||
if ( ! apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( is_object( $product ) ) {
|
||||
$sku = $product->get_sku();
|
||||
$purchase_note = $product->get_purchase_note();
|
||||
$image = $product->get_image( $image_size );
|
||||
}
|
||||
|
||||
?>
|
||||
<tr class="<?php echo esc_attr( apply_filters( 'woocommerce_order_item_class', 'order_item', $item, $order ) ); ?>">
|
||||
<td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>; vertical-align: middle; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; word-wrap:break-word;">
|
||||
<?php
|
||||
|
||||
// Show title/image etc.
|
||||
if ( $show_image ) {
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) );
|
||||
}
|
||||
|
||||
// Product name.
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, false ) );
|
||||
|
||||
// SKU.
|
||||
if ( $show_sku && $sku ) {
|
||||
echo wp_kses_post( ' (#' . $sku . ')' );
|
||||
}
|
||||
|
||||
// allow other plugins to add additional product information here.
|
||||
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, $plain_text );
|
||||
|
||||
wc_display_item_meta(
|
||||
$item,
|
||||
array(
|
||||
'label_before' => '<strong class="wc-item-meta-label" style="float: ' . esc_attr( $text_align ) . '; margin-' . esc_attr( $margin_side ) . ': .25em; clear: both">',
|
||||
)
|
||||
);
|
||||
|
||||
// allow other plugins to add additional product information here.
|
||||
do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, $plain_text );
|
||||
|
||||
?>
|
||||
</td>
|
||||
<td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>; vertical-align:middle; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;">
|
||||
<?php
|
||||
$qty = $item->get_quantity();
|
||||
$refunded_qty = $order->get_qty_refunded_for_item( $item_id );
|
||||
|
||||
if ( $refunded_qty ) {
|
||||
$qty_display = '<del>' . esc_html( $qty ) . '</del> <ins>' . esc_html( $qty - ( $refunded_qty * -1 ) ) . '</ins>';
|
||||
} else {
|
||||
$qty_display = esc_html( $qty );
|
||||
}
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_email_order_item_quantity', $qty_display, $item ) );
|
||||
?>
|
||||
</td>
|
||||
<td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>; vertical-align:middle; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;">
|
||||
<?php echo wp_kses_post( $order->get_formatted_line_subtotal( $item ) ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
if ( $show_purchase_note && $purchase_note ) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3" style="text-align:<?php echo esc_attr( $text_align ); ?>; vertical-align:middle; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;">
|
||||
<?php
|
||||
echo wp_kses_post( wpautop( do_shortcode( $purchase_note ) ) );
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
@@ -0,0 +1,264 @@
|
||||
<?php
|
||||
/**
|
||||
* Email Styles
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-styles.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails
|
||||
* @version 8.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
// Load colors.
|
||||
$bg = get_option( 'woocommerce_email_background_color' );
|
||||
$body = get_option( 'woocommerce_email_body_background_color' );
|
||||
$base = get_option( 'woocommerce_email_base_color' );
|
||||
$base_text = wc_light_or_dark( $base, '#202020', '#ffffff' );
|
||||
$text = get_option( 'woocommerce_email_text_color' );
|
||||
|
||||
// Pick a contrasting color for links.
|
||||
$link_color = wc_hex_is_light( $base ) ? $base : $base_text;
|
||||
|
||||
if ( wc_hex_is_light( $body ) ) {
|
||||
$link_color = wc_hex_is_light( $base ) ? $base_text : $base;
|
||||
}
|
||||
|
||||
$bg_darker_10 = wc_hex_darker( $bg, 10 );
|
||||
$body_darker_10 = wc_hex_darker( $body, 10 );
|
||||
$base_lighter_20 = wc_hex_lighter( $base, 20 );
|
||||
$base_lighter_40 = wc_hex_lighter( $base, 40 );
|
||||
$text_lighter_20 = wc_hex_lighter( $text, 20 );
|
||||
$text_lighter_40 = wc_hex_lighter( $text, 40 );
|
||||
|
||||
// !important; is a gmail hack to prevent styles being stripped if it doesn't like something.
|
||||
// body{padding: 0;} ensures proper scale/positioning of the email in the iOS native email app.
|
||||
?>
|
||||
body {
|
||||
background-color: <?php echo esc_attr( $bg ); ?>;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#outer_wrapper {
|
||||
background-color: <?php echo esc_attr( $bg ); ?>;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
margin: 0 auto;
|
||||
padding: 70px 0;
|
||||
-webkit-text-size-adjust: none !important;
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
#template_container {
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1) !important;
|
||||
background-color: <?php echo esc_attr( $body ); ?>;
|
||||
border: 1px solid <?php echo esc_attr( $bg_darker_10 ); ?>;
|
||||
border-radius: 3px !important;
|
||||
}
|
||||
|
||||
#template_header {
|
||||
background-color: <?php echo esc_attr( $base ); ?>;
|
||||
border-radius: 3px 3px 0 0 !important;
|
||||
color: <?php echo esc_attr( $base_text ); ?>;
|
||||
border-bottom: 0;
|
||||
font-weight: bold;
|
||||
line-height: 100%;
|
||||
vertical-align: middle;
|
||||
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
||||
}
|
||||
|
||||
#template_header h1,
|
||||
#template_header h1 a {
|
||||
color: <?php echo esc_attr( $base_text ); ?>;
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
#template_header_image img {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#template_footer td {
|
||||
padding: 0;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
#template_footer #credit {
|
||||
border: 0;
|
||||
color: <?php echo esc_attr( $text_lighter_40 ); ?>;
|
||||
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
line-height: 150%;
|
||||
text-align: center;
|
||||
padding: 24px 0;
|
||||
}
|
||||
|
||||
#template_footer #credit p {
|
||||
margin: 0 0 16px;
|
||||
}
|
||||
|
||||
#body_content {
|
||||
background-color: <?php echo esc_attr( $body ); ?>;
|
||||
}
|
||||
|
||||
#body_content table td {
|
||||
padding: 48px 48px 32px;
|
||||
}
|
||||
|
||||
#body_content table td td {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
#body_content table td th {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
#body_content td ul.wc-item-meta {
|
||||
font-size: small;
|
||||
margin: 1em 0 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#body_content td ul.wc-item-meta li {
|
||||
margin: 0.5em 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#body_content td ul.wc-item-meta li p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#body_content p {
|
||||
margin: 0 0 16px;
|
||||
}
|
||||
|
||||
#body_content_inner {
|
||||
color: <?php echo esc_attr( $text_lighter_20 ); ?>;
|
||||
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 150%;
|
||||
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
|
||||
}
|
||||
|
||||
.td {
|
||||
color: <?php echo esc_attr( $text_lighter_20 ); ?>;
|
||||
border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.address {
|
||||
padding: 12px;
|
||||
color: <?php echo esc_attr( $text_lighter_20 ); ?>;
|
||||
border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>;
|
||||
}
|
||||
|
||||
.additional-fields {
|
||||
padding: 12px 12px 0;
|
||||
color: <?php echo esc_attr( $text_lighter_20 ); ?>;
|
||||
border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>;
|
||||
list-style: none outside;
|
||||
}
|
||||
|
||||
.additional-fields li {
|
||||
margin: 0 0 12px 0;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: <?php echo esc_attr( $text ); ?>;
|
||||
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
||||
}
|
||||
|
||||
.link {
|
||||
color: <?php echo esc_attr( $link_color ); ?>;
|
||||
}
|
||||
|
||||
#header_wrapper {
|
||||
padding: 36px 48px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: <?php echo esc_attr( $base ); ?>;
|
||||
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
||||
font-size: 30px;
|
||||
font-weight: 300;
|
||||
line-height: 150%;
|
||||
margin: 0;
|
||||
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
|
||||
text-shadow: 0 1px 0 <?php echo esc_attr( $base_lighter_20 ); ?>;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: <?php echo esc_attr( $base ); ?>;
|
||||
display: block;
|
||||
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
line-height: 130%;
|
||||
margin: 0 0 18px;
|
||||
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: <?php echo esc_attr( $base ); ?>;
|
||||
display: block;
|
||||
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
line-height: 130%;
|
||||
margin: 16px 0 8px;
|
||||
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
|
||||
}
|
||||
|
||||
a {
|
||||
color: <?php echo esc_attr( $link_color ); ?>;
|
||||
font-weight: normal;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
img {
|
||||
border: none;
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
height: auto;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
text-transform: capitalize;
|
||||
vertical-align: middle;
|
||||
margin-<?php echo is_rtl() ? 'left' : 'right'; ?>: 10px;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Media queries are not supported by all email clients, however they do work on modern mobile
|
||||
* Gmail clients and can help us achieve better consistency there.
|
||||
*/
|
||||
@media screen and (max-width: 600px) {
|
||||
#header_wrapper {
|
||||
padding: 27px 36px !important;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
#body_content table > tbody > tr > td {
|
||||
padding: 10px !important;
|
||||
}
|
||||
|
||||
#body_content_inner {
|
||||
font-size: 10px !important;
|
||||
}
|
||||
}
|
||||
<?php
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin cancelled order email (plain text)
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/admin-cancelled-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails\Plain
|
||||
* @version 4.1.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
|
||||
echo esc_html( wp_strip_all_tags( $email_heading ) );
|
||||
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
||||
|
||||
/* translators: %1$s: Order number. %2$s: Customer full name */
|
||||
echo sprintf( esc_html__( 'Notification to let you know — order #%1$s belonging to %2$s has been cancelled:', 'woocommerce' ), esc_html( $order->get_order_number() ), esc_html( $order->get_formatted_billing_full_name() ) ) . "\n\n";
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
echo "\n----------------------------------------\n\n";
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
}
|
||||
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin failed order email (plain text)
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/admin-failed-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails\Plain
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
|
||||
echo esc_html( wp_strip_all_tags( $email_heading ) );
|
||||
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
||||
|
||||
/* translators: %1$s: Order number. %2$s: Customer full name. */
|
||||
echo sprintf( esc_html__( 'Payment for order #%1$s from %2$s has failed. The order was as follows:', 'woocommerce' ), esc_html( $order->get_order_number() ), esc_html( $order->get_formatted_billing_full_name() ) ) . "\n\n";
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
echo "\n----------------------------------------\n\n";
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
}
|
||||
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin new order email (plain text)
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/admin-new-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails\Plain
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
|
||||
echo esc_html( wp_strip_all_tags( $email_heading ) );
|
||||
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
||||
|
||||
/* translators: %s: Customer billing full name */
|
||||
echo sprintf( esc_html__( 'You’ve received the following order from %s:', 'woocommerce' ), esc_html( $order->get_formatted_billing_full_name() ) ) . "\n\n";
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
echo "\n----------------------------------------\n\n";
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
}
|
||||
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer completed order email (plain text)
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-completed-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails\Plain
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
|
||||
echo esc_html( wp_strip_all_tags( $email_heading ) );
|
||||
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
||||
|
||||
/* translators: %s: Customer first name */
|
||||
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
|
||||
/* translators: %s: Site title */
|
||||
echo esc_html__( 'We have finished processing your order.', 'woocommerce' ) . "\n\n";
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
echo "\n----------------------------------------\n\n";
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
}
|
||||
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer invoice email (plain text)
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-invoice.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails\Plain
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
|
||||
echo esc_html( wp_strip_all_tags( $email_heading ) );
|
||||
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
||||
|
||||
/* translators: %s: Customer first name */
|
||||
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
|
||||
|
||||
if ( $order->has_status( 'pending' ) ) {
|
||||
echo wp_kses_post(
|
||||
sprintf(
|
||||
/* translators: %1$s: Site title, %2$s: Order pay link */
|
||||
__( 'An order has been created for you on %1$s. Your invoice is below, with a link to make payment when you’re ready: %2$s', 'woocommerce' ),
|
||||
esc_html( get_bloginfo( 'name', 'display' ) ),
|
||||
esc_url( $order->get_checkout_payment_url() )
|
||||
)
|
||||
) . "\n\n";
|
||||
|
||||
} else {
|
||||
/* translators: %s: Order date */
|
||||
echo sprintf( esc_html__( 'Here are the details of your order placed on %s:', 'woocommerce' ), esc_html( wc_format_datetime( $order->get_date_created() ) ) ) . "\n\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook for the woocommerce_email_order_details.
|
||||
*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
echo "\n----------------------------------------\n\n";
|
||||
|
||||
/**
|
||||
* Hook for the woocommerce_email_order_meta.
|
||||
*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/**
|
||||
* Hook for woocommerce_email_customer_details
|
||||
*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
}
|
||||
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer new account email - text.
|
||||
*
|
||||
* This is intended as a replacement to WC_Email_Customer_New_Account(),
|
||||
* with a set password link instead of including the new password in email
|
||||
* content.
|
||||
*
|
||||
* @package WooCommerce/Blocks
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
|
||||
echo esc_html( wp_strip_all_tags( $email_heading ) );
|
||||
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
||||
|
||||
/* translators: %s: Customer username */
|
||||
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_login ) ) . "\n\n";
|
||||
/* translators: %1$s: Site title, %2$s: Username, %3$s: My account link */
|
||||
echo sprintf( esc_html__( 'Thanks for creating an account on %1$s. Your username is %2$s. You can access your account area to view orders, change your password, and more at: %3$s', 'woocommerce' ), esc_html( $blogname ), esc_html( $user_login ), esc_html( wc_get_page_permalink( 'myaccount' ) ) ) . "\n\n";
|
||||
|
||||
if ( $set_password_url ) {
|
||||
echo esc_html__( 'To set your password, visit the following address: ', 'woocommerce' ) . "\n\n";
|
||||
echo esc_html( $set_password_url ) . "\n\n";
|
||||
}
|
||||
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the email footer text.
|
||||
*
|
||||
* @since 3.7.0
|
||||
*
|
||||
* @param string $footer_text Footer text. Default empty.
|
||||
*/
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer new account email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-new-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails\Plain
|
||||
* @version 6.0.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
|
||||
echo esc_html( wp_strip_all_tags( $email_heading ) );
|
||||
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
||||
|
||||
/* translators: %s: Customer username */
|
||||
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_login ) ) . "\n\n";
|
||||
/* translators: %1$s: Site title, %2$s: Username, %3$s: My account link */
|
||||
echo sprintf( esc_html__( 'Thanks for creating an account on %1$s. Your username is %2$s. You can access your account area to view orders, change your password, and more at: %3$s', 'woocommerce' ), esc_html( $blogname ), esc_html( $user_login ), esc_html( wc_get_page_permalink( 'myaccount' ) ) ) . "\n\n";
|
||||
|
||||
// Only send the set new password link if the user hasn't set their password during sign-up.
|
||||
if ( 'yes' === get_option( 'woocommerce_registration_generate_password' ) && $password_generated && $set_password_url ) {
|
||||
/* translators: URL follows */
|
||||
echo esc_html__( 'To set your password, visit the following address: ', 'woocommerce' ) . "\n\n";
|
||||
echo esc_html( $set_password_url ) . "\n\n";
|
||||
}
|
||||
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
}
|
||||
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer note email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-note.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails\Plain
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
|
||||
echo esc_html( wp_strip_all_tags( $email_heading ) );
|
||||
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
||||
|
||||
/* translators: %s: Customer first name */
|
||||
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
|
||||
echo esc_html__( 'The following note has been added to your order:', 'woocommerce' ) . "\n\n";
|
||||
|
||||
echo "----------\n\n";
|
||||
|
||||
echo wptexturize( $customer_note ) . "\n\n"; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
|
||||
echo "----------\n\n";
|
||||
|
||||
echo esc_html__( 'As a reminder, here are your order details:', 'woocommerce' ) . "\n\n";
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
echo "\n----------------------------------------\n\n";
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
}
|
||||
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer on-hold order email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-on-hold-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails\Plain
|
||||
* @version 7.3.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
|
||||
echo esc_html( wp_strip_all_tags( $email_heading ) );
|
||||
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
||||
|
||||
/* translators: %s: Customer first name */
|
||||
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
|
||||
echo esc_html__( 'Thanks for your order. It’s on-hold until we confirm that payment has been received.', 'woocommerce' ) . "\n\n";
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
echo "\n----------------------------------------\n\n";
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
}
|
||||
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer processing order email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-processing-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails\Plain
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
|
||||
echo esc_html( wp_strip_all_tags( $email_heading ) );
|
||||
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
||||
|
||||
/* translators: %s: Customer first name */
|
||||
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
|
||||
/* translators: %s: Order number */
|
||||
echo sprintf( esc_html__( 'Just to let you know — we\'ve received your order #%s, and it is now being processed:', 'woocommerce' ), esc_html( $order->get_order_number() ) ) . "\n\n";
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
echo "\n----------------------------------------\n\n";
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
}
|
||||
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer refunded order email (plain text)
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-refunded-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails\Plain
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
|
||||
echo esc_html( wp_strip_all_tags( $email_heading ) );
|
||||
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
||||
|
||||
/* translators: %s: Customer first name */
|
||||
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
|
||||
if ( $partial_refund ) {
|
||||
/* translators: %s: Site title */
|
||||
echo sprintf( esc_html__( 'Your order on %s has been partially refunded. There are more details below for your reference:', 'woocommerce' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ) . "\n\n"; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
} else {
|
||||
/* translators: %s: Site title */
|
||||
echo sprintf( esc_html__( 'Your order on %s has been refunded. There are more details below for your reference:', 'woocommerce' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ) . "\n\n"; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_details() Shows the order details table.
|
||||
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
||||
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
echo "\n----------------------------------------\n\n";
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::order_meta() Shows order meta data.
|
||||
*/
|
||||
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::customer_details() Shows customer details
|
||||
* @hooked WC_Emails::email_address() Shows email address
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
}
|
||||
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Customer Reset Password email
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails\Plain
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
|
||||
echo esc_html( wp_strip_all_tags( $email_heading ) );
|
||||
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
||||
|
||||
/* translators: %s: Customer username */
|
||||
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_login ) ) . "\n\n";
|
||||
/* translators: %s: Store name */
|
||||
echo sprintf( esc_html__( 'Someone has requested a new password for the following account on %s:', 'woocommerce' ), esc_html( wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ) ) . "\n\n";
|
||||
/* translators: %s: Customer username */
|
||||
echo sprintf( esc_html__( 'Username: %s', 'woocommerce' ), esc_html( $user_login ) ) . "\n\n";
|
||||
echo esc_html__( 'If you didn\'t make this request, just ignore this email. If you\'d like to proceed:', 'woocommerce' ) . "\n\n";
|
||||
echo esc_url( add_query_arg( array( 'key' => $reset_key, 'id' => $user_id ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) ) ) ) . "\n\n"; // phpcs:ignore
|
||||
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ( $additional_content ) {
|
||||
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
|
||||
echo "\n\n----------------------------------------\n\n";
|
||||
}
|
||||
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* Email Addresses (plain)
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-addresses.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails\Plain
|
||||
* @version 8.6.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
echo "\n" . esc_html( wc_strtoupper( esc_html__( 'Billing address', 'woocommerce' ) ) ) . "\n\n";
|
||||
echo preg_replace( '#<br\s*/?>#i', "\n", $order->get_formatted_billing_address() ) . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
|
||||
if ( $order->get_billing_phone() ) {
|
||||
echo $order->get_billing_phone() . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
|
||||
if ( $order->get_billing_email() ) {
|
||||
echo $order->get_billing_email() . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires after the core address fields in emails.
|
||||
*
|
||||
* @since 8.6.0
|
||||
*
|
||||
* @param string $type Address type. Either 'billing' or 'shipping'.
|
||||
* @param WC_Order $order Order instance.
|
||||
* @param bool $sent_to_admin If this email is being sent to the admin or not.
|
||||
* @param bool $plain_text If this email is plain text or not.
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_address_section', 'billing', $order, $sent_to_admin, true );
|
||||
|
||||
if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() ) {
|
||||
$shipping = $order->get_formatted_shipping_address();
|
||||
|
||||
if ( $shipping ) {
|
||||
echo "\n" . esc_html( wc_strtoupper( esc_html__( 'Shipping address', 'woocommerce' ) ) ) . "\n\n";
|
||||
echo preg_replace( '#<br\s*/?>#i', "\n", $shipping ) . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
|
||||
if ( $order->get_shipping_phone() ) {
|
||||
echo $order->get_shipping_phone() . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires after the core address fields in emails.
|
||||
*
|
||||
* @since 8.6.0
|
||||
*
|
||||
* @param string $type Address type. Either 'billing' or 'shipping'.
|
||||
* @param WC_Order $order Order instance.
|
||||
* @param bool $sent_to_admin If this email is being sent to the admin or not.
|
||||
* @param bool $plain_text If this email is plain text or not.
|
||||
*/
|
||||
do_action( 'woocommerce_email_customer_address_section', 'shipping', $order, $sent_to_admin, true );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Additional Customer Details (plain)
|
||||
*
|
||||
* This is extra customer data which can be filtered by plugins. It outputs below the order item table.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-customer-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails\Plain
|
||||
* @version 3.4.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
echo esc_html( wc_strtoupper( esc_html__( 'Customer details', 'woocommerce' ) ) ) . "\n\n";
|
||||
|
||||
foreach ( $fields as $field ) {
|
||||
echo wp_kses_post( $field['label'] ) . ': ' . wp_kses_post( $field['value'] ) . "\n";
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* Email Downloads.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.4.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
echo esc_html( wc_strtoupper( esc_html__( 'Downloads', 'woocommerce' ) ) ) . "\n\n";
|
||||
|
||||
foreach ( $downloads as $download ) {
|
||||
foreach ( $columns as $column_id => $column_name ) {
|
||||
echo wp_kses_post( $column_name ) . ': ';
|
||||
|
||||
if ( has_action( 'woocommerce_email_downloads_column_' . $column_id ) ) {
|
||||
do_action( 'woocommerce_email_downloads_column_' . $column_id, $download, $plain_text );
|
||||
} else {
|
||||
switch ( $column_id ) {
|
||||
case 'download-product':
|
||||
echo esc_html( $download['product_name'] );
|
||||
break;
|
||||
case 'download-file':
|
||||
echo esc_html( $download['download_name'] ) . ' - ' . esc_url( $download['download_url'] );
|
||||
break;
|
||||
case 'download-expires':
|
||||
if ( ! empty( $download['access_expires'] ) ) {
|
||||
echo esc_html( date_i18n( get_option( 'date_format' ), strtotime( $download['access_expires'] ) ) );
|
||||
} else {
|
||||
esc_html_e( 'Never', 'woocommerce' );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
echo "\n";
|
||||
}
|
||||
echo "\n";
|
||||
}
|
||||
echo '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=';
|
||||
echo "\n\n";
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* Order details table shown in emails.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email );
|
||||
|
||||
/* translators: %1$s: Order ID. %2$s: Order date */
|
||||
echo wp_kses_post( wc_strtoupper( sprintf( esc_html__( '[Order #%1$s] (%2$s)', 'woocommerce' ), $order->get_order_number(), wc_format_datetime( $order->get_date_created() ) ) ) ) . "\n";
|
||||
echo "\n" . wc_get_email_order_items( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
$order,
|
||||
array(
|
||||
'show_sku' => $sent_to_admin,
|
||||
'show_image' => false,
|
||||
'image_size' => array( 32, 32 ),
|
||||
'plain_text' => true,
|
||||
'sent_to_admin' => $sent_to_admin,
|
||||
)
|
||||
);
|
||||
|
||||
echo "==========\n\n";
|
||||
|
||||
$item_totals = $order->get_order_item_totals();
|
||||
|
||||
if ( $item_totals ) {
|
||||
foreach ( $item_totals as $total ) {
|
||||
echo wp_kses_post( $total['label'] . "\t " . $total['value'] ) . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ( $order->get_customer_note() ) {
|
||||
echo esc_html__( 'Note:', 'woocommerce' ) . "\t " . wp_kses_post( wptexturize( $order->get_customer_note() ) ) . "\n";
|
||||
}
|
||||
|
||||
if ( $sent_to_admin ) {
|
||||
/* translators: %s: Order link. */
|
||||
echo "\n" . sprintf( esc_html__( 'View order: %s', 'woocommerce' ), esc_url( $order->get_edit_order_url() ) ) . "\n";
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text, $email );
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* Email Order Items (plain)
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-order-items.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates\Emails\Plain
|
||||
* @version 5.2.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
foreach ( $items as $item_id => $item ) :
|
||||
if ( apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
|
||||
$product = $item->get_product();
|
||||
$sku = '';
|
||||
$purchase_note = '';
|
||||
|
||||
if ( is_object( $product ) ) {
|
||||
$sku = $product->get_sku();
|
||||
$purchase_note = $product->get_purchase_note();
|
||||
}
|
||||
|
||||
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, false ) );
|
||||
if ( $show_sku && $sku ) {
|
||||
echo ' (#' . $sku . ')';
|
||||
}
|
||||
echo ' X ' . apply_filters( 'woocommerce_email_order_item_quantity', $item->get_quantity(), $item );
|
||||
echo ' = ' . $order->get_formatted_line_subtotal( $item ) . "\n";
|
||||
// phpcs:enable WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
|
||||
// allow other plugins to add additional product information here.
|
||||
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, $plain_text );
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo strip_tags(
|
||||
wc_display_item_meta(
|
||||
$item,
|
||||
array(
|
||||
'before' => "\n- ",
|
||||
'separator' => "\n- ",
|
||||
'after' => '',
|
||||
'echo' => false,
|
||||
'autop' => false,
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// allow other plugins to add additional product information here.
|
||||
do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, $plain_text );
|
||||
}
|
||||
// Note.
|
||||
if ( $show_purchase_note && $purchase_note ) {
|
||||
echo "\n" . do_shortcode( wp_kses_post( $purchase_note ) );
|
||||
}
|
||||
echo "\n\n";
|
||||
endforeach;
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Shop breadcrumb
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/global/breadcrumb.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 2.3.0
|
||||
* @see woocommerce_breadcrumb()
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( ! empty( $breadcrumb ) ) {
|
||||
|
||||
echo $wrap_before;
|
||||
|
||||
foreach ( $breadcrumb as $key => $crumb ) {
|
||||
|
||||
echo $before;
|
||||
|
||||
if ( ! empty( $crumb[1] ) && sizeof( $breadcrumb ) !== $key + 1 ) {
|
||||
echo '<a href="' . esc_url( $crumb[1] ) . '">' . esc_html( $crumb[0] ) . '</a>';
|
||||
} else {
|
||||
echo esc_html( $crumb[0] );
|
||||
}
|
||||
|
||||
echo $after;
|
||||
|
||||
if ( sizeof( $breadcrumb ) !== $key + 1 ) {
|
||||
echo $delimiter;
|
||||
}
|
||||
}
|
||||
|
||||
echo $wrap_after;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* Login form
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/global/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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 7.0.1
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( is_user_logged_in() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<form class="woocommerce-form woocommerce-form-login login" method="post" <?php echo ( $hidden ) ? 'style="display:none;"' : ''; ?>>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_start' ); ?>
|
||||
|
||||
<?php echo ( $message ) ? wpautop( wptexturize( $message ) ) : ''; // @codingStandardsIgnoreLine ?>
|
||||
|
||||
<p class="form-row form-row-first">
|
||||
<label for="username"><?php esc_html_e( 'Username or email', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="input-text" name="username" id="username" autocomplete="username" />
|
||||
</p>
|
||||
<p class="form-row form-row-last">
|
||||
<label for="password"><?php esc_html_e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input class="input-text woocommerce-Input" type="password" name="password" id="password" autocomplete="current-password" />
|
||||
</p>
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form' ); ?>
|
||||
|
||||
<p class="form-row">
|
||||
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox woocommerce-form-login__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', 'woocommerce' ); ?></span>
|
||||
</label>
|
||||
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
|
||||
<input type="hidden" name="redirect" value="<?php echo esc_url( $redirect ); ?>" />
|
||||
<button type="submit" class="woocommerce-button button woocommerce-form-login__submit<?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( 'Login', 'woocommerce' ); ?>"><?php esc_html_e( 'Login', 'woocommerce' ); ?></button>
|
||||
</p>
|
||||
<p class="lost_password">
|
||||
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'woocommerce' ); ?></a>
|
||||
</p>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_end' ); ?>
|
||||
|
||||
</form>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
/**
|
||||
* Product quantity inputs
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/global/quantity-input.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 7.8.0
|
||||
*
|
||||
* @var bool $readonly If the input should be set to readonly mode.
|
||||
* @var string $type The input type attribute.
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
/* translators: %s: Quantity. */
|
||||
$label = ! empty( $args['product_name'] ) ? sprintf( esc_html__( '%s quantity', 'woocommerce' ), wp_strip_all_tags( $args['product_name'] ) ) : esc_html__( 'Quantity', 'woocommerce' );
|
||||
|
||||
?>
|
||||
<div class="quantity">
|
||||
<?php
|
||||
/**
|
||||
* Hook to output something before the quantity input field.
|
||||
*
|
||||
* @since 7.2.0
|
||||
*/
|
||||
do_action( 'woocommerce_before_quantity_input_field' );
|
||||
?>
|
||||
<label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo esc_attr( $label ); ?></label>
|
||||
<input
|
||||
type="<?php echo esc_attr( $type ); ?>"
|
||||
<?php echo $readonly ? 'readonly="readonly"' : ''; ?>
|
||||
id="<?php echo esc_attr( $input_id ); ?>"
|
||||
class="<?php echo esc_attr( join( ' ', (array) $classes ) ); ?>"
|
||||
name="<?php echo esc_attr( $input_name ); ?>"
|
||||
value="<?php echo esc_attr( $input_value ); ?>"
|
||||
aria-label="<?php esc_attr_e( 'Product quantity', 'woocommerce' ); ?>"
|
||||
size="4"
|
||||
min="<?php echo esc_attr( $min_value ); ?>"
|
||||
max="<?php echo esc_attr( 0 < $max_value ? $max_value : '' ); ?>"
|
||||
<?php if ( ! $readonly ) : ?>
|
||||
step="<?php echo esc_attr( $step ); ?>"
|
||||
placeholder="<?php echo esc_attr( $placeholder ); ?>"
|
||||
inputmode="<?php echo esc_attr( $inputmode ); ?>"
|
||||
autocomplete="<?php echo esc_attr( isset( $autocomplete ) ? $autocomplete : 'on' ); ?>"
|
||||
<?php endif; ?>
|
||||
/>
|
||||
<?php
|
||||
/**
|
||||
* Hook to output something after quantity input field
|
||||
*
|
||||
* @since 3.6.0
|
||||
*/
|
||||
do_action( 'woocommerce_after_quantity_input_field' );
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* Sidebar
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/global/sidebar.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 1.6.4
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
get_sidebar( 'shop' );
|
||||
|
||||
/* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* Content wrappers
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/global/wrapper-end.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
$template = wc_get_theme_slug_for_templates();
|
||||
|
||||
switch ( $template ) {
|
||||
case 'twentyten':
|
||||
echo '</div></div>';
|
||||
break;
|
||||
case 'twentyeleven':
|
||||
echo '</div>';
|
||||
get_sidebar( 'shop' );
|
||||
echo '</div>';
|
||||
break;
|
||||
case 'twentytwelve':
|
||||
echo '</div></div>';
|
||||
break;
|
||||
case 'twentythirteen':
|
||||
echo '</div></div>';
|
||||
break;
|
||||
case 'twentyfourteen':
|
||||
echo '</div></div></div>';
|
||||
get_sidebar( 'content' );
|
||||
break;
|
||||
case 'twentyfifteen':
|
||||
echo '</div></div>';
|
||||
break;
|
||||
case 'twentysixteen':
|
||||
echo '</main></div>';
|
||||
break;
|
||||
default:
|
||||
echo '</main></div>';
|
||||
break;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* Content wrappers
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/global/wrapper-start.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
$template = wc_get_theme_slug_for_templates();
|
||||
|
||||
switch ( $template ) {
|
||||
case 'twentyten':
|
||||
echo '<div id="container"><div id="content" role="main">';
|
||||
break;
|
||||
case 'twentyeleven':
|
||||
echo '<div id="primary"><div id="content" role="main" class="twentyeleven">';
|
||||
break;
|
||||
case 'twentytwelve':
|
||||
echo '<div id="primary" class="site-content"><div id="content" role="main" class="twentytwelve">';
|
||||
break;
|
||||
case 'twentythirteen':
|
||||
echo '<div id="primary" class="site-content"><div id="content" role="main" class="entry-content twentythirteen">';
|
||||
break;
|
||||
case 'twentyfourteen':
|
||||
echo '<div id="primary" class="content-area"><div id="content" role="main" class="site-content twentyfourteen"><div class="tfwc">';
|
||||
break;
|
||||
case 'twentyfifteen':
|
||||
echo '<div id="primary" role="main" class="content-area twentyfifteen"><div id="main" class="site-main t15wc">';
|
||||
break;
|
||||
case 'twentysixteen':
|
||||
echo '<div id="primary" class="content-area twentysixteen"><main id="main" class="site-main" role="main">';
|
||||
break;
|
||||
default:
|
||||
echo '<div id="primary" class="content-area"><main id="main" class="site-main" role="main">';
|
||||
break;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* Loop Add to Cart
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/loop/add-to-cart.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 9.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
global $product;
|
||||
|
||||
echo apply_filters(
|
||||
'woocommerce_loop_add_to_cart_link', // WPCS: XSS ok.
|
||||
sprintf(
|
||||
'<a href="%s" aria-describedby="woocommerce_loop_add_to_cart_link_describedby_%s" data-quantity="%s" class="%s" %s>%s</a>',
|
||||
esc_url( $product->add_to_cart_url() ),
|
||||
esc_attr( $product->get_id() ),
|
||||
esc_attr( isset( $args['quantity'] ) ? $args['quantity'] : 1 ),
|
||||
esc_attr( isset( $args['class'] ) ? $args['class'] : 'button' ),
|
||||
isset( $args['attributes'] ) ? wc_implode_html_attributes( $args['attributes'] ) : '',
|
||||
esc_html( $product->add_to_cart_text() )
|
||||
),
|
||||
$product,
|
||||
$args
|
||||
);
|
||||
?>
|
||||
<span id="woocommerce_loop_add_to_cart_link_describedby_<?php echo esc_attr( $product->get_id() ); ?>" class="screen-reader-text">
|
||||
<?php echo esc_html( $args['aria-describedby_text'] ); ?>
|
||||
</span>
|
||||
47
wp/wp-content/plugins/woocommerce/templates/loop/header.php
Normal file
47
wp/wp-content/plugins/woocommerce/templates/loop/header.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* Product taxonomy archive header
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/loop/header.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 8.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<header class="woocommerce-products-header">
|
||||
<?php
|
||||
/**
|
||||
* Hook: woocommerce_show_page_title.
|
||||
*
|
||||
* Allow developers to remove the product taxonomy archive page title.
|
||||
*
|
||||
* @since 2.0.6.
|
||||
*/
|
||||
if ( apply_filters( 'woocommerce_show_page_title', true ) ) :
|
||||
?>
|
||||
<h1 class="woocommerce-products-header__title page-title"><?php woocommerce_page_title(); ?></h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Hook: woocommerce_archive_description.
|
||||
*
|
||||
* @since 1.6.2.
|
||||
* @hooked woocommerce_taxonomy_archive_description - 10
|
||||
* @hooked woocommerce_product_archive_description - 10
|
||||
*/
|
||||
do_action( 'woocommerce_archive_description' );
|
||||
?>
|
||||
</header>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* Product Loop End
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/loop/loop-end.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 2.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* Product Loop Start
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/loop/loop-start.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<ul class="products columns-<?php echo esc_attr( wc_get_loop_prop( 'columns' ) ); ?>">
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* Displayed when no products are found matching the current query
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/loop/no-products-found.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 7.8.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
?>
|
||||
<div class="woocommerce-no-products-found">
|
||||
<?php wc_print_notice( esc_html__( 'No products were found matching your selection.', 'woocommerce' ), 'notice' ); ?>
|
||||
</div>
|
||||
31
wp/wp-content/plugins/woocommerce/templates/loop/orderby.php
Normal file
31
wp/wp-content/plugins/woocommerce/templates/loop/orderby.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Show options for ordering
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/loop/orderby.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<form class="woocommerce-ordering" method="get">
|
||||
<select name="orderby" class="orderby" aria-label="<?php esc_attr_e( 'Shop order', 'woocommerce' ); ?>">
|
||||
<?php foreach ( $catalog_orderby_options as $id => $name ) : ?>
|
||||
<option value="<?php echo esc_attr( $id ); ?>" <?php selected( $orderby, $id ); ?>><?php echo esc_html( $name ); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<input type="hidden" name="paged" value="1" />
|
||||
<?php wc_query_string_form_fields( null, array( 'orderby', 'submit', 'paged', 'product-page' ) ); ?>
|
||||
</form>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* Pagination - Show numbered pagination for catalog pages
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/loop/pagination.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.3.1
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$total = isset( $total ) ? $total : wc_get_loop_prop( 'total_pages' );
|
||||
$current = isset( $current ) ? $current : wc_get_loop_prop( 'current_page' );
|
||||
$base = isset( $base ) ? $base : esc_url_raw( str_replace( 999999999, '%#%', remove_query_arg( 'add-to-cart', get_pagenum_link( 999999999, false ) ) ) );
|
||||
$format = isset( $format ) ? $format : '';
|
||||
|
||||
if ( $total <= 1 ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<nav class="woocommerce-pagination">
|
||||
<?php
|
||||
echo paginate_links(
|
||||
apply_filters(
|
||||
'woocommerce_pagination_args',
|
||||
array( // WPCS: XSS ok.
|
||||
'base' => $base,
|
||||
'format' => $format,
|
||||
'add_args' => false,
|
||||
'current' => max( 1, $current ),
|
||||
'total' => $total,
|
||||
'prev_text' => is_rtl() ? '→' : '←',
|
||||
'next_text' => is_rtl() ? '←' : '→',
|
||||
'type' => 'list',
|
||||
'end_size' => 3,
|
||||
'mid_size' => 3,
|
||||
)
|
||||
)
|
||||
);
|
||||
?>
|
||||
</nav>
|
||||
27
wp/wp-content/plugins/woocommerce/templates/loop/price.php
Normal file
27
wp/wp-content/plugins/woocommerce/templates/loop/price.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Loop Price
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/loop/price.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 1.6.4
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
global $product;
|
||||
?>
|
||||
|
||||
<?php if ( $price_html = $product->get_price_html() ) : ?>
|
||||
<span class="price"><?php echo $price_html; ?></span>
|
||||
<?php endif; ?>
|
||||
28
wp/wp-content/plugins/woocommerce/templates/loop/rating.php
Normal file
28
wp/wp-content/plugins/woocommerce/templates/loop/rating.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Loop Rating
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/loop/rating.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
global $product;
|
||||
|
||||
if ( ! wc_review_ratings_enabled() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
echo wc_get_rating_html( $product->get_average_rating() ); // WordPress.XSS.EscapeOutput.OutputNotEscaped.
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* Result Count
|
||||
*
|
||||
* Shows text: Showing x - x of x results.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/loop/result-count.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 3.7.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<p class="woocommerce-result-count">
|
||||
<?php
|
||||
// phpcs:disable WordPress.Security
|
||||
if ( 1 === intval( $total ) ) {
|
||||
_e( 'Showing the single result', 'woocommerce' );
|
||||
} elseif ( $total <= $per_page || -1 === $per_page ) {
|
||||
/* translators: %d: total results */
|
||||
printf( _n( 'Showing all %d result', 'Showing all %d results', $total, 'woocommerce' ), $total );
|
||||
} else {
|
||||
$first = ( $per_page * $current ) - $per_page + 1;
|
||||
$last = min( $total, $per_page * $current );
|
||||
/* translators: 1: first result 2: last result 3: total results */
|
||||
printf( _nx( 'Showing %1$d–%2$d of %3$d result', 'Showing %1$d–%2$d of %3$d results', $total, 'with first and last result', 'woocommerce' ), $first, $last, $total );
|
||||
}
|
||||
// phpcs:enable WordPress.Security
|
||||
?>
|
||||
</p>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Product loop sale flash
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/loop/sale-flash.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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 1.6.4
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
global $post, $product;
|
||||
|
||||
?>
|
||||
<?php if ( $product->is_on_sale() ) : ?>
|
||||
|
||||
<?php echo apply_filters( 'woocommerce_sale_flash', '<span class="onsale">' . esc_html__( 'Sale!', 'woocommerce' ) . '</span>', $post, $product ); ?>
|
||||
|
||||
<?php
|
||||
endif;
|
||||
|
||||
/* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */
|
||||
@@ -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://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. */
|
||||
@@ -0,0 +1,47 @@
|
||||
<?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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 7.8.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 : ?>
|
||||
|
||||
<?php
|
||||
|
||||
$wp_button_class = wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '';
|
||||
wc_print_notice( esc_html__( 'No downloads available yet.', 'woocommerce' ) . ' <a class="button wc-forward' . esc_attr( $wp_button_class ) . '" href="' . esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ) . '">' . esc_html__( 'Browse products', 'woocommerce' ) . '</a>', 'notice' ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
|
||||
?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_after_account_downloads', $has_downloads ); ?>
|
||||
@@ -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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 7.8.0
|
||||
*/
|
||||
|
||||
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 : ?>
|
||||
<?php wc_print_notice( esc_html__( 'New payment methods can only be added during checkout. Please contact us if you require assistance.', 'woocommerce' ), 'notice' ); ?>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,92 @@
|
||||
<?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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 8.7.0
|
||||
*/
|
||||
|
||||
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' ); ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--first form-row form-row-first">
|
||||
<label for="account_first_name"><?php esc_html_e( 'First name', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<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>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--last form-row form-row-last">
|
||||
<label for="account_last_name"><?php esc_html_e( 'Last name', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<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>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="account_display_name"><?php esc_html_e( 'Display name', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<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 ); ?>" /> <span><em><?php esc_html_e( 'This will be how your name will be displayed in the account section and in reviews', 'woocommerce' ); ?></em></span>
|
||||
</p>
|
||||
<div class="clear"></div>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="account_email"><?php esc_html_e( 'Email address', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<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>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Hook where additional fields should be rendered.
|
||||
*
|
||||
* @since 8.7.0
|
||||
*/
|
||||
do_action( 'woocommerce_edit_account_form_fields' );
|
||||
?>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php esc_html_e( 'Password change', 'woocommerce' ); ?></legend>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="password_current"><?php esc_html_e( 'Current password (leave blank to leave unchanged)', 'woocommerce' ); ?></label>
|
||||
<input type="password" class="woocommerce-Input woocommerce-Input--password input-text" name="password_current" id="password_current" autocomplete="off" />
|
||||
</p>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="password_1"><?php esc_html_e( 'New password (leave blank to leave unchanged)', 'woocommerce' ); ?></label>
|
||||
<input type="password" class="woocommerce-Input woocommerce-Input--password input-text" name="password_1" id="password_1" autocomplete="off" />
|
||||
</p>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="password_2"><?php esc_html_e( 'Confirm new password', 'woocommerce' ); ?></label>
|
||||
<input type="password" class="woocommerce-Input woocommerce-Input--password input-text" name="password_2" id="password_2" autocomplete="off" />
|
||||
</p>
|
||||
</fieldset>
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* My Account edit account form.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*/
|
||||
do_action( 'woocommerce_edit_account_form' );
|
||||
?>
|
||||
|
||||
<p>
|
||||
<?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" />
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_edit_account_form_end' ); ?>
|
||||
</form>
|
||||
|
||||
<?php do_action( 'woocommerce_after_edit_account_form' ); ?>
|
||||
@@ -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://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' ); ?>
|
||||
@@ -0,0 +1,119 @@
|
||||
<?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://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( 'Login', 'woocommerce' ); ?></h2>
|
||||
|
||||
<form class="woocommerce-form woocommerce-form-login login" method="post">
|
||||
|
||||
<?php do_action( 'woocommerce_login_form_start' ); ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="username"><?php esc_html_e( 'Username or email address', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="username" autocomplete="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
|
||||
</p>
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="password"><?php esc_html_e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input class="woocommerce-Input woocommerce-Input--text input-text" type="password" name="password" id="password" autocomplete="current-password" />
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_login_form' ); ?>
|
||||
|
||||
<p class="form-row">
|
||||
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox woocommerce-form-login__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', 'woocommerce' ); ?></span>
|
||||
</label>
|
||||
<?php wp_nonce_field( 'woocommerce-login', 'woocommerce-login-nonce' ); ?>
|
||||
<button type="submit" class="woocommerce-button button woocommerce-form-login__submit<?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', 'woocommerce' ); ?>"><?php esc_html_e( 'Log in', 'woocommerce' ); ?></button>
|
||||
</p>
|
||||
<p class="woocommerce-LostPassword lost_password">
|
||||
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php esc_html_e( 'Lost your password?', 'woocommerce' ); ?></a>
|
||||
</p>
|
||||
|
||||
<?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', 'woocommerce' ); ?></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 if ( 'no' === get_option( 'woocommerce_registration_generate_username' ) ) : ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="reg_username"><?php esc_html_e( 'Username', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="text" class="woocommerce-Input woocommerce-Input--text input-text" name="username" id="reg_username" autocomplete="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
|
||||
</p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="reg_email"><?php esc_html_e( 'Email address', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="email" class="woocommerce-Input woocommerce-Input--text input-text" name="email" id="reg_email" autocomplete="email" value="<?php echo ( ! empty( $_POST['email'] ) ) ? esc_attr( wp_unslash( $_POST['email'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
|
||||
</p>
|
||||
|
||||
<?php if ( 'no' === get_option( 'woocommerce_registration_generate_password' ) ) : ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide">
|
||||
<label for="reg_password"><?php esc_html_e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text" name="password" id="reg_password" autocomplete="new-password" />
|
||||
</p>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<p><?php esc_html_e( 'A link to set a new password will be sent to your email address.', 'woocommerce' ); ?></p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_register_form' ); ?>
|
||||
|
||||
<p class="woocommerce-form-row form-row">
|
||||
<?php wp_nonce_field( 'woocommerce-register', 'woocommerce-register-nonce' ); ?>
|
||||
<button type="submit" class="woocommerce-Button woocommerce-button button<?php echo esc_attr( wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '' ); ?> woocommerce-form-register__submit" name="register" value="<?php esc_attr_e( 'Register', 'woocommerce' ); ?>"><?php esc_html_e( 'Register', 'woocommerce' ); ?></button>
|
||||
</p>
|
||||
|
||||
<?php do_action( 'woocommerce_register_form_end' ); ?>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_after_customer_login_form' ); ?>
|
||||
@@ -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://woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce\Templates
|
||||
* @version 9.0.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
do_action( 'woocommerce_before_lost_password_form' );
|
||||
?>
|
||||
|
||||
<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.', 'woocommerce' ) ); ?></p><?php // @codingStandardsIgnoreLine ?>
|
||||
|
||||
<p class="woocommerce-form-row woocommerce-form-row--first form-row form-row-first">
|
||||
<label for="user_login"><?php esc_html_e( 'Username or email', 'woocommerce' ); ?> <span class="required">*</span></label>
|
||||
<input class="woocommerce-Input woocommerce-Input--text input-text" type="text" name="user_login" id="user_login" autocomplete="username" aria-required="true" />
|
||||
</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" />
|
||||
<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( 'Reset password', 'woocommerce' ); ?>"><?php esc_html_e( 'Reset password', 'woocommerce' ); ?></button>
|
||||
</p>
|
||||
|
||||
<?php wp_nonce_field( 'lost_password', 'woocommerce-lost-password-nonce' ); ?>
|
||||
|
||||
</form>
|
||||
<?php
|
||||
do_action( 'woocommerce_after_lost_password_form' );
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user