Skip to content

Commit 5525860

Browse files
committed
Add stubs
1 parent 862a280 commit 5525860

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ parameters:
1414
- stubs/wpcli.php
1515
- stubs/wc-blueprint.php
1616
- stubs/abilities.php
17+
- stubs/product-customizations.php
1718
- vendor/inpsyde/wp-stubs-versions/latest.php
1819
- vendor/php-stubs/woocommerce-stubs/woocommerce-stubs.php
1920
paths:

stubs/product-customizations.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
3+
/**
4+
* WooCommerce Gift Cards.
5+
*/
6+
class WC_GC_Gift_Card_Product {
7+
8+
/**
9+
* @param WC_Product $product
10+
* @return bool
11+
*/
12+
public static function is_gift_card( $product ) {}
13+
}
14+
15+
/**
16+
* WooCommerce Deposits.
17+
*/
18+
class WC_Deposits_Product_Manager {
19+
20+
/**
21+
* Are deposits enabled for a specific product.
22+
*
23+
* @param int $product_id Product ID.
24+
* @return bool
25+
*/
26+
public static function deposits_enabled( $product_id ) {}
27+
}
28+
29+
/**
30+
* WooCommerce Product Add-Ons.
31+
*/
32+
class WC_Product_Addons_Helper {
33+
34+
/**
35+
* @param int $post_id
36+
* @param bool $prefix
37+
* @param bool $inc_parent
38+
* @param bool $inc_global
39+
* @return array<int, array<string, mixed>>
40+
*/
41+
public static function get_product_addons( $post_id, $prefix = false, $inc_parent = true, $inc_global = true ) {}
42+
}

0 commit comments

Comments
 (0)