Skip to content

Commit 30f96db

Browse files
authored
Updates
1 parent b305aa8 commit 30f96db

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

free-gift-bulk-coupon-generator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ private function get_products_for_dropdown() {
570570
foreach ( $products as $product ) {
571571
$product_obj = wc_get_product( $product->ID );
572572
if ( $product_obj && $product_obj->is_purchasable() && $product_obj->is_visible() ) {
573-
$product_options[ $product->ID ] = esc_html( $product_obj->get_name() ) . ' (ID: ' . absint( $product->ID ) . ')';
573+
$product_options[ $product->ID ] = esc_html( $product_obj->get_name() ) . ' (ID: ' . esc_html( (string) $product->ID ) . ')';
574574
}
575575
}
576576

phpstan.neon

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,7 @@ parameters:
2424
- '#Instantiated class WC_Coupon not found#'
2525
- '#Call to method .* on an unknown class WC_Coupon#'
2626
- '#Method .* of an unknown class WC_Coupon#'
27-
- '#Parameter .* of method .* expects WC_Product#'
27+
- '#Parameter .* of method .* expects WC_Product#'
28+
- '#Parameter .* of method .* has invalid type WC_Coupon#'
29+
- '#Class WC_Coupon not found#'
30+
- '#Parameter \$coupon of method .* has invalid type WC_Coupon#'

0 commit comments

Comments
 (0)