Prior to 3.0 there was a woocommerce_debug_posting filter that could be used to add rows to the environment section of the system status page. It was removed. This PR adds it back as woocommerce_system_status_environment_rows and aliases/deprecates the old one.
This commit is contained in:
parent
f1df9e8dd9
commit
6b6f48e7dc
|
@ -273,6 +273,27 @@ $pages = $system_status->get_pages();
|
|||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$rows = apply_filters( 'woocommerce_system_status_environment_rows', array() );
|
||||
foreach ( $rows as $row ) {
|
||||
if ( ! empty( $row['success'] ) ) {
|
||||
$css_class = 'yes';
|
||||
$icon = '<span class="dashicons dashicons-yes"></span>';
|
||||
} else {
|
||||
$css_class = 'error';
|
||||
$icon = '<span class="dashicons dashicons-no-alt"></span>';
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td data-export-label="<?php esc_attr_e( $row['name'] ); ?>"><?php esc_html_e( $row['name'] ); ?>:</td>
|
||||
<td class="help"><?php echo isset( $row['help'] ) ? $row['help'] : ''; ?></td>
|
||||
<td>
|
||||
<mark class="<?php esc_attr_e( $css_class ); ?>">
|
||||
<?php echo $icon; ?> <?php echo ! empty( $row['note'] ) ? wp_kses_data( $row['note'] ) : ''; ?>
|
||||
</mark>
|
||||
</td>
|
||||
</tr><?php
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="wc_status_table widefat" cellspacing="0">
|
||||
|
|
|
@ -12,43 +12,45 @@ class WC_Deprecated_Filter_Hooks extends WC_Deprecated_Hooks {
|
|||
|
||||
/**
|
||||
* Array of deprecated hooks we need to handle.
|
||||
* Format of 'new' => 'old'.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $deprecated_hooks = array(
|
||||
'woocommerce_structured_data_order' => 'woocommerce_email_order_schema_markup',
|
||||
'woocommerce_add_to_cart_fragments' => 'add_to_cart_fragments',
|
||||
'woocommerce_add_to_cart_redirect' => 'add_to_cart_redirect',
|
||||
'woocommerce_product_get_width' => 'woocommerce_product_width',
|
||||
'woocommerce_product_get_height' => 'woocommerce_product_height',
|
||||
'woocommerce_product_get_length' => 'woocommerce_product_length',
|
||||
'woocommerce_product_get_weight' => 'woocommerce_product_weight',
|
||||
'woocommerce_product_get_sku' => 'woocommerce_get_sku',
|
||||
'woocommerce_product_get_price' => 'woocommerce_get_price',
|
||||
'woocommerce_product_get_regular_price' => 'woocommerce_get_regular_price',
|
||||
'woocommerce_product_get_sale_price' => 'woocommerce_get_sale_price',
|
||||
'woocommerce_product_get_tax_class' => 'woocommerce_product_tax_class',
|
||||
'woocommerce_product_get_stock_quantity' => 'woocommerce_get_stock_quantity',
|
||||
'woocommerce_product_get_attributes' => 'woocommerce_get_product_attributes',
|
||||
'woocommerce_product_get_gallery_image_ids' => 'woocommerce_product_gallery_attachment_ids',
|
||||
'woocommerce_product_get_review_count' => 'woocommerce_product_review_count',
|
||||
'woocommerce_product_get_downloads' => 'woocommerce_product_files',
|
||||
'woocommerce_order_get_currency' => 'woocommerce_get_currency',
|
||||
'woocommerce_order_get_discount_total' => 'woocommerce_order_amount_discount_total',
|
||||
'woocommerce_order_get_discount_tax' => 'woocommerce_order_amount_discount_tax',
|
||||
'woocommerce_order_get_shipping_total' => 'woocommerce_order_amount_shipping_total',
|
||||
'woocommerce_order_get_shipping_tax' => 'woocommerce_order_amount_shipping_tax',
|
||||
'woocommerce_order_get_cart_tax' => 'woocommerce_order_amount_cart_tax',
|
||||
'woocommerce_order_get_total' => 'woocommerce_order_amount_total',
|
||||
'woocommerce_order_get_total_tax' => 'woocommerce_order_amount_total_tax',
|
||||
'woocommerce_order_get_total_discount' => 'woocommerce_order_amount_total_discount',
|
||||
'woocommerce_order_get_subtotal' => 'woocommerce_order_amount_subtotal',
|
||||
'woocommerce_order_get_tax_totals' => 'woocommerce_order_tax_totals',
|
||||
'woocommerce_get_order_refund_get_amount' => 'woocommerce_refund_amount',
|
||||
'woocommerce_get_order_refund_get_reason' => 'woocommerce_refund_reason',
|
||||
'default_checkout_billing_country' => 'default_checkout_country',
|
||||
'default_checkout_billing_state' => 'default_checkout_state',
|
||||
'default_checkout_billing_postcode' => 'default_checkout_postcode',
|
||||
'woocommerce_structured_data_order' => 'woocommerce_email_order_schema_markup',
|
||||
'woocommerce_add_to_cart_fragments' => 'add_to_cart_fragments',
|
||||
'woocommerce_add_to_cart_redirect' => 'add_to_cart_redirect',
|
||||
'woocommerce_product_get_width' => 'woocommerce_product_width',
|
||||
'woocommerce_product_get_height' => 'woocommerce_product_height',
|
||||
'woocommerce_product_get_length' => 'woocommerce_product_length',
|
||||
'woocommerce_product_get_weight' => 'woocommerce_product_weight',
|
||||
'woocommerce_product_get_sku' => 'woocommerce_get_sku',
|
||||
'woocommerce_product_get_price' => 'woocommerce_get_price',
|
||||
'woocommerce_product_get_regular_price' => 'woocommerce_get_regular_price',
|
||||
'woocommerce_product_get_sale_price' => 'woocommerce_get_sale_price',
|
||||
'woocommerce_product_get_tax_class' => 'woocommerce_product_tax_class',
|
||||
'woocommerce_product_get_stock_quantity' => 'woocommerce_get_stock_quantity',
|
||||
'woocommerce_product_get_attributes' => 'woocommerce_get_product_attributes',
|
||||
'woocommerce_product_get_gallery_image_ids' => 'woocommerce_product_gallery_attachment_ids',
|
||||
'woocommerce_product_get_review_count' => 'woocommerce_product_review_count',
|
||||
'woocommerce_product_get_downloads' => 'woocommerce_product_files',
|
||||
'woocommerce_order_get_currency' => 'woocommerce_get_currency',
|
||||
'woocommerce_order_get_discount_total' => 'woocommerce_order_amount_discount_total',
|
||||
'woocommerce_order_get_discount_tax' => 'woocommerce_order_amount_discount_tax',
|
||||
'woocommerce_order_get_shipping_total' => 'woocommerce_order_amount_shipping_total',
|
||||
'woocommerce_order_get_shipping_tax' => 'woocommerce_order_amount_shipping_tax',
|
||||
'woocommerce_order_get_cart_tax' => 'woocommerce_order_amount_cart_tax',
|
||||
'woocommerce_order_get_total' => 'woocommerce_order_amount_total',
|
||||
'woocommerce_order_get_total_tax' => 'woocommerce_order_amount_total_tax',
|
||||
'woocommerce_order_get_total_discount' => 'woocommerce_order_amount_total_discount',
|
||||
'woocommerce_order_get_subtotal' => 'woocommerce_order_amount_subtotal',
|
||||
'woocommerce_order_get_tax_totals' => 'woocommerce_order_tax_totals',
|
||||
'woocommerce_get_order_refund_get_amount' => 'woocommerce_refund_amount',
|
||||
'woocommerce_get_order_refund_get_reason' => 'woocommerce_refund_reason',
|
||||
'default_checkout_billing_country' => 'default_checkout_country',
|
||||
'default_checkout_billing_state' => 'default_checkout_state',
|
||||
'default_checkout_billing_postcode' => 'default_checkout_postcode',
|
||||
'woocommerce_system_status_environment_rows' => 'woocommerce_debug_posting',
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue