includes/shortcodes/class-wc-shortcode-checkout.php 1 location
|
@@ 88-91 (lines=4) @@
|
| 85 |
|
$order_key = $_GET[ 'key' ]; |
| 86 |
|
$order = wc_get_order( $order_id ); |
| 87 |
|
|
| 88 |
|
if ( ! current_user_can( 'pay_for_order', $order_id ) ) { |
| 89 |
|
echo '<div class="woocommerce-error">' . __( 'Invalid order. If you have an account please log in and try again.', 'woocommerce' ) . ' <a href="' . wc_get_page_permalink( 'myaccount' ) . '" class="wc-forward">' . __( 'My Account', 'woocommerce' ) . '</a>' . '</div>'; |
| 90 |
|
return; |
| 91 |
|
} |
| 92 |
|
|
| 93 |
|
if ( $order->id == $order_id && $order->order_key == $order_key ) { |
| 94 |
|
|
includes/shortcodes/class-wc-shortcode-my-account.php 1 location
|
@@ 92-95 (lines=4) @@
|
| 89 |
|
$user_id = get_current_user_id(); |
| 90 |
|
$order = wc_get_order( $order_id ); |
| 91 |
|
|
| 92 |
|
if ( ! current_user_can( 'view_order', $order_id ) ) { |
| 93 |
|
echo '<div class="woocommerce-error">' . __( 'Invalid order.', 'woocommerce' ) . ' <a href="' . wc_get_page_permalink( 'myaccount' ).'" class="wc-forward">'. __( 'My Account', 'woocommerce' ) .'</a>' . '</div>'; |
| 94 |
|
return; |
| 95 |
|
} |
| 96 |
|
|
| 97 |
|
// Backwards compatibility |
| 98 |
|
$status = new stdClass(); |