This commit is contained in:
Mike Jolley 2017-05-12 20:40:54 +01:00
parent ed32dd558d
commit 523d9d27cd
6 changed files with 32 additions and 14 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -5421,20 +5421,28 @@ table.bar_chart {
padding: 24px;
margin: 16px 0 16px;
box-shadow: 0 1px 3px rgba(0,0,0,.13);
color: #666;
color: #555;
header {
border-bottom: 1px solid #eee;
padding: 0 24px;
margin: 0 -24px 24px;
}
h2 {
margin: 0 0 24px;
color: #666;
color: #555;
font-size: 24px;
font-weight: normal;
line-height: 1em;
}
p {
font-size: 1em;
line-height: 1.75em;
font-size: 16px;
color: #666;
color: #555;
margin: 0 0 24px;
}
.form-row {
@ -5446,7 +5454,7 @@ table.bar_chart {
}
.woocommerce-exporter-options th {
width: 300px;
width: 320px;
}
.woocommerce-exporter-options th, .woocommerce-exporter-options td {
@ -5454,10 +5462,18 @@ table.bar_chart {
label {
font-weight: normal;
color: #666;
color: #555;
}
}
.form-row-submit {
border-top: 1px solid #eee;
padding: 23px 24px 24px;
margin: 24px -24px -24px;
background: #fff;
background: #fefefe;
}
.woocommerce-exporter-button {
font-size: 1.25em;
padding: 0.5em 1em !important;

View File

@ -30,7 +30,7 @@ class WC_Admin_Product_Export {
* Add menu items.
*/
public function admin_menu() {
add_submenu_page( 'edit.php?post_type=product', __( 'Import / Export', 'woocommerce' ), __( 'Import / Export', 'woocommerce' ), 'edit_products', 'woocommerce_importer', array( $this, 'admin_screen' ) );
add_submenu_page( 'edit.php?post_type=product', __( 'Product Export', 'woocommerce' ), __( 'Export', 'woocommerce' ), 'edit_products', 'product_exporter', array( $this, 'admin_screen' ) );
}
/**
@ -101,7 +101,7 @@ class WC_Admin_Product_Export {
wp_send_json_success( array(
'step' => 'done',
'percentage' => 100,
'url' => add_query_arg( array( 'nonce' => wp_create_nonce( 'product-csv' ), 'action' => 'download_product_csv' ), admin_url( 'edit.php?post_type=product&page=woocommerce_importer' ) ),
'url' => add_query_arg( array( 'nonce' => wp_create_nonce( 'product-csv' ), 'action' => 'download_product_csv' ), admin_url( 'edit.php?post_type=product&page=product_exporter' ) ),
) );
} else {
wp_send_json_success( array(

View File

@ -11,12 +11,14 @@ wp_enqueue_script( 'wc-product-export' );
$exporter = new WC_Product_CSV_Exporter();
?>
<div class="wrap woocommerce">
<h1><?php esc_html_e( 'Import / Export Data', 'woocommerce' ); ?></h1>
<h1><?php esc_html_e( 'Export Products', 'woocommerce' ); ?></h1>
<form class="woocommerce-exporter">
<span class="spinner is-active"></span>
<h2><?php esc_html_e( 'Export products', 'woocommerce' ); ?></h2>
<p><?php esc_html_e( 'Generate and download a CSV file containing a list of all products.', 'woocommerce' ); ?></p>
<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>
<table class="form-table woocommerce-exporter-options">
<tbody>

View File

@ -29,7 +29,7 @@ function wc_get_screen_ids() {
$wc_screen_id . '_page_wc-addons',
'toplevel_page_wc-reports',
'product_page_product_attributes',
'product_page_woocommerce_importer',
'product_page_product_exporter',
'edit-product',
'product',
'edit-shop_coupon',