- Open
wp-content/themes/royal/woocommerce/content-product-gift.php
and delete/comment the following lines:
//if ( ! $product || ! $product->is_visible() )
// return;
- Open
wp-content/themes/royal/page-profile-template.php
Change:
$gifts = new WP_query(array('post_type' => 'product', 'posts_per_page' => 100, 'post__in' => $gifts_ids, 'post__not_in' => $gifts_used_ids));
To:
$gifts = new WP_query([
'post_type' => 'product',
'post_status' => ['publish', 'pending', 'draft', 'private'],
'posts_per_page' => 100,
'post__in' => $gifts_ids,
'post__not_in' => $gifts_used_ids
]);