/
home
/
techb158
/
balacoffee.com
/
wp-content
/
plugins
/
woocommerce
/
src
/
StoreApi
/
Schemas
/
V1
/
/home/techb158/balacoffee.com/wp-content/plugins/woocommerce/src/StoreApi/Schemas/V1
mkdir
upload
Name
Size
Mode
Actions
Agentic/
-
0755
rm
AI/
-
0755
rm
AbstractAddressSchema.php
10838
0644
edit
dl
rm
AbstractSchema.php
13215
0644
edit
dl
rm
BatchSchema.php
427
0644
edit
dl
rm
BillingAddressSchema.php
4569
0644
edit
dl
rm
CartCouponSchema.php
3047
0644
edit
dl
rm
CartExtensionsSchema.php
2259
0644
edit
dl
rm
CartFeeSchema.php
2169
0644
edit
dl
rm
CartItemSchema.php
7734
0644
edit
dl
rm
CartSchema.php
16399
0644
edit
dl
rm
CartShippingRateSchema.php
11642
0644
edit
dl
rm
CheckoutOrderSchema.php
752
0644
edit
dl
rm
CheckoutSchema.php
15407
0644
edit
dl
rm
ErrorSchema.php
1151
0644
edit
dl
rm
ImageAttachmentSchema.php
3403
0644
edit
dl
rm
ItemSchema.php
11538
0644
edit
dl
rm
OrderCouponSchema.php
2468
0644
edit
dl
rm
OrderFeeSchema.php
2253
0644
edit
dl
rm
OrderItemSchema.php
7332
0644
edit
dl
rm
OrderSchema.php
13047
0644
edit
dl
rm
PatternsSchema.php
673
0644
edit
dl
rm
ProductAttributeSchema.php
2555
0644
edit
dl
rm
ProductBrandSchema.php
3575
0644
edit
dl
rm
ProductCategorySchema.php
3579
0644
edit
dl
rm
ProductCollectionDataSchema.php
5066
0644
edit
dl
rm
ProductReviewSchema.php
6269
0644
edit
dl
rm
ProductSchema.php
37317
0644
edit
dl
rm
ShippingAddressSchema.php
2906
0644
edit
dl
rm
TermSchema.php
2205
0644
edit
dl
rm
Edit:
/home/techb158/balacoffee.com/wp-content/plugins/woocommerce/src/StoreApi/Schemas/V1/TermSchema.php
(2205B)
<?php namespace Automattic\WooCommerce\StoreApi\Schemas\V1; /** * TermSchema class. */ class TermSchema extends AbstractSchema { /** * The schema item name. * * @var string */ protected $title = 'term'; /** * The schema item identifier. * * @var string */ const IDENTIFIER = 'term'; /** * Term properties. * * @return array */ public function get_properties() { return [ 'id' => array( 'description' => __( 'Unique identifier for the resource.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'name' => array( 'description' => __( 'Term name.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'slug' => array( 'description' => __( 'String based identifier for the term.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'description' => array( 'description' => __( 'Term description.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'parent' => array( 'description' => __( 'Parent term ID, if applicable.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'count' => array( 'description' => __( 'Number of objects (posts of any type) assigned to the term.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), ]; } /** * Convert a term object into an object suitable for the response. * * @param \WP_Term $term Term object. * @return array */ public function get_item_response( $term ) { return [ 'id' => (int) $term->term_id, 'name' => $this->prepare_html_response( $term->name ), 'slug' => $term->slug, 'description' => $this->prepare_html_response( $term->description ), 'parent' => (int) $term->parent, 'count' => (int) $term->count, ]; } }
Save
cmd:
run