wp_update_post() doesn’t update post_status

Đã có trọn bộ đề thi thử THPT Quốc Gia 2022 các môn: vip.dethihsg247.com
QUẢNG CÁO: Đổi thẻ cào thành tiền mặt min rút 10k tại đây

First of all, I’ve already checked the solution for this question:
Why doesn’t wp_update_post() update the post_status field?

I am having trouble with updating post_status of products and product_variations using wp_update_post(). This is the code:

First, I look for trashed products and product variations based on multiple conditions. If all conditions match, I run the update_product_status() function with specified $post_id.

The function runs, the log is being updated with correct post IDs, but the post_status just stays ‘trash’ and it is not updated at all.

What am I doing wrong? I’ve added the edit_date, post_date and post_date_gmt arguments to wp_update_post, based on the answers from the other queston, but no luck.

Xin chào các bạn và quý Thầy Cô. Hãy nhập từ khóa mình muốn vào ô tìm kiếm trên Website để tìm kiếm mọi thứ hoặc trên google các bạn hãy nhập từ khóa + dethihsg247.com để tìm kiếm các bài viết của chúng tôi nhé.
  • Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
  • Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
  • Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.

Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com