Skip to content

Commit

Permalink
Fixing property name
Browse files Browse the repository at this point in the history
  • Loading branch information
dparker1005 committed Jan 25, 2024
1 parent 0ccc170 commit b8bf1f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/ecommerce/edd/class-swsales-module-edd.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public static function add_choose_coupon( $cur_sale ) {
</select>
<?php
if ( false !== $coupon_found ) {
$discount_object = new \EDD_Discount( $coupon_found->ID );
$discount_object = new \EDD_Discount( $coupon_found->id );
if ( ! empty( $discount_object->expiration ) && $cur_sale->get_end_date( 'Y-m-d H:i:s' ) > date('Y-m-d H:i:s', strtotime( $discount_object->expiration ) ) ) {
echo "<p id='swsales_pmpro_discount_code_error' class='sitewide_sales_message sitewide_sales_error'>" . __( "This discount code expires before the Sitewide Sale's end date.", 'sitewide-sales' ) . '</p>';
} elseif ( ! empty( $discount_object->start ) && $cur_sale->get_start_date( 'Y-m-d H:i:s' ) < date('Y-m-d H:i:s', strtotime( $discount_object->start ) ) ) {
Expand All @@ -140,7 +140,7 @@ public static function add_choose_coupon( $cur_sale ) {
<span id="swsales_edd_after_coupon_select">
<?php
if ( false !== $coupon_found ) {
$edit_coupon_url = admin_url( 'edit.php?post_type=download&page=edd-discounts&edd-action=edit_discount&discount='.$coupon_found->ID );
$edit_coupon_url = admin_url( 'edit.php?post_type=download&page=edd-discounts&edd-action=edit_discount&discount='.$coupon_found->id );
} else {
$edit_coupon_url = '#';
}
Expand Down

0 comments on commit b8bf1f4

Please sign in to comment.