Archive Meta on Product Post Type

I am using a filtered search to provide end user the ability to browse either live/published Woocommerce product listings or archived product listings; however, I am running into an issue where I am unable to expose a metakey for 'is_archived_()'. This is resulting in the user search pulling a mix of published and archived and is confusing from an ecomm standpoint.

How I would like to approach this is: on the product post template, IF product post IS archived, apply new tag value = Expired.

Admittedly, I am not well versed yet in get_query functions, so any help on how the code would look is immensely appreciated.

Cheers all,

Abe

Topic woocommerce-offtopic custom-post-type-archives wp-get-archives Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.