Skip to content

Commit 46a421a

Browse files
committed
chore: rename plugin to "GraphQL for eCommerce" for trademark compliance
The WordPress.org plugin review flagged the display name/slug for beginning with the "WPGraphQL" trademark (and the "WooGraphQL" portmanteau of the WooCommerce mark), which can imply official affiliation. - Display name (plugin header + readme title) -> "GraphQL for eCommerce". - Slug/text domain -> "graphql-for-ecommerce" (header, all i18n string literals, and the PHPCS WordPress.WP.I18n text_domain config). - Update user-facing notices/errors that named the old plugin. "WooGraphQL" remains the project's informal nickname (repo, docs, community), just not in the WordPress.org directory's official name/slug. Internal file names and GitHub URLs are unchanged.
1 parent 68754f8 commit 46a421a

204 files changed

Lines changed: 1617 additions & 1585 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
=== WPGraphQL for eCommerce ===
1+
=== GraphQL for eCommerce ===
22
Contributors: kidunot89, ranaaterning, jasonbahl, saleebm
33
Tags: GraphQL, WooCommerce, WPGraphQL
44
Requires at least: 6.3

access-functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ function wc_graphql_price_range( $from, $to ) {
177177

178178
$price = sprintf(
179179
/* translators: 1: price from 2: price to */
180-
_x( '%1$s %2$s %3$s', 'Price range: from-to', 'wp-graphql-woocommerce' ),
180+
_x( '%1$s %2$s %3$s', 'Price range: from-to', 'graphql-for-ecommerce' ),
181181
is_numeric( $from ) ? wc_graphql_price( $from ) : $from,
182182
apply_filters( 'graphql_woocommerce_format_price_range_separator', '-', $from, $to ),
183183
is_numeric( $to ) ? wc_graphql_price( $to ) : $to

composer.json

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,31 @@
2727
"require-dev": {
2828
"axepress/wp-graphql-cs": "^2.0.0-beta",
2929
"axepress/wp-graphql-stubs": "^1.27.1",
30+
"behat/gherkin": "^4.8 <4.12",
3031
"brainmaestro/composer-git-hooks": "^2.8.5",
32+
"codeception/lib-asserts": "*",
33+
"codeception/module-asserts": "*",
34+
"codeception/module-rest": "*",
35+
"codeception/util-universalframework": "*",
36+
"fakerphp/faker": "^1.24",
37+
"johnpbloch/wordpress": "*",
38+
"lucatume/wp-browser": ">3.1 <3.5",
3139
"php-stubs/woocommerce-stubs": "9.1.0",
3240
"phpstan/extension-installer": "^1.3",
3341
"phpstan/phpdoc-parser": "^1.22.0",
3442
"phpstan/phpstan": "^1.10",
35-
"szepeviktor/phpstan-wordpress": "^1.3"
43+
"phpunit/phpunit": "^9.6",
44+
"stripe/stripe-php": "^20.2",
45+
"szepeviktor/phpstan-wordpress": "^1.3",
46+
"wp-cli/wp-cli-bundle": "*",
47+
"wp-graphql/wp-graphql-jwt-authentication": "^0.7.2",
48+
"wp-graphql/wp-graphql-testcase": "^3.2",
49+
"wpackagist-plugin/elementor": "^4.1",
50+
"wpackagist-plugin/hcaptcha-for-forms-and-more": "^5.0",
51+
"wpackagist-plugin/woocommerce": "^10.8",
52+
"wpackagist-plugin/woocommerce-gateway-stripe": "^10.8",
53+
"wpackagist-plugin/wp-graphql": "^2.16",
54+
"wpackagist-theme/twentytwentyone": "^2.8"
3655
},
3756
"config": {
3857
"optimize-autoloader": true,
@@ -41,7 +60,8 @@
4160
"allow-plugins": {
4261
"johnpbloch/wordpress-core-installer": true,
4362
"dealerdirect/phpcodesniffer-composer-installer": true,
44-
"phpstan/extension-installer": true
63+
"phpstan/extension-installer": true,
64+
"composer/installers": true
4565
}
4666
},
4767
"autoload": {
@@ -137,6 +157,18 @@
137157
"post-merge": [
138158
"composer install"
139159
]
160+
},
161+
"wordpress-install-dir": "local/public",
162+
"installer-paths": {
163+
"local/public/wp-content/plugins/{$name}/": ["type:wordpress-plugin"],
164+
"local/public/wp-content/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
165+
"local/public/wp-content/themes/{$name}/": ["type:wordpress-theme"]
166+
}
167+
},
168+
"repositories": {
169+
"wpackagist": {
170+
"type": "composer",
171+
"url": "https://wpackagist.org"
140172
}
141173
}
142174
}

includes/admin/class-general.php

Lines changed: 54 additions & 54 deletions
Large diffs are not rendered by default.

includes/class-admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct() {
3131
public function register_settings( Settings $manager ) {
3232
$manager->settings_api->register_section(
3333
'woographql_settings',
34-
[ 'title' => __( 'WooCommerce', 'wp-graphql-woocommerce' ) ]
34+
[ 'title' => __( 'WooCommerce', 'graphql-for-ecommerce' ) ]
3535
);
3636

3737
$manager->settings_api->register_fields(

includes/class-compatibility.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,13 @@ public static function add_jwt_output_fields( $fields, $object_type, $type_regis
220220
'authToken' => [
221221
'type' => $type_registry->get_type( 'String' ),
222222
'description' => static function () {
223-
return __( 'JWT Token that can be used in future requests for Authentication', 'wp-graphql-woocommerce' );
223+
return __( 'JWT Token that can be used in future requests for Authentication', 'graphql-for-ecommerce' );
224224
},
225225
'resolve' => static function ( $payload ) {
226226
$user = get_user_by( 'ID', $payload['id'] );
227227

228228
if ( ! $user ) {
229-
throw new UserError( __( 'User not found.', 'wp-graphql-woocommerce' ) );
229+
throw new UserError( __( 'User not found.', 'graphql-for-ecommerce' ) );
230230
}
231231

232232
return self::get_auth_token( $user );
@@ -235,13 +235,13 @@ public static function add_jwt_output_fields( $fields, $object_type, $type_regis
235235
'refreshToken' => [
236236
'type' => $type_registry->get_type( 'String' ),
237237
'description' => static function () {
238-
return __( 'A JWT token that can be used in future requests to get a refreshed jwtAuthToken. If the refresh token used in a request is revoked or otherwise invalid, a valid Auth token will NOT be issued in the response headers.', 'wp-graphql-woocommerce' );
238+
return __( 'A JWT token that can be used in future requests to get a refreshed jwtAuthToken. If the refresh token used in a request is revoked or otherwise invalid, a valid Auth token will NOT be issued in the response headers.', 'graphql-for-ecommerce' );
239239
},
240240
'resolve' => static function ( $payload ) {
241241
$user = get_user_by( 'ID', $payload['id'] );
242242

243243
if ( ! $user ) {
244-
throw new UserError( __( 'User not found.', 'wp-graphql-woocommerce' ) );
244+
throw new UserError( __( 'User not found.', 'graphql-for-ecommerce' ) );
245245
}
246246

247247
return self::get_refresh_token( $user );
@@ -263,7 +263,7 @@ public static function add_customer_to_login_payload() {
263263
[
264264
'type' => 'Customer',
265265
'description' => static function () {
266-
return __( 'Customer object of authenticated user.', 'wp-graphql-woocommerce' );
266+
return __( 'Customer object of authenticated user.', 'graphql-for-ecommerce' );
267267
},
268268
'resolve' => static function ( $payload ) {
269269
$id = $payload['id'];
@@ -281,7 +281,7 @@ public static function add_customer_to_login_payload() {
281281
[
282282
'type' => 'String',
283283
'description' => static function () {
284-
return __( 'A JWT token that can be used in future requests to for WooCommerce session identification', 'wp-graphql-woocommerce' );
284+
return __( 'A JWT token that can be used in future requests to for WooCommerce session identification', 'graphql-for-ecommerce' );
285285
},
286286
'resolve' => static function () {
287287
/** @var \WPGraphQL\WooCommerce\Utils\QL_Session_Handler $session */
@@ -299,7 +299,7 @@ public static function add_customer_to_login_payload() {
299299
[
300300
'type' => 'String',
301301
'description' => static function () {
302-
return __( 'A JWT token that can be used in future requests to for WooCommerce session identification', 'wp-graphql-woocommerce' );
302+
return __( 'A JWT token that can be used in future requests to for WooCommerce session identification', 'graphql-for-ecommerce' );
303303
},
304304
'resolve' => static function () {
305305
/** @var \WPGraphQL\WooCommerce\Utils\QL_Session_Handler $session */

includes/class-post-types.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ public static function resolve_product_type( $value ) {
357357
throw new UserError(
358358
sprintf(
359359
/* translators: %s: Post type slug */
360-
__( 'The "%s" post type is not a valid product type.', 'wp-graphql-woocommerce' ),
360+
__( 'The "%s" post type is not a valid product type.', 'graphql-for-ecommerce' ),
361361
$value->post_type
362362
)
363363
);
@@ -378,7 +378,7 @@ public static function resolve_product_type( $value ) {
378378
throw new UserError(
379379
sprintf(
380380
/* translators: %s: Product type */
381-
__( 'The "%s" product type is not supported by the core WPGraphQL for WooCommerce (WooGraphQL) schema.', 'wp-graphql-woocommerce' ),
381+
__( 'The "%s" product type is not supported by the core GraphQL for eCommerce schema.', 'graphql-for-ecommerce' ),
382382
$product_model->type
383383
)
384384
);
@@ -405,7 +405,7 @@ public static function resolve_product_variation_type( $value ) {
405405
throw new UserError(
406406
sprintf(
407407
/* translators: %s: Product type */
408-
__( 'The "%s" product variation type is not supported by the core WPGraphQL for WooCommerce (WooGraphQL) schema.', 'wp-graphql-woocommerce' ),
408+
__( 'The "%s" product variation type is not supported by the core GraphQL for eCommerce schema.', 'graphql-for-ecommerce' ),
409409
$value->type
410410
)
411411
);

includes/class-wp-graphql-woocommerce.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public static function get_product_attribute_taxonomies() {
138138
*/
139139
public function __clone() {
140140
// Cloning instances of the class is forbidden.
141-
_doing_it_wrong( __FUNCTION__, esc_html__( 'WP_GraphQL_WooCommerce class should not be cloned.', 'wp-graphql-woocommerce' ), '0.0.1' );
141+
_doing_it_wrong( __FUNCTION__, esc_html__( 'WP_GraphQL_WooCommerce class should not be cloned.', 'graphql-for-ecommerce' ), '0.0.1' );
142142
}
143143

144144
/**
@@ -148,7 +148,7 @@ public function __clone() {
148148
*/
149149
public function __wakeup() {
150150
// De-serializing instances of the class is forbidden.
151-
_doing_it_wrong( __FUNCTION__, esc_html__( 'De-serializing instances of the WP_GraphQL_WooCommerce class is not allowed', 'wp-graphql-woocommerce' ), '0.0.1' );
151+
_doing_it_wrong( __FUNCTION__, esc_html__( 'De-serializing instances of the WP_GraphQL_WooCommerce class is not allowed', 'graphql-for-ecommerce' ), '0.0.1' );
152152
}
153153

154154
/**
@@ -457,8 +457,8 @@ static function () {
457457
'<p>%s</p>' .
458458
'</div>',
459459
esc_html__(
460-
'WPGraphQL for WooCommerce appears to have been installed without it\'s dependencies. It will not work properly until dependencies are installed. This likely means you have cloned WPGraphQL from Github and need to run the command `composer install`.',
461-
'wp-graphql-woocommerce'
460+
'GraphQL for eCommerce appears to have been installed without its dependencies. It will not work properly until dependencies are installed. This likely means you have cloned the plugin from Github and need to run the command `composer install`.',
461+
'graphql-for-ecommerce'
462462
)
463463
);
464464
}

includes/connection/class-comments.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static function register_connections() {
3333
'averageRating' => [
3434
'type' => 'Float',
3535
'description' => static function () {
36-
return __( 'Average review rating for this product.', 'wp-graphql-woocommerce' );
36+
return __( 'Average review rating for this product.', 'graphql-for-ecommerce' );
3737
},
3838
'resolve' => static function ( $source ) {
3939
if ( empty( $source['edges'] ) ) {
@@ -48,7 +48,7 @@ public static function register_connections() {
4848
'rating' => [
4949
'type' => 'Float',
5050
'description' => static function () {
51-
return __( 'Review rating', 'wp-graphql-woocommerce' );
51+
return __( 'Review rating', 'graphql-for-ecommerce' );
5252
},
5353
'resolve' => static function ( $source ) {
5454
$review = $source['node'];
@@ -81,7 +81,7 @@ public static function register_connections() {
8181
'isCustomerNote' => [
8282
'type' => 'Boolean',
8383
'description' => static function () {
84-
return __( 'Is this a customer note?', 'wp-graphql-woocommerce' );
84+
return __( 'Is this a customer note?', 'graphql-for-ecommerce' );
8585
},
8686
'resolve' => static function ( $source ) {
8787
$note = $source['node'];

includes/connection/class-coupons.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public static function get_connection_args(): array {
8888
'code' => [
8989
'type' => 'String',
9090
'description' => static function () {
91-
return __( 'Limit result set to resources with a specific code.', 'wp-graphql-woocommerce' );
91+
return __( 'Limit result set to resources with a specific code.', 'graphql-for-ecommerce' );
9292
},
9393
],
9494
]

0 commit comments

Comments
 (0)