Remove unused variable

This commit is contained in:
Jacob Arriola
2020-10-20 08:04:26 -07:00
committed by GitHub
parent 88af7d8fc4
commit 15dcfa75e0
+1 -2
View File
@@ -50,8 +50,7 @@ class WC_Terms extends TermObjects {
'fromFieldName' => $tax_object->graphql_plural_name,
'resolve' => function( $source, array $args, AppContext $context, ResolveInfo $info ) use ( $tax_object ) {
$resolver = new TermObjectConnectionResolver( $source, $args, $context, $info, $tax_object->name );
$taxonomy = str_replace( ' ', '_', strtolower( $tax_object->labels->singular_name ) );
$options = $source->attributes[ $tax_object->name ]['options'];
$options = $source->attributes[ $tax_object->name ]['options'];
$resolver->set_query_arg( 'term_taxonomy_id', ! empty( $options ) ? $options : array( '0' ) );
return $resolver->get_connection();