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
|
@@ 112-115 (lines=4) @@
|
| 109 |
|
public static function view_order( $order_id ) { |
| 110 |
|
$order = wc_get_order( $order_id ); |
| 111 |
|
|
| 112 |
|
if ( ! current_user_can( 'view_order', $order_id ) ) { |
| 113 |
|
echo '<div class="woocommerce-error">' . __( 'Invalid order.', 'woocommerce' ) . ' <a href="' . wc_get_page_permalink( 'myaccount' ).'" class="wc-forward">'. __( 'My Account', 'woocommerce' ) .'</a>' . '</div>'; |
| 114 |
|
return; |
| 115 |
|
} |
| 116 |
|
|
| 117 |
|
// Backwards compatibility |
| 118 |
|
$status = new stdClass(); |