1

Add a column of the 'Usage restrictions > Products' field on the admin coupon list in WooCommerce.

How can I show the products that are attached to the coupons in the 'Usage restrictions > Products' field on the admin coupon list in WooCommerce?

LoicTheAztec
  • 229,944
  • 23
  • 356
  • 399
Joshua
  • 11
  • 2
  • 1
    Your question has already been partially answered [In this thread](https://stackoverflow.com/questions/65653372/add-a-custom-column-to-woocommerce-admin-coupon-list)... You will need to make some little changes: the meta_key for "Usage restrictions > Products" field is `product_ids` and you can use `get_post_meta( $post_id, 'product_ids', true );` to get the string value (a comma separated string of product IDS), where the variable `$post_id` is the coupon post ID included in the 2nd hooked function. – LoicTheAztec Jun 03 '23 at 14:14
  • 1
    Thank you @LoicTheAztec. I was able to work on your suggestions. – Joshua Jun 06 '23 at 12:16

0 Answers0