400 ) ); } // Load discount $discount_id = absint( $_GET['discount'] ); /** @var EDD_Discount */ $discount = edd_get_discount( $discount_id ); // Bail if discount does not exist if ( empty( $discount ) ) { wp_die( __( 'Something went wrong.', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 400 ) ); } // Setup discount vars $product_requirements = $discount->get_product_reqs(); $excluded_products = $discount->get_excluded_products(); $condition = $discount->get_product_condition(); $single_use = $discount->get_once_per_customer(); $type = $discount->get_type(); $notes = edd_get_discount_notes( $discount->id ); // Show/Hide $flat_display = ( 'flat' === $type ) ? '' : ' style="display:none;"'; $percent_display = ( 'percent' === $type ) ? '' : ' style="display:none;"'; $no_notes_display = empty( $notes ) ? '' : ' style="display:none;"'; $condition_display = ! empty( $product_requirements ) ? '' : ' style="display:none;"'; // Dates & times $discount_start_date = edd_get_edd_timezone_equivalent_date_from_utc( EDD()->utils->date( $discount->start_date, 'utc' ) ); $discount_end_date = edd_get_edd_timezone_equivalent_date_from_utc( EDD()->utils->date( $discount->end_date, 'utc' ) ); $start_date = $discount_start_date->format( 'Y-m-d' ); $start_hour = $discount_start_date->format( 'H' ); $start_minute = $discount_start_date->format( 'i' ); $end_date = $discount_end_date->format( 'Y-m-d' ); $end_hour = $discount_end_date->format( 'H' ); $end_minute = $discount_end_date->format( 'i' ); $hours = edd_get_hour_values(); $minutes = edd_get_minute_values(); ?>


id, $discount ); ?> id, $discount ); ?> id, $discount ); ?> id, $discount ); ?> id, $discount ); ?> id, $discount ); ?> id, $discount ); ?> id, $discount ); ?> id, $discount ); ?> id, $discount ); ?> id, $discount ); ?> id, $discount ); ?> id, $discount ); ?> id, $discount ); ?>

html->product_dropdown( array( 'name' => 'product_reqs[]', 'id' => 'edd_products', 'selected' => $product_requirements, 'multiple' => true, 'chosen' => true, 'placeholder' => sprintf( __( 'Select %s', 'easy-digital-downloads' ), edd_get_label_plural() ) ) ); ?>
>


html->product_dropdown( array( 'name' => 'excluded_products[]', 'id' => 'excluded_products', 'selected' => $excluded_products, 'multiple' => true, 'chosen' => true, 'placeholder' => sprintf( __( 'Select %s', 'easy-digital-downloads' ), edd_get_label_plural() ) ) ); ?>

:

:

/>

id, 'discount' ); ?>
id, $discount ); ?>