Skip to content
This repository was archived by the owner on Jun 15, 2022. It is now read-only.

Commit 0261db9

Browse files
committed
Rename WC_Custom_Order_Table to WooCommerce_Custom_Orders_Table
1 parent 4dd5c51 commit 0261db9

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

includes/class-wc-custom-order-table.php renamed to includes/class-woocommerce-custom-orders-table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/**
1010
* Core functionality for WooCommerce Custom Orders Table.
1111
*/
12-
class WC_Custom_Order_Table {
12+
class WooCommerce_Custom_Orders_Table {
1313

1414
/**
1515
* The database table name.

tests/test-bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function test_plugin_only_loads_after_woocommerce() {
1717
do_action( 'woocommerce_init' );
1818

1919
$this->assertInstanceOf(
20-
'WC_Custom_Order_Table',
20+
'WooCommerce_Custom_Orders_Table',
2121
$wc_custom_order_table,
2222
'The plugin should not be bootstrapped until woocommerce_init.'
2323
);

tests/testcase.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ protected function truncate_table() {
2828
*/
2929
protected function toggle_use_custom_table( $enabled = true ) {
3030
if ( $enabled ) {
31-
add_filter( 'woocommerce_customer_data_store', 'WC_Custom_Order_Table::customer_data_store' );
32-
add_filter( 'woocommerce_order_data_store', 'WC_Custom_Order_Table::order_data_store' );
31+
add_filter( 'woocommerce_customer_data_store', 'WooCommerce_Custom_Orders_Table::customer_data_store' );
32+
add_filter( 'woocommerce_order_data_store', 'WooCommerce_Custom_Orders_Table::order_data_store' );
3333
} else {
34-
remove_filter( 'woocommerce_customer_data_store', 'WC_Custom_Order_Table::customer_data_store' );
35-
remove_filter( 'woocommerce_order_data_store', 'WC_Custom_Order_Table::order_data_store' );
34+
remove_filter( 'woocommerce_customer_data_store', 'WooCommerce_Custom_Orders_Table::customer_data_store' );
35+
remove_filter( 'woocommerce_order_data_store', 'WooCommerce_Custom_Orders_Table::order_data_store' );
3636
}
3737
}
3838

woocommerce-custom-orders-table.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@ function wc_custom_order_table_autoload( $class ) {
4545
register_activation_hook( __FILE__, array( 'WooCommerce_Custom_Orders_Table_Install', 'activate' ) );
4646

4747
/**
48-
* Retrieve an instance of the WC_Custom_Order_Table class.
48+
* Retrieve an instance of the WooCommerce_Custom_Orders_Table class.
4949
*
5050
* If one has not yet been instantiated, it will be created.
5151
*
5252
* @global $wc_custom_order_table
5353
*
54-
* @return WC_Custom_Order_Table The global WC_Custom_Order_Table instance.
54+
* @return WooCommerce_Custom_Orders_Table The global WooCommerce_Custom_Orders_Table instance.
5555
*/
5656
function wc_custom_order_table() {
5757
global $wc_custom_order_table;
5858

59-
if ( ! $wc_custom_order_table instanceof WC_Custom_Order_Table ) {
60-
$wc_custom_order_table = new WC_Custom_Order_Table();
59+
if ( ! $wc_custom_order_table instanceof WooCommerce_Custom_Orders_Table ) {
60+
$wc_custom_order_table = new WooCommerce_Custom_Orders_Table();
6161
$wc_custom_order_table->setup();
6262
}
6363

0 commit comments

Comments
 (0)