Cast coupon's $post->ID to int

This commit is contained in:
Gabor Javorszky 2018-04-13 11:25:58 +01:00
parent b6ac275713
commit d569920825
1 changed files with 2 additions and 1 deletions

View File

@ -27,7 +27,8 @@ class WC_Meta_Box_Coupon_Data {
public static function output( $post ) {
wp_nonce_field( 'woocommerce_save_data', 'woocommerce_meta_nonce' );
$coupon = new WC_Coupon( $post->ID );
$coupon_id = absint( $post->ID );
$coupon = new WC_Coupon( $coupon_id );
?>