Skip to content

Commit

Permalink
Fix some strings which should not be replaced
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Jun 24, 2019
1 parent 854ac94 commit 1c82fd6
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 58 deletions.
50 changes: 1 addition & 49 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="woocommerce" />
<property name="text_domain" type="array" value="woocommerce-rest-api" />
</properties>
</rule>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ public function get_database_info() {
* To ensure we include all WC tables, even if they do not exist, pre-populate the WC array with all the tables.
*/
$tables = array(
'woocommerce-rest-api' => array_fill_keys( $core_tables, false ),
'woocommerce' => array_fill_keys( $core_tables, false ),
'other' => array(),
);

Expand All @@ -760,7 +760,7 @@ public function get_database_info() {
if ( is_multisite() && 0 !== strpos( $table->name, $site_tables_prefix ) && ! in_array( $table->name, $global_tables, true ) ) {
continue;
}
$table_type = in_array( $table->name, $core_tables ) ? 'woocommerce-rest-api' : 'other';
$table_type = in_array( $table->name, $core_tables ) ? 'woocommerce' : 'other';

$tables[ $table_type ][ $table->name ] = array(
'data' => $table->data,
Expand Down Expand Up @@ -1001,7 +1001,7 @@ public function get_theme_info() {
'version_latest' => WC_Admin_Status::get_latest_theme_version( $active_theme ),
'author_url' => esc_url_raw( $active_theme->{'Author URI'} ),
'is_child_theme' => is_child_theme(),
'has_woocommerce_support' => current_theme_supports( 'woocommerce-rest-api' ),
'has_woocommerce_support' => current_theme_supports( 'woocommerce' ),
'has_woocommerce_file' => ( file_exists( get_stylesheet_directory() . '/woocommerce.php' ) || file_exists( get_template_directory() . '/woocommerce.php' ) ),
'has_outdated_templates' => $outdated_templates,
'overrides' => $override_files,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class WC_REST_Order_Notes_Controller extends WC_REST_Order_Notes_V2_Controller {
public function prepare_item_for_response( $note, $request ) {
$data = array(
'id' => (int) $note->comment_ID,
'author' => __( 'woocommerce-rest-api', 'woocommerce-rest-api' ) === $note->comment_author ? 'system' : $note->comment_author,
'author' => __( 'woocommerce', 'woocommerce-rest-api' ) === $note->comment_author ? 'system' : $note->comment_author,
'date_created' => wc_rest_prepare_date_response( $note->comment_date ),
'date_created_gmt' => wc_rest_prepare_date_response( $note->comment_date_gmt ),
'note' => $note->comment_content,
Expand Down
2 changes: 1 addition & 1 deletion src/Controllers/Version4/OrderNotes.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ public function delete_item( $request ) {
protected function get_data_for_response( $object, $request ) {
return array(
'id' => (int) $object->comment_ID,
'author' => __( 'woocommerce-rest-api', 'woocommerce-rest-api' ) === $object->comment_author ? 'system' : $object->comment_author,
'author' => __( 'woocommerce', 'woocommerce-rest-api' ) === $object->comment_author ? 'system' : $object->comment_author,
'date_created' => wc_rest_prepare_date_response( $object->comment_date ),
'date_created_gmt' => wc_rest_prepare_date_response( $object->comment_date_gmt ),
'note' => $object->comment_content,
Expand Down
4 changes: 2 additions & 2 deletions src/Controllers/Version4/Utilities/DatabaseInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function get_database_info() {
* To ensure we include all WC tables, even if they do not exist, pre-populate the WC array with all the tables.
*/
$tables = array(
'woocommerce-rest-api' => array_fill_keys( $core_tables, false ),
'woocommerce' => array_fill_keys( $core_tables, false ),
'other' => array(),
);

Expand All @@ -94,7 +94,7 @@ public function get_database_info() {
if ( is_multisite() && 0 !== strpos( $table->name, $site_tables_prefix ) && ! in_array( $table->name, $global_tables, true ) ) {
continue;
}
$table_type = in_array( $table->name, $core_tables, true ) ? 'woocommerce-rest-api' : 'other';
$table_type = in_array( $table->name, $core_tables, true ) ? 'woocommerce' : 'other';

$tables[ $table_type ][ $table->name ] = array(
'data' => $table->data,
Expand Down
2 changes: 1 addition & 1 deletion src/Controllers/Version4/Utilities/ThemeInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function get_theme_info() {
'version_latest' => \WC_Admin_Status::get_latest_theme_version( $active_theme ),
'author_url' => esc_url_raw( $active_theme->{'Author URI'} ),
'is_child_theme' => is_child_theme(),
'has_woocommerce_support' => current_theme_supports( 'woocommerce-rest-api' ),
'has_woocommerce_support' => current_theme_supports( 'woocommerce' ),
'has_woocommerce_file' => ( file_exists( get_stylesheet_directory() . '/woocommerce.php' ) || file_exists( get_template_directory() . '/woocommerce.php' ) ),
'has_outdated_templates' => $outdated_templates,
'overrides' => $override_files,
Expand Down

0 comments on commit 1c82fd6

Please sign in to comment.