{"action":"closed","issue":{"url":"https://api.github.com/repos/woocommerce/woocommerce-product-tables-feature-plugin/issues/89","repository_url":"https://api.github.com/repos/woocommerce/woocommerce-product-tables-feature-plugin","labels_url":"https://api.github.com/repos/woocommerce/woocommerce-product-tables-feature-plugin/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/woocommerce/woocommerce-product-tables-feature-plugin/issues/89/comments","events_url":"https://api.github.com/repos/woocommerce/woocommerce-product-tables-feature-plugin/issues/89/events","html_url":"https://github.com/woocommerce/woocommerce-product-tables-feature-plugin/issues/89","id":316971525,"number":89,"title":"Should we keep the download limit and download expiration change?","user":{"login":"rodrigoprimo","id":77215,"avatar_url":"https://avatars2.githubusercontent.com/u/77215?v=4","gravatar_id":"","url":"https://api.github.com/users/rodrigoprimo","html_url":"https://github.com/rodrigoprimo","followers_url":"https://api.github.com/users/rodrigoprimo/followers","following_url":"https://api.github.com/users/rodrigoprimo/following{/other_user}","gists_url":"https://api.github.com/users/rodrigoprimo/gists{/gist_id}","starred_url":"https://api.github.com/users/rodrigoprimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodrigoprimo/subscriptions","organizations_url":"https://api.github.com/users/rodrigoprimo/orgs","repos_url":"https://api.github.com/users/rodrigoprimo/repos","events_url":"https://api.github.com/users/rodrigoprimo/events{/privacy}","received_events_url":"https://api.github.com/users/rodrigoprimo/received_events","type":"User","site_admin":false},"labels":[{"id":721693922,"url":"https://api.github.com/repos/woocommerce/woocommerce-product-tables-feature-plugin/labels/Question","name":"Question","color":"FF69B4","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-04-23T20:30:34Z","updated_at":"2018-04-26T19:40:33Z","closed_at":"2018-04-26T19:40:33Z","author_association":"CONTRIBUTOR","body":"WC core lets users set download limit and download expiration per product. When we designed the custom product tables schema, we decided to change that and let users set download limit and download expiration per file. I think that this is a nice feature to add to WC, but I'm not sure if we should have added it to this plugin before adding it to WC core.\r\n\r\nThe main problem with supporting download limit and download expiration per file in this plugin and not in WC core is that they can't share the same product API.  For example, what should `$product->get_download_limit()` return if each product file can now have a different download limit? IMHO, if we keep this change, it will force us to keep two different versions of all the code that touches product downloads. It will also make it harder for anyone that wants to use this plugin (they will have to update code that uses product downloads and make sure that the extensions that they are using are compatible with this plugin).\r\n\r\nThere are four WC core unit tests that are failing because of the download limit and download expiration change:\r\n\r\n- WC_Tests_Product_CSV_Importer::test_import() (see #78)\r\n- WC_Tests_Customer_Functions::test_wc_get_customer_available_downloads() (see #77)\r\n- WC_Tests_Customer_Functions::test_wc_update_new_customer_past_orders() (see #76)\r\n- WC_Tests_Product_Data::test_product_getters_and_setters() (see #80)\r\n\r\nThose failing tests illustrate some of the challenges that we will have to address if we decide to keep download limit and download expiration per file.\r\n\r\nI suggest that we remove this change from the plugin for now and reintroduce it only after it is introduced to WC core (probably only in WC 4.0 as it is a breaking change). @kloon mentioned that the original idea when this was added to the plugin was to add it first to WC core anyway.\r\n\r\nI'm opening this issue to ask for input from others and to continue the conversation we started earlier today before we make a decision. @claudiosanches mentioned that he thinks we should simply hide the new interface in the product edit page and keep the new data structure. Claudio, could you please elaborate on how that would work and why do you prefer this approach over waiting until WC core implements this feature to add it to this plugin?"}}
{"actor":{"display_login":"rodrigoprimo"}}