| @@ -73,9 +73,9 @@ | ||
| 73 | 73 | $this->manual_renew_product( $subscrpt_id ); |
| 74 | 74 | } elseif ( 'cancelled' === $action ) { |
| 75 | 75 | $status = get_post_status( $subscrpt_id ); |
| 76 | 76 | $user_cancel = get_post_meta( $subscrpt_id, '_subscrpt_user_cancel', true ); |
| 77 | - if ( 'no' === $user_cancel ) { | |
| 77 | + if ( ! Helper::can_user_cancel( $user_cancel ) ) { | |
| 78 | 78 | return; |
| 79 | 79 | } elseif ( 'active' === $status ) { |
| 80 | 80 | Action::status( 'pe_cancelled', $subscrpt_id ); |
| 81 | 81 | } else { |
| @@ -127,9 +127,14 @@ | ||
| 127 | 127 | array(), |
| 128 | 128 | array( 'renew_subscrpt' => true ) |
| 129 | 129 | ); |
| 130 | 130 | |
| 131 | - wc_add_notice( get_option( 'subscrpt_manual_renew_cart_notice' ), 'success' ); | |
| 131 | + // Empty unless the store set one, and wc_add_notice( '' ) renders an empty | |
| 132 | + // green box rather than nothing, so only add it when there is a message. | |
| 133 | + $cart_notice = subscrpt_get_manual_renew_cart_notice(); | |
| 134 | + if ( '' !== $cart_notice ) { | |
| 135 | + wc_add_notice( $cart_notice, 'success' ); | |
| 136 | + } | |
| 132 | 137 | $this->redirect( wc_get_cart_url() ); |
| 133 | 138 | } |
| 134 | 139 | |
| 135 | 140 | /** |