woocommerce/plugins/woocommerce-admin/tests/framework/helpers/class-wc-helper-reports.php

20 lines
634 B
PHP
Raw Normal View History

2018-09-20 14:20:04 +00:00
<?php
/**
* Class WC_Helper_Reports.
*
* This helper class should ONLY be used for unit tests!.
*/
class WC_Helper_Reports {
/**
* Delete everything in the lookup tables.
*/
public static function reset_stats_dbs() {
global $wpdb;
$wpdb->query( "DELETE FROM $wpdb->prefix" . WC_Admin_Reports_Orders_Data_Store::TABLE_NAME ); // @codingStandardsIgnoreLine.
$wpdb->query( "DELETE FROM $wpdb->prefix" . WC_Admin_Reports_Products_Data_Store::TABLE_NAME ); // @codingStandardsIgnoreLine.
$wpdb->query( "DELETE FROM $wpdb->prefix" . WC_Admin_Reports_Coupons_Data_Store::TABLE_NAME ); // @codingStandardsIgnoreLine.
2018-09-20 14:20:04 +00:00
}
}