Repository Forums Support Expiry dates for WooCommerce PRO Issue when copy product

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #15781
    Daniel Löf
    Participant

    When I copy a product the term_relationships link for expiry dates is not copied. Expiry rule dropdown has “None” selected. When I manually select correct expiry rule via dropdown the data is shown. By looking in database I see meta data is copied but the link in “term_relationships” is not created. How to fix this? Is there a missing hook or something similar?

    Our real issue is that we are copying products via API so we can not handle this manually. But for reference we where able to recreate issue via admin as mentioned above.

    #15782
    Soft79
    Keymaster

    I don’t really use the rest API, but it looks like a taxonomy can be added using the method mentioned here:

    https://wordpress.stackexchange.com/questions/367707/how-to-add-taxonomy-to-a-post-using-wp-rest-api

    Our taxonomy name is j79_wcxd_expiry_type . You can see the term id’s in wp-admin > Products > Expiry Rules.

    #15785
    Daniel Löf
    Participant

    Thanks. We have tested several ways but are not able to get the link there. If I understand correctly, this is the correct format:
    curl –user “user:password” -X POST -d “j79_wcxd_expiry_type[]=250” https://example.com/wp-json/wp/v2/product/10678

    I was able to update title, but not to add the term_taxonomy with id 250.

    #15797
    Daniel Löf
    Participant

    But still. Isn’t the real issue some bug in this plugin since we get same problem when we copy products via admin page? We are no experts in wordpress base but is there a hook missing or something?

    #15798
    Soft79
    Keymaster

    I never really though about it that way, but yes, it would be logical if it copied the Expiry Type.

    I’ll get back to you about this.

    #15809
    Daniel Löf
    Participant

    Just wanted to check if you have news about this?

    #15816
    Soft79
    Keymaster

    Yes, you can download version 1.3.4 from your account page. This has been tested from the backend, not with the Rest API.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.