Skip to content

Commit 5701fb1

Browse files
authored
fix: Old trouble code removed. (#799)
1 parent 628816f commit 5701fb1

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

includes/class-core-schema-filters.php

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,6 @@ public static function add_filters() {
110110
'graphql_wp_connection_type_config',
111111
[ '\WPGraphQL\WooCommerce\Connection\Products', 'set_connection_config' ]
112112
);
113-
114-
add_filter(
115-
'woographql_cart_connection_definitions',
116-
[ self::class, 'skip_cart_item_connection' ]
117-
);
118113
}
119114

120115
/**
@@ -389,32 +384,4 @@ public static function inject_type_resolver( $type, $value ) {
389384

390385
return $type;
391386
}
392-
393-
/**
394-
* Return true if WooGraphQL Pro is handling cart item connections.
395-
*
396-
* @return boolean
397-
*/
398-
private static function should_skip_cart_item_connection() {
399-
if ( ! class_exists( 'WPGraphQL\WooCommerce\Pro\WooGraphQL_Pro' ) ) {
400-
return false;
401-
}
402-
403-
return Pro\WooGraphQL_Pro::is_composite_products_enabled()
404-
&& Pro\WooGraphQL_Pro::is_composite_products_active();
405-
}
406-
407-
/**
408-
* Skip core cart item connection definitions if WooGraphQL Pro is handling it.
409-
*
410-
* @param array $connections Cart connection defintions.
411-
* @return array
412-
*/
413-
public static function skip_cart_item_connection( $connections ) {
414-
if ( self::should_skip_cart_item_connection() ) {
415-
unset( $connections['contents'] );
416-
}
417-
418-
return $connections;
419-
}
420387
}

0 commit comments

Comments
 (0)