• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wp-graphql / wp-graphql-woocommerce / 5604143621

pending completion
5604143621

push

github

web-flow
chore: implement WPGraphQL Coding Standards (#769)

* chore: avoid magic constants [PHPCS]

* chore: change ruleset to wp-graphql-cs and lint

* devops: HPOS added back to CI with the release of WC 3.9

---------

Co-authored-by: Geoff Taylor <geoff@axistaylor.com>

562 of 562 new or added lines in 77 files covered. (100.0%)

10309 of 12440 relevant lines covered (82.87%)

53.98 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/includes/functions.php
1
<?php
2
/**
3
 * Misc functions.
4
 *
5
 * @package WPGraphQL\WooCommerce
6
 * @since 0.3.1
7
 * @deprecated v0.10.2
8
 *
9
 * Will be removed in v0.11.0
10
 */
11

12
namespace WPGraphQL\WooCommerce\Functions;
13

14
/**
15
 * Initializes minor integrations with other WordPress plugins.
16
 *
17
 * @return void
18
 */
19
function setup_minor_integrations() {
20
        add_filter(
×
21
                'graphql_swp_result_possible_types',
×
22
                'WPGraphQL\WooCommerce\Functions\woographql_swp_result_possible_types',
×
23
                10,
×
24
                1
×
25
        );
×
26
}
27

28
/**
29
 * QL Search integration - Adds to product types to the SWPResult possible types
30
 *
31
 * @param array $type_names SWPResults possible types.
32
 *
33
 * @return array
34
 */
35
function woographql_swp_result_possible_types( array $type_names ) {
36
        if ( in_array( 'Product', $type_names, true ) ) {
×
37
                $type_names = array_merge(
×
38
                        array_filter(
×
39
                                $type_names,
×
40
                                static function ( $type_name ) {
×
41
                                        return 'Product' !== $type_name;
×
42
                                }
×
43
                        ),
×
44
                        [
×
45
                                'SimpleProduct',
×
46
                                'VariableProduct',
×
47
                                'GroupProduct',
×
48
                                'ExternalProduct',
×
49
                        ]
×
50
                );
×
51
        }
52

53
        return $type_names;
×
54
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc