initial commit
This commit is contained in:
29
includes/admin/views/html-admin-dashboard-setup.php
Normal file
29
includes/admin/views/html-admin-dashboard-setup.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Dashboard - Finish Setup
|
||||
*
|
||||
* @package WooCommerce\Admin
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<div class="dashboard-widget-finish-setup">
|
||||
<span class='progress-wrapper'>
|
||||
<svg class="circle-progress" width="17" height="17" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle r="6.5" cx="10" cy="10" fill="transparent" stroke-dasharray="40.859" stroke-dashoffset="0"></circle>
|
||||
<circle class="bar" r="6.5" cx="190" cy="10" fill="transparent" stroke-dasharray="40.859" stroke-dashoffset="<?php echo esc_attr( $circle_dashoffset ); ?>" transform='rotate(-90 100 100)'></circle>
|
||||
</svg>
|
||||
<span><?php echo esc_html_e( 'Step', 'woocommerce' ); ?> <?php echo esc_html( $completed_tasks_count ); ?> <?php echo esc_html_e( 'of', 'woocommerce' ); ?> <?php echo esc_html( $tasks_count ); ?></span>
|
||||
</span>
|
||||
|
||||
<div class="description">
|
||||
<div>
|
||||
<?php echo esc_html_e( 'You\'re almost there! Once you complete store setup you can start receiving orders.', 'woocommerce' ); ?>
|
||||
<div><a href='<?php echo esc_attr( $button_link ); ?>' class='button button-primary'><?php echo esc_html_e( 'Start selling', 'woocommerce' ); ?></a></div>
|
||||
</div>
|
||||
<img src="<?php echo esc_url( WC()->plugin_url() ); ?>/assets/images/dashboard-widget-setup.png" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
143
includes/admin/views/html-admin-page-addons.php
Normal file
143
includes/admin/views/html-admin-page-addons.php
Normal file
@ -0,0 +1,143 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Page - Addons
|
||||
*
|
||||
* @package WooCommerce\Admin
|
||||
* @var string $view
|
||||
* @var object $addons
|
||||
* @var object $promotions
|
||||
*/
|
||||
|
||||
use Automattic\WooCommerce\Admin\RemoteInboxNotifications as PromotionRuleEngine;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$current_section_name = __( 'Browse Categories', 'woocommerce' );
|
||||
?>
|
||||
<div class="woocommerce wc-addons-wrap">
|
||||
<h1 class="screen-reader-text"><?php esc_html_e( 'Marketplace', 'woocommerce' ); ?></h1>
|
||||
|
||||
<?php if ( $sections ) : ?>
|
||||
<div class="marketplace-header">
|
||||
<h1 class="marketplace-header__title"><?php esc_html_e( 'WooCommerce Marketplace', 'woocommerce' ); ?></h1>
|
||||
<p class="marketplace-header__description"><?php esc_html_e( 'Grow your business with hundreds of free and paid WooCommerce extensions.', 'woocommerce' ); ?></p>
|
||||
<form class="marketplace-header__search-form" method="GET">
|
||||
<input
|
||||
type="text"
|
||||
name="search"
|
||||
value="<?php echo esc_attr( ! empty( $search ) ? sanitize_text_field( wp_unslash( $search ) ) : '' ); ?>"
|
||||
placeholder="<?php esc_attr_e( 'Search for extensions', 'woocommerce' ); ?>"
|
||||
/>
|
||||
<button type="submit">
|
||||
<span class="dashicons dashicons-search"></span>
|
||||
</button>
|
||||
<input type="hidden" name="page" value="wc-addons">
|
||||
<input type="hidden" name="section" value="_all">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="top-bar">
|
||||
<div id="marketplace-current-section-dropdown" class="current-section-dropdown">
|
||||
<ul>
|
||||
<?php foreach ( $sections as $section ) : ?>
|
||||
<?php
|
||||
if ( $current_section === $section->slug && '_featured' !== $section->slug ) {
|
||||
$current_section_name = $section->label;
|
||||
}
|
||||
?>
|
||||
<li>
|
||||
<a
|
||||
class="<?php echo $current_section === $section->slug ? 'current' : ''; ?>"
|
||||
href="<?php echo esc_url( admin_url( 'admin.php?page=wc-addons§ion=' . esc_attr( $section->slug ) ) ); ?>">
|
||||
<?php echo esc_html( $section->label ); ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<div id="marketplace-current-section-name" class="current-section-name"><?php echo esc_html( $current_section_name ); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wp-header-end"></div>
|
||||
|
||||
<div class="wrap">
|
||||
<div class="marketplace-content-wrapper">
|
||||
<?php if ( ! empty( $search ) && 0 === count( $addons ) ) : ?>
|
||||
<h1 class="search-form-title">
|
||||
<?php esc_html_e( 'Sorry, could not find anything. Try searching again using a different term.', 'woocommerce' ); ?></p>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
<?php if ( ! empty( $search ) && count( $addons ) > 0 ) : ?>
|
||||
<h1 class="search-form-title">
|
||||
<?php // translators: search keyword. ?>
|
||||
<?php printf( esc_html__( 'Search results for "%s"', 'woocommerce' ), esc_html( sanitize_text_field( wp_unslash( $search ) ) ) ); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( '_featured' === $current_section ) : ?>
|
||||
<div class="addons-featured">
|
||||
<?php WC_Admin_Addons::render_featured(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ( '_featured' !== $current_section && $addons ) : ?>
|
||||
<?php
|
||||
if ( ! empty( $promotions ) && WC()->is_wc_admin_active() ) {
|
||||
foreach ( $promotions as $promotion ) {
|
||||
WC_Admin_Addons::output_search_promotion_block( $promotion );
|
||||
}
|
||||
}
|
||||
?>
|
||||
<ul class="products">
|
||||
<?php foreach ( $addons as $addon ) : ?>
|
||||
<?php
|
||||
if ( 'shipping_methods' === $current_section ) {
|
||||
// Do not show USPS or Canada Post extensions for US and CA stores, respectively.
|
||||
$country = WC()->countries->get_base_country();
|
||||
if ( 'US' === $country
|
||||
&& false !== strpos(
|
||||
$addon->link,
|
||||
'woocommerce.com/products/usps-shipping-method'
|
||||
)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
if ( 'CA' === $country
|
||||
&& false !== strpos(
|
||||
$addon->link,
|
||||
'woocommerce.com/products/canada-post-shipping-method'
|
||||
)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
WC_Admin_Addons::render_product_card( $addon );
|
||||
?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?php /* translators: a url */ ?>
|
||||
<p><?php printf( wp_kses_post( __( 'Our catalog of WooCommerce Extensions can be found on WooCommerce.com here: <a href="%s">WooCommerce Extensions Catalog</a>', 'woocommerce' ) ), 'https://woocommerce.com/product-category/woocommerce-extensions/' ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( 'Storefront' !== $theme['Name'] && '_featured' !== $current_section ) : ?>
|
||||
<?php
|
||||
$storefront_url = WC_Admin_Addons::add_in_app_purchase_url_params( 'https://woocommerce.com/storefront/?utm_source=extensionsscreen&utm_medium=product&utm_campaign=wcaddon' );
|
||||
?>
|
||||
<div class="storefront">
|
||||
<a href="<?php echo esc_url( $storefront_url ); ?>" target="_blank"><img src="<?php echo esc_url( WC()->plugin_url() ); ?>/assets/images/storefront.png" alt="<?php esc_attr_e( 'Storefront', 'woocommerce' ); ?>" /></a>
|
||||
<h2><?php esc_html_e( 'Looking for a WooCommerce theme?', 'woocommerce' ); ?></h2>
|
||||
<p><?php echo wp_kses_post( __( 'We recommend Storefront, the <em>official</em> WooCommerce theme.', 'woocommerce' ) ); ?></p>
|
||||
<p><?php echo wp_kses_post( __( 'Storefront is an intuitive, flexible and <strong>free</strong> WordPress theme offering deep integration with WooCommerce and many of the most popular customer-facing extensions.', 'woocommerce' ) ); ?></p>
|
||||
<p>
|
||||
<a href="<?php echo esc_url( $storefront_url ); ?>" target="_blank" class="button"><?php esc_html_e( 'Read all about it', 'woocommerce' ); ?></a>
|
||||
<a href="<?php echo esc_url( wp_nonce_url( self_admin_url( 'update.php?action=install-theme&theme=storefront' ), 'install-theme_storefront' ) ); ?>" class="button button-primary"><?php esc_html_e( 'Download & install', 'woocommerce' ); ?></a>
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
98
includes/admin/views/html-admin-page-product-export.php
Normal file
98
includes/admin/views/html-admin-page-product-export.php
Normal file
@ -0,0 +1,98 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Product Export
|
||||
*
|
||||
* @package WooCommerce\Admin\Export
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
wp_enqueue_script( 'wc-product-export' );
|
||||
|
||||
$exporter = new WC_Product_CSV_Exporter();
|
||||
?>
|
||||
<div class="wrap woocommerce">
|
||||
<h1><?php esc_html_e( 'Export Products', 'woocommerce' ); ?></h1>
|
||||
|
||||
<div class="woocommerce-exporter-wrapper">
|
||||
<form class="woocommerce-exporter">
|
||||
<header>
|
||||
<span class="spinner is-active"></span>
|
||||
<h2><?php esc_html_e( 'Export products to a CSV file', 'woocommerce' ); ?></h2>
|
||||
<p><?php esc_html_e( 'This tool allows you to generate and download a CSV file containing a list of all products.', 'woocommerce' ); ?></p>
|
||||
</header>
|
||||
<section>
|
||||
<table class="form-table woocommerce-exporter-options">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="woocommerce-exporter-columns"><?php esc_html_e( 'Which columns should be exported?', 'woocommerce' ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<select id="woocommerce-exporter-columns" class="woocommerce-exporter-columns wc-enhanced-select" style="width:100%;" multiple data-placeholder="<?php esc_attr_e( 'Export all columns', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
foreach ( $exporter->get_default_column_names() as $column_id => $column_name ) {
|
||||
echo '<option value="' . esc_attr( $column_id ) . '">' . esc_html( $column_name ) . '</option>';
|
||||
}
|
||||
?>
|
||||
<option value="downloads"><?php esc_html_e( 'Downloads', 'woocommerce' ); ?></option>
|
||||
<option value="attributes"><?php esc_html_e( 'Attributes', 'woocommerce' ); ?></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="woocommerce-exporter-types"><?php esc_html_e( 'Which product types should be exported?', 'woocommerce' ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<select id="woocommerce-exporter-types" class="woocommerce-exporter-types wc-enhanced-select" style="width:100%;" multiple data-placeholder="<?php esc_attr_e( 'Export all products', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
foreach ( WC_Admin_Exporters::get_product_types() as $value => $label ) {
|
||||
echo '<option value="' . esc_attr( $value ) . '">' . esc_html( $label ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="woocommerce-exporter-category"><?php esc_html_e( 'Which product category should be exported?', 'woocommerce' ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<select id="woocommerce-exporter-category" class="woocommerce-exporter-category wc-enhanced-select" style="width:100%;" multiple data-placeholder="<?php esc_attr_e( 'Export all categories', 'woocommerce' ); ?>">
|
||||
<?php
|
||||
$categories = get_categories(
|
||||
array(
|
||||
'taxonomy' => 'product_cat',
|
||||
'hide_empty' => false,
|
||||
)
|
||||
);
|
||||
foreach ( $categories as $category ) {
|
||||
echo '<option value="' . esc_attr( $category->slug ) . '">' . esc_html( $category->name ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="woocommerce-exporter-meta"><?php esc_html_e( 'Export custom meta?', 'woocommerce' ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="checkbox" id="woocommerce-exporter-meta" value="1" />
|
||||
<label for="woocommerce-exporter-meta"><?php esc_html_e( 'Yes, export all custom meta', 'woocommerce' ); ?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<?php do_action( 'woocommerce_product_export_row' ); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<progress class="woocommerce-exporter-progress" max="100" value="0"></progress>
|
||||
</section>
|
||||
<div class="wc-actions">
|
||||
<button type="submit" class="woocommerce-exporter-button button button-primary" value="<?php esc_attr_e( 'Generate CSV', 'woocommerce' ); ?>"><?php esc_html_e( 'Generate CSV', 'woocommerce' ); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
85
includes/admin/views/html-admin-page-reports.php
Normal file
85
includes/admin/views/html-admin-page-reports.php
Normal file
@ -0,0 +1,85 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Page - Reports
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="wrap woocommerce">
|
||||
<?php if ( WC()->is_wc_admin_active() ) { ?>
|
||||
<div id="message" class="error inline" style="margin-top:30px">
|
||||
<p>
|
||||
<strong>
|
||||
<?php
|
||||
/* translators: 1: Link URL */
|
||||
echo wp_kses_post( sprintf( __( 'With the release of WooCommerce 4.0, these reports are being replaced. There is a new and better Analytics section available for users running WordPress 5.3+. Head on over to the <a href="%1$s">WooCommerce Analytics</a> or learn more about the new experience in the <a href="https://docs.woocommerce.com/document/woocommerce-analytics/" target="_blank">WooCommerce Analytics documentation</a>.', 'woocommerce' ), esc_url( wc_admin_url( '&path=/analytics/overview' ) ) ) );
|
||||
?>
|
||||
</strong>
|
||||
</p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<nav class="nav-tab-wrapper woo-nav-tab-wrapper">
|
||||
<?php
|
||||
foreach ( $reports as $key => $report_group ) {
|
||||
echo '<a href="' . admin_url( 'admin.php?page=wc-reports&tab=' . urlencode( $key ) ) . '" class="nav-tab ';
|
||||
if ( $current_tab == $key ) {
|
||||
echo 'nav-tab-active';
|
||||
}
|
||||
echo '">' . esc_html( $report_group['title'] ) . '</a>';
|
||||
}
|
||||
|
||||
do_action( 'wc_reports_tabs' );
|
||||
?>
|
||||
</nav>
|
||||
<?php
|
||||
if ( count( $reports[ $current_tab ]['reports'] ) > 1 ) {
|
||||
?>
|
||||
<ul class="subsubsub">
|
||||
<li>
|
||||
<?php
|
||||
|
||||
$links = array();
|
||||
|
||||
foreach ( $reports[ $current_tab ]['reports'] as $key => $report ) {
|
||||
$link = '<a href="admin.php?page=wc-reports&tab=' . urlencode( $current_tab ) . '&report=' . urlencode( $key ) . '" class="';
|
||||
|
||||
if ( $key == $current_report ) {
|
||||
$link .= 'current';
|
||||
}
|
||||
|
||||
$link .= '">' . $report['title'] . '</a>';
|
||||
|
||||
$links[] = $link;
|
||||
}
|
||||
|
||||
echo implode( ' | </li><li>', $links );
|
||||
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
<br class="clear" />
|
||||
<?php
|
||||
}
|
||||
|
||||
if ( isset( $reports[ $current_tab ]['reports'][ $current_report ] ) ) {
|
||||
$report = $reports[ $current_tab ]['reports'][ $current_report ];
|
||||
|
||||
if ( ! isset( $report['hide_title'] ) || true != $report['hide_title'] ) {
|
||||
echo '<h1>' . esc_html( $report['title'] ) . '</h1>';
|
||||
} else {
|
||||
echo '<h1 class="screen-reader-text">' . esc_html( $report['title'] ) . '</h1>';
|
||||
}
|
||||
|
||||
if ( $report['description'] ) {
|
||||
echo '<p>' . $report['description'] . '</p>';
|
||||
}
|
||||
|
||||
if ( $report['callback'] && ( is_callable( $report['callback'] ) ) ) {
|
||||
call_user_func( $report['callback'], $current_report );
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
31
includes/admin/views/html-admin-page-status-logs-db.php
Normal file
31
includes/admin/views/html-admin-page-status-logs-db.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Page - Status Database Logs
|
||||
*
|
||||
* @package WooCommerce\Admin\Logs
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<form method="post" id="mainform" action="">
|
||||
<?php $log_table_list->search_box( __( 'Search logs', 'woocommerce' ), 'log' ); ?>
|
||||
<?php $log_table_list->display(); ?>
|
||||
|
||||
<input type="hidden" name="page" value="wc-status" />
|
||||
<input type="hidden" name="tab" value="logs" />
|
||||
|
||||
<?php submit_button( __( 'Flush all logs', 'woocommerce' ), 'delete', 'flush-logs' ); ?>
|
||||
<?php wp_nonce_field( 'woocommerce-status-logs' ); ?>
|
||||
</form>
|
||||
<?php
|
||||
wc_enqueue_js(
|
||||
"jQuery( '#flush-logs' ).on( 'click', function() {
|
||||
if ( window.confirm('" . esc_js( __( 'Are you sure you want to clear all logs from the database?', 'woocommerce' ) ) . "') ) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});"
|
||||
);
|
50
includes/admin/views/html-admin-page-status-logs.php
Normal file
50
includes/admin/views/html-admin-page-status-logs.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Page - Status Logs
|
||||
*
|
||||
* @package WooCommerce\Admin\Logs
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<?php if ( $logs ) : ?>
|
||||
<div id="log-viewer-select">
|
||||
<div class="alignleft">
|
||||
<h2>
|
||||
<?php echo esc_html( $viewed_log ); ?>
|
||||
<?php if ( ! empty( $viewed_log ) ) : ?>
|
||||
<a class="page-title-action" href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'handle' => sanitize_title( $viewed_log ) ), admin_url( 'admin.php?page=wc-status&tab=logs' ) ), 'remove_log' ) ); ?>" class="button"><?php esc_html_e( 'Delete log', 'woocommerce' ); ?></a>
|
||||
<?php endif; ?>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="alignright">
|
||||
<form action="<?php echo esc_url( admin_url( 'admin.php?page=wc-status&tab=logs' ) ); ?>" method="post">
|
||||
<select name="log_file">
|
||||
<?php foreach ( $logs as $log_key => $log_file ) : ?>
|
||||
<?php
|
||||
$timestamp = filemtime( WC_LOG_DIR . $log_file );
|
||||
$date = sprintf(
|
||||
/* translators: 1: last access date 2: last access time 3: last access timezone abbreviation */
|
||||
__( '%1$s at %2$s %3$s', 'woocommerce' ),
|
||||
wp_date( wc_date_format(), $timestamp ),
|
||||
wp_date( wc_time_format(), $timestamp ),
|
||||
wp_date( 'T', $timestamp )
|
||||
);
|
||||
?>
|
||||
<option value="<?php echo esc_attr( $log_key ); ?>" <?php selected( sanitize_title( $viewed_log ), $log_key ); ?>><?php echo esc_html( $log_file ); ?> (<?php echo esc_html( $date ); ?>)</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<button type="submit" class="button" value="<?php esc_attr_e( 'View', 'woocommerce' ); ?>"><?php esc_html_e( 'View', 'woocommerce' ); ?></button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div id="log-viewer">
|
||||
<pre><?php echo esc_html( file_get_contents( WC_LOG_DIR . $viewed_log ) ); ?></pre>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="updated woocommerce-message inline"><p><?php esc_html_e( 'There are currently no logs to view.', 'woocommerce' ); ?></p></div>
|
||||
<?php endif; ?>
|
1032
includes/admin/views/html-admin-page-status-report.php
Normal file
1032
includes/admin/views/html-admin-page-status-report.php
Normal file
File diff suppressed because it is too large
Load Diff
54
includes/admin/views/html-admin-page-status-tools.php
Normal file
54
includes/admin/views/html-admin-page-status-tools.php
Normal file
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Page - Status Tools
|
||||
*
|
||||
* @package WooCommerce
|
||||
*/
|
||||
|
||||
use Automattic\WooCommerce\Utilities\ArrayUtil;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
foreach ( $tools as $action_name => $tool ) {
|
||||
?>
|
||||
<form id="<?php echo esc_attr( 'form_' . $action_name ); ?>" method="GET" action="<?php echo esc_attr( esc_url( admin_url( 'admin.php?foo=bar' ) ) ); ?>">
|
||||
<?php wp_nonce_field( 'debug_action', '_wpnonce', false ); ?>
|
||||
<input type="hidden" name="page" value="wc-status"/>
|
||||
<input type="hidden" name="tab" value="tools"/>
|
||||
<input type="hidden" name="action" value="<?php echo esc_attr( $action_name ); ?>"/>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<table class="wc_status_table wc_status_table--tools widefat" cellspacing="0">
|
||||
<tbody class="tools">
|
||||
<?php foreach ( $tools as $action_name => $tool ) : ?>
|
||||
<tr class="<?php echo sanitize_html_class( $action_name ); ?>">
|
||||
<th>
|
||||
<strong class="name"><?php echo esc_html( $tool['name'] ); ?></strong>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses_post( $tool['desc'] );
|
||||
if ( ! is_null( ArrayUtil::get_value_or_default( $tool, 'selector' ) ) ) {
|
||||
$selector = $tool['selector'];
|
||||
if ( isset( $selector['description'] ) ) {
|
||||
echo '</p><p class="description">';
|
||||
echo wp_kses_post( $selector['description'] );
|
||||
}
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo " <select style='width: 300px;' form='form_$action_name' id='selector_$action_name' data-allow_clear='true' class='${selector['class']}' name='${selector['name']}' data-placeholder='${selector['placeholder']}' data-action='${selector['search_action']}'></select>";
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</th>
|
||||
<td class="run-tool">
|
||||
<?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<input <?php echo ArrayUtil::is_truthy( $tool, 'disabled' ) ? 'disabled' : ''; ?> type="submit" form="<?php echo 'form_' . $action_name; ?>" class="button button-large" value="<?php echo esc_attr( $tool['button'] ); ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
48
includes/admin/views/html-admin-page-status.php
Normal file
48
includes/admin/views/html-admin-page-status.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Page - Status
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$current_tab = ! empty( $_REQUEST['tab'] ) ? sanitize_title( $_REQUEST['tab'] ) : 'status';
|
||||
$tabs = array(
|
||||
'status' => __( 'System status', 'woocommerce' ),
|
||||
'tools' => __( 'Tools', 'woocommerce' ),
|
||||
'logs' => __( 'Logs', 'woocommerce' ),
|
||||
);
|
||||
$tabs = apply_filters( 'woocommerce_admin_status_tabs', $tabs );
|
||||
?>
|
||||
<div class="wrap woocommerce">
|
||||
<nav class="nav-tab-wrapper woo-nav-tab-wrapper">
|
||||
<?php
|
||||
foreach ( $tabs as $name => $label ) {
|
||||
echo '<a href="' . admin_url( 'admin.php?page=wc-status&tab=' . $name ) . '" class="nav-tab ';
|
||||
if ( $current_tab == $name ) {
|
||||
echo 'nav-tab-active';
|
||||
}
|
||||
echo '">' . $label . '</a>';
|
||||
}
|
||||
?>
|
||||
</nav>
|
||||
<h1 class="screen-reader-text"><?php echo esc_html( $tabs[ $current_tab ] ); ?></h1>
|
||||
<?php
|
||||
switch ( $current_tab ) {
|
||||
case 'tools':
|
||||
WC_Admin_Status::status_tools();
|
||||
break;
|
||||
case 'logs':
|
||||
WC_Admin_Status::status_logs();
|
||||
break;
|
||||
default:
|
||||
if ( array_key_exists( $current_tab, $tabs ) && has_action( 'woocommerce_admin_status_content_' . $current_tab ) ) {
|
||||
do_action( 'woocommerce_admin_status_content_' . $current_tab );
|
||||
} else {
|
||||
WC_Admin_Status::status_report();
|
||||
}
|
||||
break;
|
||||
}
|
||||
?>
|
||||
</div>
|
51
includes/admin/views/html-admin-settings.php
Normal file
51
includes/admin/views/html-admin-settings.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Settings
|
||||
*
|
||||
* @package WooCommerce
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$tab_exists = isset( $tabs[ $current_tab ] ) || has_action( 'woocommerce_sections_' . $current_tab ) || has_action( 'woocommerce_settings_' . $current_tab ) || has_action( 'woocommerce_settings_tabs_' . $current_tab );
|
||||
$current_tab_label = isset( $tabs[ $current_tab ] ) ? $tabs[ $current_tab ] : '';
|
||||
|
||||
if ( ! $tab_exists ) {
|
||||
wp_safe_redirect( admin_url( 'admin.php?page=wc-settings' ) );
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<div class="wrap woocommerce">
|
||||
<?php do_action( 'woocommerce_before_settings_' . $current_tab ); ?>
|
||||
<form method="<?php echo esc_attr( apply_filters( 'woocommerce_settings_form_method_tab_' . $current_tab, 'post' ) ); ?>" id="mainform" action="" enctype="multipart/form-data">
|
||||
<nav class="nav-tab-wrapper woo-nav-tab-wrapper">
|
||||
<?php
|
||||
|
||||
foreach ( $tabs as $slug => $label ) {
|
||||
echo '<a href="' . esc_html( admin_url( 'admin.php?page=wc-settings&tab=' . esc_attr( $slug ) ) ) . '" class="nav-tab ' . ( $current_tab === $slug ? 'nav-tab-active' : '' ) . '">' . esc_html( $label ) . '</a>';
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_settings_tabs' );
|
||||
|
||||
?>
|
||||
</nav>
|
||||
<h1 class="screen-reader-text"><?php echo esc_html( $current_tab_label ); ?></h1>
|
||||
<?php
|
||||
do_action( 'woocommerce_sections_' . $current_tab );
|
||||
|
||||
self::show_messages();
|
||||
|
||||
do_action( 'woocommerce_settings_' . $current_tab );
|
||||
do_action( 'woocommerce_settings_tabs_' . $current_tab ); // @deprecated 3.4.0 hook.
|
||||
?>
|
||||
<p class="submit">
|
||||
<?php if ( empty( $GLOBALS['hide_save_button'] ) ) : ?>
|
||||
<button name="save" class="button-primary woocommerce-save-button" type="submit" value="<?php esc_attr_e( 'Save changes', 'woocommerce' ); ?>"><?php esc_html_e( 'Save changes', 'woocommerce' ); ?></button>
|
||||
<?php endif; ?>
|
||||
<?php wp_nonce_field( 'woocommerce-settings' ); ?>
|
||||
</p>
|
||||
</form>
|
||||
<?php do_action( 'woocommerce_after_settings_' . $current_tab ); ?>
|
||||
</div>
|
315
includes/admin/views/html-bulk-edit-product.php
Normal file
315
includes/admin/views/html-bulk-edit-product.php
Normal file
@ -0,0 +1,315 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Bulk Edit Products
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<fieldset class="inline-edit-col-right">
|
||||
<div id="woocommerce-fields-bulk" class="inline-edit-col">
|
||||
|
||||
<h4><?php _e( 'Product data', 'woocommerce' ); ?></h4>
|
||||
|
||||
<?php do_action( 'woocommerce_product_bulk_edit_start' ); ?>
|
||||
|
||||
<div class="inline-edit-group">
|
||||
<label class="alignleft">
|
||||
<span class="title"><?php _e( 'Price', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="change_regular_price change_to" name="change_regular_price">
|
||||
<?php
|
||||
$options = array(
|
||||
'' => __( '— No change —', 'woocommerce' ),
|
||||
'1' => __( 'Change to:', 'woocommerce' ),
|
||||
'2' => __( 'Increase existing price by (fixed amount or %):', 'woocommerce' ),
|
||||
'3' => __( 'Decrease existing price by (fixed amount or %):', 'woocommerce' ),
|
||||
);
|
||||
foreach ( $options as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
</label>
|
||||
<label class="change-input">
|
||||
<input type="text" name="_regular_price" class="text regular_price" placeholder="<?php printf( esc_attr__( 'Enter price (%s)', 'woocommerce' ), get_woocommerce_currency_symbol() ); ?>" value="" />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="inline-edit-group">
|
||||
<label class="alignleft">
|
||||
<span class="title"><?php _e( 'Sale', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="change_sale_price change_to" name="change_sale_price">
|
||||
<?php
|
||||
$options = array(
|
||||
'' => __( '— No change —', 'woocommerce' ),
|
||||
'1' => __( 'Change to:', 'woocommerce' ),
|
||||
'2' => __( 'Increase existing sale price by (fixed amount or %):', 'woocommerce' ),
|
||||
'3' => __( 'Decrease existing sale price by (fixed amount or %):', 'woocommerce' ),
|
||||
'4' => __( 'Set to regular price decreased by (fixed amount or %):', 'woocommerce' ),
|
||||
);
|
||||
foreach ( $options as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
</label>
|
||||
<label class="change-input">
|
||||
<input type="text" name="_sale_price" class="text sale_price" placeholder="<?php printf( esc_attr__( 'Enter sale price (%s)', 'woocommerce' ), get_woocommerce_currency_symbol() ); ?>" value="" />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<?php if ( wc_tax_enabled() ) : ?>
|
||||
<label>
|
||||
<span class="title"><?php _e( 'Tax status', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="tax_status" name="_tax_status">
|
||||
<?php
|
||||
$options = array(
|
||||
'' => __( '— No change —', 'woocommerce' ),
|
||||
'taxable' => __( 'Taxable', 'woocommerce' ),
|
||||
'shipping' => __( 'Shipping only', 'woocommerce' ),
|
||||
'none' => _x( 'None', 'Tax status', 'woocommerce' ),
|
||||
);
|
||||
foreach ( $options as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<span class="title"><?php _e( 'Tax class', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="tax_class" name="_tax_class">
|
||||
<?php
|
||||
$options = array(
|
||||
'' => __( '— No change —', 'woocommerce' ),
|
||||
'standard' => __( 'Standard', 'woocommerce' ),
|
||||
);
|
||||
|
||||
$tax_classes = WC_Tax::get_tax_classes();
|
||||
|
||||
if ( ! empty( $tax_classes ) ) {
|
||||
foreach ( $tax_classes as $class ) {
|
||||
$options[ sanitize_title( $class ) ] = esc_html( $class );
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $options as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( wc_product_weight_enabled() ) : ?>
|
||||
<div class="inline-edit-group">
|
||||
<label class="alignleft">
|
||||
<span class="title"><?php _e( 'Weight', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="change_weight change_to" name="change_weight">
|
||||
<?php
|
||||
$options = array(
|
||||
'' => __( '— No change —', 'woocommerce' ),
|
||||
'1' => __( 'Change to:', 'woocommerce' ),
|
||||
);
|
||||
foreach ( $options as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
</label>
|
||||
<label class="change-input">
|
||||
<input type="text" name="_weight" class="text weight" placeholder="<?php printf( esc_attr__( '%1$s (%2$s)', 'woocommerce' ), wc_format_localized_decimal( 0 ), get_option( 'woocommerce_weight_unit' ) ); ?>" value="">
|
||||
</label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( wc_product_dimensions_enabled() ) : ?>
|
||||
<div class="inline-edit-group dimensions">
|
||||
<label class="alignleft">
|
||||
<span class="title"><?php _e( 'L/W/H', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="change_dimensions change_to" name="change_dimensions">
|
||||
<?php
|
||||
$options = array(
|
||||
'' => __( '— No change —', 'woocommerce' ),
|
||||
'1' => __( 'Change to:', 'woocommerce' ),
|
||||
);
|
||||
foreach ( $options as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
</label>
|
||||
<label class="change-input">
|
||||
<input type="text" name="_length" class="text length" placeholder="<?php printf( esc_attr__( 'Length (%s)', 'woocommerce' ), get_option( 'woocommerce_dimension_unit' ) ); ?>" value="">
|
||||
<input type="text" name="_width" class="text width" placeholder="<?php printf( esc_attr__( 'Width (%s)', 'woocommerce' ), get_option( 'woocommerce_dimension_unit' ) ); ?>" value="">
|
||||
<input type="text" name="_height" class="text height" placeholder="<?php printf( esc_attr__( 'Height (%s)', 'woocommerce' ), get_option( 'woocommerce_dimension_unit' ) ); ?>" value="">
|
||||
</label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<label>
|
||||
<span class="title"><?php _e( 'Shipping class', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="shipping_class" name="_shipping_class">
|
||||
<option value=""><?php _e( '— No change —', 'woocommerce' ); ?></option>
|
||||
<option value="_no_shipping_class"><?php _e( 'No shipping class', 'woocommerce' ); ?></option>
|
||||
<?php
|
||||
foreach ( $shipping_class as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $value->slug ) . '">' . esc_html( $value->name ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<span class="title"><?php _e( 'Visibility', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="visibility" name="_visibility">
|
||||
<?php
|
||||
$options = array(
|
||||
'' => __( '— No change —', 'woocommerce' ),
|
||||
'visible' => __( 'Catalog & search', 'woocommerce' ),
|
||||
'catalog' => __( 'Catalog', 'woocommerce' ),
|
||||
'search' => __( 'Search', 'woocommerce' ),
|
||||
'hidden' => __( 'Hidden', 'woocommerce' ),
|
||||
);
|
||||
foreach ( $options as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
</label>
|
||||
<label>
|
||||
<span class="title"><?php _e( 'Featured', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="featured" name="_featured">
|
||||
<?php
|
||||
$options = array(
|
||||
'' => __( '— No change —', 'woocommerce' ),
|
||||
'yes' => __( 'Yes', 'woocommerce' ),
|
||||
'no' => __( 'No', 'woocommerce' ),
|
||||
);
|
||||
foreach ( $options as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<span class="title"><?php _e( 'In stock?', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="stock_status" name="_stock_status">
|
||||
<?php
|
||||
echo '<option value="">' . esc_html__( '— No Change —', 'woocommerce' ) . '</option>';
|
||||
|
||||
foreach ( wc_get_product_stock_status_options() as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
</label>
|
||||
<?php if ( 'yes' == get_option( 'woocommerce_manage_stock' ) ) : ?>
|
||||
|
||||
<label>
|
||||
<span class="title"><?php _e( 'Manage stock?', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="manage_stock" name="_manage_stock">
|
||||
<?php
|
||||
$options = array(
|
||||
'' => __( '— No change —', 'woocommerce' ),
|
||||
'yes' => __( 'Yes', 'woocommerce' ),
|
||||
'no' => __( 'No', 'woocommerce' ),
|
||||
);
|
||||
foreach ( $options as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<div class="inline-edit-group">
|
||||
<label class="alignleft stock_qty_field">
|
||||
<span class="title"><?php _e( 'Stock qty', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="change_stock change_to" name="change_stock">
|
||||
<?php
|
||||
$options = array(
|
||||
'' => __( '— No change —', 'woocommerce' ),
|
||||
'1' => __( 'Change to:', 'woocommerce' ),
|
||||
'2' => __( 'Increase existing stock by:', 'woocommerce' ),
|
||||
'3' => __( 'Decrease existing stock by:', 'woocommerce' ),
|
||||
);
|
||||
foreach ( $options as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
</label>
|
||||
<label class="change-input">
|
||||
<input type="text" name="_stock" class="text stock" placeholder="<?php esc_attr_e( 'Stock qty', 'woocommerce' ); ?>" step="any" value="">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<label>
|
||||
<span class="title"><?php _e( 'Backorders?', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="backorders" name="_backorders">
|
||||
<?php
|
||||
echo '<option value="">' . esc_html__( '— No Change —', 'woocommerce' ) . '</option>';
|
||||
|
||||
foreach ( wc_get_product_backorder_options() as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<label>
|
||||
<span class="title"><?php esc_html_e( 'Sold individually?', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="sold_individually" name="_sold_individually">
|
||||
<?php
|
||||
$options = array(
|
||||
'' => __( '— No change —', 'woocommerce' ),
|
||||
'yes' => __( 'Yes', 'woocommerce' ),
|
||||
'no' => __( 'No', 'woocommerce' ),
|
||||
);
|
||||
foreach ( $options as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<?php do_action( 'woocommerce_product_bulk_edit_end' ); ?>
|
||||
|
||||
<input type="hidden" name="woocommerce_bulk_edit" value="1" />
|
||||
<input type="hidden" name="woocommerce_quick_edit_nonce" value="<?php echo wp_create_nonce( 'woocommerce_quick_edit_nonce' ); ?>" />
|
||||
</div>
|
||||
</fieldset>
|
20
includes/admin/views/html-email-template-preview.php
Normal file
20
includes/admin/views/html-email-template-preview.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Email Template Preview
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed aliquet diam a facilisis eleifend. Cras ac justo felis. Mauris faucibus, orci eu blandit fermentum, lorem nibh sollicitudin mi, sit amet interdum metus urna ut lacus.</p>
|
||||
|
||||
<p><a class="link" href="#">Sed sit amet sapien odio</a></p>
|
||||
|
||||
<p>Phasellus quis varius augue. Fusce eu euismod leo, a accumsan tellus. Quisque vitae dolor eu justo cursus egestas. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sit amet sapien odio. Sed pellentesque arcu mi, quis malesuada lectus lacinia et. Cras a tempor leo.</p>
|
||||
|
||||
<h2>Lorem ipsum dolor</h2>
|
||||
|
||||
<p>Fusce eu euismod leo, a accumsan tellus. Quisque vitae dolor eu justo cursus egestas. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sit amet sapien odio. Sed pellentesque arcu mi, quis malesuada lectus lacinia et. Cras a tempor leo.</p>
|
43
includes/admin/views/html-notice-base-table-missing.php
Normal file
43
includes/admin/views/html-notice-base-table-missing.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Notice - Base table missing.
|
||||
*
|
||||
* @package WooCommerce\Admin
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
?>
|
||||
<div class="updated woocommerce-message">
|
||||
<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'base_tables_missing' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>">
|
||||
<?php esc_html_e( 'Dismiss', 'woocommerce' ); ?>
|
||||
</a>
|
||||
|
||||
<p>
|
||||
<strong><?php esc_html_e( 'Database tables missing', 'woocommerce' ); ?></strong>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
$verify_db_tool_available = array_key_exists( 'verify_db_tables', WC_Admin_Status::get_tools() );
|
||||
$missing_tables = get_option( 'woocommerce_schema_missing_tables' );
|
||||
if ( $verify_db_tool_available ) {
|
||||
echo wp_kses_post(
|
||||
sprintf(
|
||||
/* translators: %1%s: Missing tables (seperated by ",") %2$s: Link to check again */
|
||||
__( 'One or more tables required for WooCommerce to function are missing, some features may not work as expected. Missing tables: %1$s. <a href="%2$s">Check again.</a>', 'woocommerce' ),
|
||||
esc_html( implode( ', ', $missing_tables ) ),
|
||||
wp_nonce_url( admin_url( 'admin.php?page=wc-status&tab=tools&action=verify_db_tables' ), 'debug_action' )
|
||||
)
|
||||
);
|
||||
} else {
|
||||
echo wp_kses_post(
|
||||
sprintf(
|
||||
/* translators: %1%s: Missing tables (seperated by ",") */
|
||||
__( 'One or more tables required for WooCommerce to function are missing, some features may not work as expected. Missing tables: %1$s.', 'woocommerce' ),
|
||||
esc_html( implode( ', ', $missing_tables ) )
|
||||
)
|
||||
);
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</div>
|
14
includes/admin/views/html-notice-custom.php
Normal file
14
includes/admin/views/html-notice-custom.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Custom Notices
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<div id="message" class="updated woocommerce-message">
|
||||
<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', $notice ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php _e( 'Dismiss', 'woocommerce' ); ?></a>
|
||||
<?php echo wp_kses_post( wpautop( $notice_html ) ); ?>
|
||||
</div>
|
16
includes/admin/views/html-notice-install.php
Normal file
16
includes/admin/views/html-notice-install.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Notice - Install
|
||||
*
|
||||
* @deprecated 4.6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<div id="message" class="updated woocommerce-message wc-connect">
|
||||
<p><?php _e( '<strong>Welcome to WooCommerce</strong> – You‘re almost ready to start selling :)', 'woocommerce' ); ?></p>
|
||||
<p class="submit"><a href="<?php echo esc_url( admin_url( 'admin.php?page=wc-setup' ) ); ?>" class="button-primary"><?php _e( 'Run the Setup Wizard', 'woocommerce' ); ?></a> <a class="button-secondary skip" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'install' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php _e( 'Skip setup', 'woocommerce' ); ?></a></p>
|
||||
</div>
|
34
includes/admin/views/html-notice-legacy-shipping.php
Normal file
34
includes/admin/views/html-notice-legacy-shipping.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Notice - Legacy Shipping.
|
||||
*
|
||||
* @package WooCommerce\Admin\Notices
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<div id="message" class="updated woocommerce-message">
|
||||
<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'legacy_shipping' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>">
|
||||
<?php esc_html_e( 'Dismiss', 'woocommerce' ); ?>
|
||||
</a>
|
||||
|
||||
<p class="main">
|
||||
<strong><?php esc_html_e( 'New:', 'woocommerce' ); ?> <?php esc_html_e( 'Shipping zones', 'woocommerce' ); ?></strong> – <?php esc_html_e( 'a group of regions that can be assigned different shipping methods and rates.', 'woocommerce' ); ?>
|
||||
</p>
|
||||
<p>
|
||||
<?php esc_html_e( 'Legacy shipping methods (flat rate, international flat rate, local pickup and delivery, and free shipping) are deprecated but will continue to work as normal for now. <b><em>They will be removed in future versions of WooCommerce</em></b>. We recommend disabling these and setting up new rates within shipping zones as soon as possible.', 'woocommerce' ); ?>
|
||||
</p>
|
||||
|
||||
<p class="submit">
|
||||
<?php if ( empty( $_GET['page'] ) || empty( $_GET['tab'] ) || 'wc-settings' !== $_GET['page'] || 'shipping' !== $_GET['tab'] ) : ?>
|
||||
<a class="button-primary" href="<?php echo esc_url( admin_url( 'admin.php?page=wc-settings&tab=shipping' ) ); ?>">
|
||||
<?php esc_html_e( 'Setup shipping zones', 'woocommerce' ); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<a class="button-secondary" href="https://docs.woocommerce.com/document/setting-up-shipping-zones/">
|
||||
<?php esc_html_e( 'Learn more about shipping zones', 'woocommerce' ); ?>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
31
includes/admin/views/html-notice-maxmind-license-key.php
Normal file
31
includes/admin/views/html-notice-maxmind-license-key.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Notice - Missing MaxMind license key
|
||||
*
|
||||
* @package WooCommerce\Admin
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
?>
|
||||
|
||||
<div id="message" class="updated woocommerce-message">
|
||||
<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'maxmind_license_key' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php esc_html_e( 'Dismiss', 'woocommerce' ); ?></a>
|
||||
|
||||
<p>
|
||||
<strong><?php esc_html_e( 'Geolocation has not been configured.', 'woocommerce' ); ?></strong>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses_post(
|
||||
sprintf(
|
||||
/* translators: %1%s: integration page %2$s: general settings page */
|
||||
__( 'You must enter a valid license key on the <a href="%1$s">MaxMind integration settings page</a> in order to use the geolocation service. If you do not need geolocation for shipping or taxes, you should change the default customer location on the <a href="%2$s">general settings page</a>.', 'woocommerce' ),
|
||||
admin_url( 'admin.php?page=wc-settings&tab=integration§ion=maxmind_geolocation' ),
|
||||
admin_url( 'admin.php?page=wc-settings&tab=general' )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
37
includes/admin/views/html-notice-no-shipping-methods.php
Normal file
37
includes/admin/views/html-notice-no-shipping-methods.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Notice - No Shipping methods.
|
||||
*
|
||||
* @package WooCommerce\Admin\Notices
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<div id="message" class="updated woocommerce-message">
|
||||
<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'no_shipping_methods' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>">
|
||||
<?php esc_html_e( 'Dismiss', 'woocommerce' ); ?>
|
||||
</a>
|
||||
|
||||
<p class="main">
|
||||
<strong>
|
||||
<?php esc_html_e( 'Add shipping methods & zones', 'woocommerce' ); ?>
|
||||
</strong>
|
||||
</p>
|
||||
<p>
|
||||
<?php esc_html_e( 'Shipping is currently enabled, but you have not added any shipping methods to your shipping zones.', 'woocommerce' ); ?>
|
||||
</p>
|
||||
<p>
|
||||
<?php esc_html_e( 'Customers will not be able to purchase physical goods from your store until a shipping method is available.', 'woocommerce' ); ?>
|
||||
</p>
|
||||
|
||||
<p class="submit">
|
||||
<a class="button-primary" href="<?php echo esc_url( admin_url( 'admin.php?page=wc-settings&tab=shipping' ) ); ?>">
|
||||
<?php esc_html_e( 'Setup shipping zones', 'woocommerce' ); ?>
|
||||
</a>
|
||||
<a class="button-secondary" href="https://docs.woocommerce.com/document/setting-up-shipping-zones/">
|
||||
<?php esc_html_e( 'Learn more about shipping zones', 'woocommerce' ); ?>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
31
includes/admin/views/html-notice-redirect-only-download.php
Normal file
31
includes/admin/views/html-notice-redirect-only-download.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Notice - Redirect only download method is selected.
|
||||
*
|
||||
* @package WooCommerce\Admin\Notices
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
?>
|
||||
<div class="updated woocommerce-message">
|
||||
<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'redirect_download_method' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php esc_html_e( 'Dismiss', 'woocommerce' ); ?></a>
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses_post(
|
||||
sprintf(
|
||||
/* translators: %s: Link to settings page. */
|
||||
__( 'Your store is configured to serve digital products using "Redirect only" method. This method is deprecated, <a href="%s">please switch to a different method instead.</a><br><em>If you use a remote server for downloadable files (such as Google Drive, Dropbox, Amazon S3), you may optionally wish to "allow using redirects as a last resort". Enabling that and/or selecting any of the other options will make this notice go away.</em>', 'woocommerce' ),
|
||||
add_query_arg(
|
||||
array(
|
||||
'page' => 'wc-settings',
|
||||
'tab' => 'products',
|
||||
'section' => 'downloadable',
|
||||
),
|
||||
admin_url( 'admin.php' )
|
||||
)
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Notice - Regenerating product lookup table.
|
||||
*
|
||||
* @package WooCommerce\Admin
|
||||
*/
|
||||
|
||||
use Automattic\Jetpack\Constants;
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
$pending_actions_url = admin_url( 'admin.php?page=wc-status&tab=action-scheduler&s=wc_update_product_lookup_tables&status=pending' );
|
||||
$cron_disabled = Constants::is_true( 'DISABLE_WP_CRON' );
|
||||
$cron_cta = $cron_disabled ? __( 'You can manually run queued updates here.', 'woocommerce' ) : __( 'View progress →', 'woocommerce' );
|
||||
?>
|
||||
<div id="message" class="updated woocommerce-message">
|
||||
<p>
|
||||
<strong><?php esc_html_e( 'WooCommerce is updating product data in the background', 'woocommerce' ); ?></strong><br>
|
||||
<?php
|
||||
esc_html_e( 'Product display, sorting, and reports may not be accurate until this finishes. It will take a few minutes and this notice will disappear when complete.', 'woocommerce' );
|
||||
|
||||
if ( $cron_disabled ) {
|
||||
echo '<br>' . esc_html__( 'Note: WP CRON has been disabled on your install which may prevent this update from completing.', 'woocommerce' );
|
||||
}
|
||||
?>
|
||||
<a href="<?php echo esc_url( $pending_actions_url ); ?>"><?php echo esc_html( $cron_cta ); ?></a>
|
||||
</p>
|
||||
</div>
|
13
includes/admin/views/html-notice-regenerating-thumbnails.php
Normal file
13
includes/admin/views/html-notice-regenerating-thumbnails.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Notice - Regenerating thumbnails.
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
?>
|
||||
<div id="message" class="updated woocommerce-message">
|
||||
<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'regenerating_thumbnails' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php _e( 'Cancel thumbnail regeneration', 'woocommerce' ); ?></a>
|
||||
|
||||
<p><?php esc_html_e( 'Thumbnail regeneration is running in the background. Depending on the amount of images in your store this may take a while.', 'woocommerce' ); ?></p>
|
||||
</div>
|
23
includes/admin/views/html-notice-secure-connection.php
Normal file
23
includes/admin/views/html-notice-secure-connection.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Notice - Secure connection.
|
||||
*
|
||||
* @package WooCommerce\Admin\Notices
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
?>
|
||||
<div id="message" class="updated woocommerce-message">
|
||||
<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'no_secure_connection' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php esc_html_e( 'Dismiss', 'woocommerce' ); ?></a>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses_post( sprintf(
|
||||
/* translators: %s: documentation URL */
|
||||
__( 'Your store does not appear to be using a secure connection. We highly recommend serving your entire website over an HTTPS connection to help keep customer data secure. <a href="%s">Learn more here.</a>', 'woocommerce' ),
|
||||
'https://docs.woocommerce.com/document/ssl-and-https/'
|
||||
) );
|
||||
?>
|
||||
</p>
|
||||
</div>
|
29
includes/admin/views/html-notice-template-check.php
Normal file
29
includes/admin/views/html-notice-template-check.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Notice - Template Check
|
||||
*
|
||||
* @package WooCommerce\Views
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$theme = wp_get_theme();
|
||||
?>
|
||||
<div id="message" class="updated woocommerce-message">
|
||||
<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'template_files' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php esc_html_e( 'Dismiss', 'woocommerce' ); ?></a>
|
||||
|
||||
<p>
|
||||
<?php /* translators: %s: theme name */ ?>
|
||||
<?php printf( __( '<strong>Your theme (%s) contains outdated copies of some WooCommerce template files.</strong> These files may need updating to ensure they are compatible with the current version of WooCommerce. Suggestions to fix this:', 'woocommerce' ), esc_html( $theme['Name'] ) ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>
|
||||
<ol>
|
||||
<li><?php esc_html_e( 'Update your theme to the latest version. If no update is available contact your theme author asking about compatibility with the current WooCommerce version.', 'woocommerce' ); ?></li>
|
||||
<li><?php esc_html_e( 'If you copied over a template file to change something, then you will need to copy the new version of the template and apply your changes again.', 'woocommerce' ); ?></li>
|
||||
</ol>
|
||||
</p>
|
||||
<p class="submit">
|
||||
<a class="button-primary" href="https://docs.woocommerce.com/document/template-structure/" target="_blank"><?php esc_html_e( 'Learn more about templates', 'woocommerce' ); ?></a>
|
||||
<a class="button-primary" href="<?php echo esc_url( admin_url( 'admin.php?page=wc-status' ) ); ?>" target="_blank"><?php esc_html_e( 'View affected templates', 'woocommerce' ); ?></a>
|
||||
</p>
|
||||
</div>
|
39
includes/admin/views/html-notice-update.php
Normal file
39
includes/admin/views/html-notice-update.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Notice - Update
|
||||
*
|
||||
* @package WooCommerce\Admin
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$update_url = wp_nonce_url(
|
||||
add_query_arg( 'do_update_woocommerce', 'true', admin_url( 'admin.php?page=wc-settings' ) ),
|
||||
'wc_db_update',
|
||||
'wc_db_update_nonce'
|
||||
);
|
||||
|
||||
?>
|
||||
<div id="message" class="updated woocommerce-message wc-connect">
|
||||
<p>
|
||||
<strong><?php esc_html_e( 'WooCommerce database update required', 'woocommerce' ); ?></strong>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
esc_html_e( 'WooCommerce has been updated! To keep things running smoothly, we have to update your database to the newest version.', 'woocommerce' );
|
||||
|
||||
/* translators: 1: Link to docs 2: Close link. */
|
||||
printf( ' ' . esc_html__( 'The database update process runs in the background and may take a little while, so please be patient. Advanced users can alternatively update via %1$sWP CLI%2$s.', 'woocommerce' ), '<a href="https://github.com/woocommerce/woocommerce/wiki/Upgrading-the-database-using-WP-CLI">', '</a>' );
|
||||
?>
|
||||
</p>
|
||||
<p class="submit">
|
||||
<a href="<?php echo esc_url( $update_url ); ?>" class="wc-update-now button-primary">
|
||||
<?php esc_html_e( 'Update WooCommerce Database', 'woocommerce' ); ?>
|
||||
</a>
|
||||
<a href="https://docs.woocommerce.com/document/how-to-update-woocommerce/" class="button-secondary">
|
||||
<?php esc_html_e( 'Learn more about updates', 'woocommerce' ); ?>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
17
includes/admin/views/html-notice-updated.php
Normal file
17
includes/admin/views/html-notice-updated.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Notice - Updated.
|
||||
*
|
||||
* @package WooCommerce\Admin
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<div id="message" class="updated woocommerce-message wc-connect woocommerce-message--success">
|
||||
<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'update', remove_query_arg( 'do_update_woocommerce' ) ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php esc_html_e( 'Dismiss', 'woocommerce' ); ?></a>
|
||||
|
||||
<p><?php esc_html_e( 'WooCommerce database update complete. Thank you for updating to the latest version!', 'woocommerce' ); ?></p>
|
||||
</div>
|
29
includes/admin/views/html-notice-updating.php
Normal file
29
includes/admin/views/html-notice-updating.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Notice - Updating
|
||||
*
|
||||
* @package WooCommerce\Admin
|
||||
*/
|
||||
|
||||
use Automattic\Jetpack\Constants;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$pending_actions_url = admin_url( 'admin.php?page=wc-status&tab=action-scheduler&s=woocommerce_run_update&status=pending' );
|
||||
$cron_disabled = Constants::is_true( 'DISABLE_WP_CRON' );
|
||||
$cron_cta = $cron_disabled ? __( 'You can manually run queued updates here.', 'woocommerce' ) : __( 'View progress →', 'woocommerce' );
|
||||
?>
|
||||
<div id="message" class="updated woocommerce-message wc-connect">
|
||||
<p>
|
||||
<strong><?php esc_html_e( 'WooCommerce database update', 'woocommerce' ); ?></strong><br>
|
||||
<?php esc_html_e( 'WooCommerce is updating the database in the background. The database update process may take a little while, so please be patient.', 'woocommerce' ); ?>
|
||||
<?php
|
||||
if ( $cron_disabled ) {
|
||||
echo '<br>' . esc_html__( 'Note: WP CRON has been disabled on your install which may prevent this update from completing.', 'woocommerce' );
|
||||
}
|
||||
?>
|
||||
<a href="<?php echo esc_url( $pending_actions_url ); ?>"><?php echo esc_html( $cron_cta ); ?></a>
|
||||
</p>
|
||||
</div>
|
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Notice - Uploads directory is unprotected.
|
||||
*
|
||||
* @package WooCommerce\Admin\Notices
|
||||
* @since 4.2.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
$uploads = wp_get_upload_dir();
|
||||
|
||||
?>
|
||||
<div id="message" class="error woocommerce-message">
|
||||
<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'uploads_directory_is_public' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php esc_html_e( 'Dismiss', 'woocommerce' ); ?></a>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses_post(
|
||||
sprintf(
|
||||
/* translators: 1: uploads directory URL 2: documentation URL */
|
||||
__( 'Your store\'s uploads directory is <a href="%1$s">browsable via the web</a>. We strongly recommend <a href="%2$s">configuring your web server to prevent directory indexing</a>.', 'woocommerce' ),
|
||||
esc_url( $uploads['baseurl'] . '/woocommerce_uploads' ),
|
||||
'https://docs.woocommerce.com/document/digital-downloadable-product-handling/#protecting-your-uploads-directory'
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Notice - PHP & WP minimum requirements.
|
||||
*
|
||||
* @package WooCommerce\Admin\Notices
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
?>
|
||||
<div id="message" class="updated woocommerce-message">
|
||||
<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', WC_PHP_MIN_REQUIREMENTS_NOTICE ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php esc_html_e( 'Dismiss', 'woocommerce' ); ?></a>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses_post(
|
||||
sprintf(
|
||||
$msg . '<p><a href="%s" class="button button-primary">' . __( 'Learn how to upgrade', 'woocommerce' ) . '</a></p>',
|
||||
add_query_arg(
|
||||
array(
|
||||
'utm_source' => 'wpphpupdatebanner',
|
||||
'utm_medium' => 'product',
|
||||
'utm_campaign' => 'woocommerceplugin',
|
||||
'utm_content' => 'docs',
|
||||
),
|
||||
'https://docs.woocommerce.com/document/update-php-wordpress/'
|
||||
)
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
219
includes/admin/views/html-quick-edit-product.php
Normal file
219
includes/admin/views/html-quick-edit-product.php
Normal file
@ -0,0 +1,219 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Quick Edit Product
|
||||
*
|
||||
* @package WooCommerce\Admin\Notices
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
?>
|
||||
|
||||
<fieldset class="inline-edit-col-left">
|
||||
<div id="woocommerce-fields" class="inline-edit-col">
|
||||
|
||||
<h4><?php esc_html_e( 'Product data', 'woocommerce' ); ?></h4>
|
||||
|
||||
<?php do_action( 'woocommerce_product_quick_edit_start' ); ?>
|
||||
|
||||
<?php if ( wc_product_sku_enabled() ) : ?>
|
||||
|
||||
<label>
|
||||
<span class="title"><?php esc_html_e( 'SKU', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<input type="text" name="_sku" class="text sku" value="">
|
||||
</span>
|
||||
</label>
|
||||
<br class="clear" />
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="price_fields">
|
||||
<label>
|
||||
<span class="title"><?php esc_html_e( 'Price', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<input type="text" name="_regular_price" class="text wc_input_price regular_price" placeholder="<?php esc_attr_e( 'Regular price', 'woocommerce' ); ?>" value="">
|
||||
</span>
|
||||
</label>
|
||||
<br class="clear" />
|
||||
<label>
|
||||
<span class="title"><?php esc_html_e( 'Sale', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<input type="text" name="_sale_price" class="text wc_input_price sale_price" placeholder="<?php esc_attr_e( 'Sale price', 'woocommerce' ); ?>" value="">
|
||||
</span>
|
||||
</label>
|
||||
<br class="clear" />
|
||||
</div>
|
||||
|
||||
<?php if ( wc_tax_enabled() ) : ?>
|
||||
<label class="alignleft">
|
||||
<span class="title"><?php esc_html_e( 'Tax status', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="tax_status" name="_tax_status">
|
||||
<?php
|
||||
$options = array(
|
||||
'taxable' => __( 'Taxable', 'woocommerce' ),
|
||||
'shipping' => __( 'Shipping only', 'woocommerce' ),
|
||||
'none' => _x( 'None', 'Tax status', 'woocommerce' ),
|
||||
);
|
||||
foreach ( $options as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
</label>
|
||||
<br class="clear" />
|
||||
<label class="alignleft">
|
||||
<span class="title"><?php esc_html_e( 'Tax class', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="tax_class" name="_tax_class">
|
||||
<?php
|
||||
$options = array(
|
||||
'' => __( 'Standard', 'woocommerce' ),
|
||||
);
|
||||
|
||||
$tax_classes = WC_Tax::get_tax_classes();
|
||||
|
||||
if ( ! empty( $tax_classes ) ) {
|
||||
foreach ( $tax_classes as $class ) {
|
||||
$options[ sanitize_title( $class ) ] = esc_html( $class );
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $options as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
</label>
|
||||
<br class="clear" />
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( wc_product_weight_enabled() || wc_product_dimensions_enabled() ) : ?>
|
||||
<div class="dimension_fields">
|
||||
|
||||
<?php if ( wc_product_weight_enabled() ) : ?>
|
||||
<label>
|
||||
<span class="title"><?php esc_html_e( 'Weight', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<input type="text" name="_weight" class="text weight" placeholder="<?php echo esc_attr( wc_format_localized_decimal( 0 ) ); ?>" value="">
|
||||
</span>
|
||||
</label>
|
||||
<br class="clear" />
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( wc_product_dimensions_enabled() ) : ?>
|
||||
<div class="inline-edit-group dimensions">
|
||||
<div>
|
||||
<span class="title"><?php esc_html_e( 'L/W/H', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<input type="text" name="_length" class="text wc_input_decimal length" placeholder="<?php esc_attr_e( 'Length', 'woocommerce' ); ?>" value="">
|
||||
<input type="text" name="_width" class="text wc_input_decimal width" placeholder="<?php esc_attr_e( 'Width', 'woocommerce' ); ?>" value="">
|
||||
<input type="text" name="_height" class="text wc_input_decimal height" placeholder="<?php esc_attr_e( 'Height', 'woocommerce' ); ?>" value="">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="inline-edit-group">
|
||||
<span class="title"><?php esc_html_e( 'Shipping class', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="shipping_class" name="_shipping_class">
|
||||
<option value="_no_shipping_class"><?php esc_html_e( 'No shipping class', 'woocommerce' ); ?></option>
|
||||
<?php
|
||||
foreach ( $shipping_class as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $value->slug ) . '">' . esc_html( $value->name ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="inline-edit-group">
|
||||
<label class="alignleft">
|
||||
<span class="title"><?php esc_html_e( 'Visibility', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="visibility" name="_visibility">
|
||||
<?php
|
||||
$options = apply_filters(
|
||||
'woocommerce_product_visibility_options',
|
||||
array(
|
||||
'visible' => __( 'Catalog & search', 'woocommerce' ),
|
||||
'catalog' => __( 'Catalog', 'woocommerce' ),
|
||||
'search' => __( 'Search', 'woocommerce' ),
|
||||
'hidden' => __( 'Hidden', 'woocommerce' ),
|
||||
)
|
||||
);
|
||||
foreach ( $options as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
</label>
|
||||
<label class="alignleft featured">
|
||||
<input type="checkbox" name="_featured" value="1">
|
||||
<span class="checkbox-title"><?php esc_html_e( 'Featured', 'woocommerce' ); ?></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<?php if ( get_option( 'woocommerce_manage_stock' ) === 'yes' ) : ?>
|
||||
<div class="inline-edit-group manage_stock_field">
|
||||
<label class="manage_stock">
|
||||
<input type="checkbox" name="_manage_stock" value="1">
|
||||
<span class="checkbox-title"><?php esc_html_e( 'Manage stock?', 'woocommerce' ); ?></span>
|
||||
</label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<label class="stock_status_field">
|
||||
<span class="title"><?php esc_html_e( 'In stock?', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="stock_status" name="_stock_status">
|
||||
<?php
|
||||
echo '<option value="" id="stock_status_no_change">' . esc_html__( '— No Change —', 'woocommerce' ) . '</option>';
|
||||
foreach ( wc_get_product_stock_status_options() as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<div class="wc-quick-edit-warning" style="display:none">
|
||||
<?php echo esc_html__( 'This will change the stock status of all variations.', 'woocommerce' ); ?></p>
|
||||
</div>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<div class="stock_fields">
|
||||
<?php if ( get_option( 'woocommerce_manage_stock' ) === 'yes' ) : ?>
|
||||
<label class="stock_qty_field">
|
||||
<span class="title"><?php esc_html_e( 'Stock qty', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<input type="number" name="_stock" class="text stock" step="any" value="">
|
||||
</span>
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<label class="alignleft backorder_field">
|
||||
<span class="title"><?php esc_html_e( 'Backorders?', 'woocommerce' ); ?></span>
|
||||
<span class="input-text-wrap">
|
||||
<select class="backorders" name="_backorders">
|
||||
<?php
|
||||
foreach ( wc_get_product_backorder_options() as $key => $value ) {
|
||||
echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<?php do_action( 'woocommerce_product_quick_edit_end' ); ?>
|
||||
|
||||
<input type="hidden" name="woocommerce_quick_edit" value="1" />
|
||||
<input type="hidden" name="woocommerce_quick_edit_nonce" value="<?php echo esc_attr( wp_create_nonce( 'woocommerce_quick_edit_nonce' ) ); ?>" />
|
||||
</div>
|
||||
</fieldset>
|
100
includes/admin/views/html-report-by-date.php
Normal file
100
includes/admin/views/html-report-by-date.php
Normal file
@ -0,0 +1,100 @@
|
||||
<?php
|
||||
/**
|
||||
* Admin View: Report by Date (with date filters)
|
||||
*
|
||||
* @package WooCommerce\Admin\Reporting
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
?>
|
||||
<div id="poststuff" class="woocommerce-reports-wide">
|
||||
<div class="postbox">
|
||||
|
||||
<?php if ( 'custom' === $current_range && isset( $_GET['start_date'], $_GET['end_date'] ) ) : ?>
|
||||
<h3 class="screen-reader-text">
|
||||
<?php
|
||||
/* translators: 1: start date 2: end date */
|
||||
printf(
|
||||
esc_html__( 'From %1$s to %2$s', 'woocommerce' ),
|
||||
esc_html( wc_clean( wp_unslash( $_GET['start_date'] ) ) ),
|
||||
esc_html( wc_clean( wp_unslash( $_GET['end_date'] ) ) )
|
||||
);
|
||||
?>
|
||||
</h3>
|
||||
<?php else : ?>
|
||||
<h3 class="screen-reader-text"><?php echo esc_html( $ranges[ $current_range ] ); ?></h3>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="stats_range">
|
||||
<?php $this->get_export_button(); ?>
|
||||
<ul>
|
||||
<?php
|
||||
foreach ( $ranges as $range => $name ) {
|
||||
echo '<li class="' . ( $current_range == $range ? 'active' : '' ) . '"><a href="' . esc_url( remove_query_arg( array( 'start_date', 'end_date' ), add_query_arg( 'range', $range ) ) ) . '">' . esc_html( $name ) . '</a></li>';
|
||||
}
|
||||
?>
|
||||
<li class="custom <?php echo ( 'custom' === $current_range ) ? 'active' : ''; ?>">
|
||||
<?php esc_html_e( 'Custom:', 'woocommerce' ); ?>
|
||||
<form method="GET">
|
||||
<div>
|
||||
<?php
|
||||
// Maintain query string.
|
||||
foreach ( $_GET as $key => $value ) {
|
||||
if ( is_array( $value ) ) {
|
||||
foreach ( $value as $v ) {
|
||||
echo '<input type="hidden" name="' . esc_attr( sanitize_text_field( $key ) ) . '[]" value="' . esc_attr( sanitize_text_field( $v ) ) . '" />';
|
||||
}
|
||||
} else {
|
||||
echo '<input type="hidden" name="' . esc_attr( sanitize_text_field( $key ) ) . '" value="' . esc_attr( sanitize_text_field( $value ) ) . '" />';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<input type="hidden" name="range" value="custom" />
|
||||
<input type="text" size="11" placeholder="yyyy-mm-dd" value="<?php echo ( ! empty( $_GET['start_date'] ) ) ? esc_attr( wp_unslash( $_GET['start_date'] ) ) : ''; ?>" name="start_date" class="range_datepicker from" autocomplete="off" /><?php //@codingStandardsIgnoreLine ?>
|
||||
<span>–</span>
|
||||
<input type="text" size="11" placeholder="yyyy-mm-dd" value="<?php echo ( ! empty( $_GET['end_date'] ) ) ? esc_attr( wp_unslash( $_GET['end_date'] ) ) : ''; ?>" name="end_date" class="range_datepicker to" autocomplete="off" /><?php //@codingStandardsIgnoreLine ?>
|
||||
<button type="submit" class="button" value="<?php esc_attr_e( 'Go', 'woocommerce' ); ?>"><?php esc_html_e( 'Go', 'woocommerce' ); ?></button>
|
||||
<?php wp_nonce_field( 'custom_range', 'wc_reports_nonce', false ); ?>
|
||||
</div>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php if ( empty( $hide_sidebar ) ) : ?>
|
||||
<div class="inside chart-with-sidebar">
|
||||
<div class="chart-sidebar">
|
||||
<?php if ( $legends = $this->get_chart_legend() ) : ?>
|
||||
<ul class="chart-legend">
|
||||
<?php foreach ( $legends as $legend ) : ?>
|
||||
<?php // @codingStandardsIgnoreStart ?>
|
||||
<li style="border-color: <?php echo $legend['color']; ?>" <?php if ( isset( $legend['highlight_series'] ) ) echo 'class="highlight_series ' . ( isset( $legend['placeholder'] ) ? 'tips' : '' ) . '" data-series="' . esc_attr( $legend['highlight_series'] ) . '"'; ?> data-tip="<?php echo isset( $legend['placeholder'] ) ? $legend['placeholder'] : ''; ?>">
|
||||
<?php echo $legend['title']; ?>
|
||||
</li>
|
||||
<?php // @codingStandardsIgnoreEnd ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<ul class="chart-widgets">
|
||||
<?php foreach ( $this->get_chart_widgets() as $widget ) : ?>
|
||||
<li class="chart-widget">
|
||||
<?php if ( $widget['title'] ) : ?>
|
||||
<h4><?php echo esc_html( $widget['title'] ); ?></h4>
|
||||
<?php endif; ?>
|
||||
<?php call_user_func( $widget['callback'] ); ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="main">
|
||||
<?php $this->get_main_chart(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="inside">
|
||||
<?php $this->get_main_chart(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user