Fix/37785 cash on delivery not showing (#37927)
* Mkae sure the date_column_name default matches that of stats * Add changelog * Fix test
This commit is contained in:
parent
bf8d19e35a
commit
07fc512429
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: fix
|
||||
|
||||
Sync up date_column_name default for orders table, between stats and table data.
|
|
@ -23,7 +23,7 @@ class DataStore extends ReportsDataStore implements DataStoreInterface {
|
|||
* Dynamically sets the date column name based on configuration
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->date_column_name = get_option( 'woocommerce_date_type', 'date_created' );
|
||||
$this->date_column_name = get_option( 'woocommerce_date_type', 'date_paid' );
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
|
|
|
@ -414,6 +414,7 @@ class WC_Admin_Tests_API_Reports_Orders extends WC_REST_Unit_Test_Case {
|
|||
* See: https://github.com/woocommerce/woocommerce-admin/issues/5803#issuecomment-738403405.
|
||||
*/
|
||||
public function test_order_price_formatting_with_different_base_currency() {
|
||||
update_option( 'woocommerce_date_type', 'date_created' );
|
||||
wp_set_current_user( $this->user );
|
||||
WC_Helper_Reports::reset_stats_dbs();
|
||||
|
||||
|
|
Loading…
Reference in New Issue