remove check to make sure order is complete before downloading. fixes #6166
This commit is contained in:
parent
8fc5d895eb
commit
e202926f73
|
@ -91,7 +91,7 @@ class WC_Download_Handler {
|
||||||
if ( $order_id ) {
|
if ( $order_id ) {
|
||||||
$order = wc_get_order( $order_id );
|
$order = wc_get_order( $order_id );
|
||||||
|
|
||||||
if ( ! $order->is_download_permitted() || $order->post_status != 'wc-completed' ) {
|
if ( ! $order->is_download_permitted() ) {
|
||||||
wp_die( __( 'Invalid order.', 'woocommerce' ) . ' <a href="' . esc_url( home_url() ) . '" class="wc-forward">' . __( 'Go to homepage', 'woocommerce' ) . '</a>', '', array( 'response' => 404 ) );
|
wp_die( __( 'Invalid order.', 'woocommerce' ) . ' <a href="' . esc_url( home_url() ) . '" class="wc-forward">' . __( 'Go to homepage', 'woocommerce' ) . '</a>', '', array( 'response' => 404 ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue