Don't try add/remove download permissions if order does not exist

This commit is contained in:
matttallan 2015-09-08 15:28:38 +10:00
parent d7c7527529
commit bbe11fdd6b
1 changed files with 1 additions and 1 deletions

View File

@ -2203,7 +2203,7 @@ class WC_Admin_Post_Types {
foreach ( $existing_permissions as $existing_permission ) {
$order = wc_get_order( $existing_permission->order_id );
if ( $order->id ) {
if ( ! empty( $order->id ) ) {
// Remove permissions
if ( ! empty( $removed_download_ids ) ) {
foreach ( $removed_download_ids as $download_id ) {