Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmigf committed Mar 21, 2024
1 parent 413a3c1 commit 72390e9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
7 changes: 7 additions & 0 deletions assets/css/settings-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,13 @@ table.wcpdf_documents_settings_list td.title {
margin-bottom: 20px;
}

.wcpdf_advanced_numbers_choose_table .gapped {
background-color: #d63638;
color: white;
padding: 3px 6px;
border-radius: 3px;
}

.wcpdf_document_settings_document_output_formats {
margin-bottom: 30px;
}
Expand Down
8 changes: 1 addition & 7 deletions includes/tables/class-wcpdf-number-store-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function column_default( $item, $column_name ) {
$value = $item->id;
break;
case 'type':
$value = '<span class="gapped">' . __( 'gapped', 'woocommerce-pdf-invoices-packing-slips' ) . '</span>';
$document_types = isset( $item->document_types ) && is_array( $item->document_types ) ? $item->document_types : array();

if ( count( $document_types ) > 1 ) {
Expand Down Expand Up @@ -133,13 +134,6 @@ public function get_columns() {
'order_status' => __( 'Order Status', 'woocommerce-pdf-invoices-packing-slips' ),
);

$table_name = isset( $_GET['table_name'] ) ? sanitize_text_field( $_GET['table_name'] ) : null;
$document_type = WPO_WCPDF()->settings->debug->get_document_type_from_store_table_name( $table_name );

if ( empty( $document_type ) || 'invoice' !== $document_type ) {
unset( $columns['type'] );
}

if ( ! isset( WPO_WCPDF()->settings->debug_settings['calculate_document_numbers'] ) ) {
unset( $columns['calculated_number'] );
}
Expand Down
2 changes: 1 addition & 1 deletion includes/views/advanced-numbers.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<?php else : ?>
<p><?php _e( 'Given the potential impact of querying a large volume of orders on site performance, it\'s essential to fetch data each time you need the most current information. This procedure ensures that the site remains efficient and responsive, even when handling substantial order quantities.', 'woocommerce-pdf-invoices-packing-slips' ); ?></p>
<?php if ( ! empty( $last_fetch ) ) : ?>
<p><strong><?php _e( 'Last fetch:', 'woocommerce-pdf-invoices-packing-slips' ); ?> </strong><?php echo date_i18n( 'Y-m-d H:i:s', $last_fetch ); ?></p>
<p><strong><?php _e( 'Last fetch', 'woocommerce-pdf-invoices-packing-slips' ); ?>: </strong><?php echo date_i18n( 'Y-m-d H:i:s', $last_fetch ); ?></p>
<?php if ( $last_fetch > strtotime( 'today 23:59:59' ) ) : ?>
<div class="notice notice-warning inline"><p><?php _e( 'The displayed data may not be current. To ensure you have the most recent information, you might want to fetch updated data.', 'woocommerce-pdf-invoices-packing-slips' ); ?></p></div>
<?php endif; ?>
Expand Down

0 comments on commit 72390e9

Please sign in to comment.