New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP - Product CRUD #12065

Merged
merged 175 commits into from Nov 16, 2016

Conversation

@mikejolley
Member

mikejolley commented Oct 11, 2016

Tracking progress on new Product CRUD.

Todo:

  • Create legacy product class to house old code
  • Define data for each product type
    • Abstract
    • Simple
    • External
    • Grouped
    • Variable
    • Variation @mikejolley
  • Define setters for each product type
    • Abstract
    • Simple
    • External
    • Grouped
    • Variable
    • Variation @mikejolley
  • Define getters for each product type
    • Abstract
    • Simple
    • External
    • Grouped
    • Variable
    • Variation @mikejolley
  • Use CRUD in save routines
  • Refactor legacy class @mikejolley
  • Ensure all legacy functions exist for 2.6 version
  • Use CRUD in REST api @justinshreve
  • Update variations part of REST API to use the new CRUD work
  • Product Data Stores
  • add wc_get_products wrapper for get_posts (see wc_get_orders) @justinshreve
  • Cats/tags added via product class persist only on save
  • Grouped products; update UI to store children in meta and handle update script.

REVIEW BEFORE MERGE

  • todos
  • Legacy APIs
  • Current API
  • Admin screens/save events for notices
  • Frontend store for notices
  • Verify all tests run (no deprecation notices, etc) @justinshreve

For #11602 and #11604

@mikejolley mikejolley modified the milestone: 2.7 Oct 11, 2016

@mikejolley

This comment has been minimized.

Show comment
Hide comment
@mikejolley

mikejolley Oct 12, 2016

Member

@justinshreve Gonna request your help with this one when you're back. We can chat after your leave.

Member

mikejolley commented Oct 12, 2016

@justinshreve Gonna request your help with this one when you're back. We can chat after your leave.

mikejolley and others added some commits Oct 17, 2016

wc_get_product_term_ids instead of related wording and use in other p…
…laces.

get_the_terms is used here and also handles caching, something
wp_get_post_terms does not.
Clean up the abstract product class a bit, deprecate two functions we…
… have renamed, make update & create work properly, and add some tests for it.
Handle PR feedback: Remove duplicate regular_price update, allow chan…
…ging of post status for products, remove deprecation for get_title since we might still offer it as a function
Merge pull request #12109 from woocommerce/product-crud-update-fields
[Product CRUD] Full Creation & Updating (Abstract)
Merge branch 'product-crud' into product-crud-grouped
# Conflicts:
#	tests/framework/helpers/class-wc-helper-product.php

@mikejolley mikejolley referenced this pull request Nov 11, 2016

Closed

CRUD - Products #11602

@mikejolley mikejolley modified the milestones: [2.7] Sprint - CRUD , 2.7 Nov 11, 2016

mikejolley and others added some commits Nov 11, 2016

Fixed a few fatal errors and warnings in Products CRUD (#12329)
* Fixed a few fatal errors and warnings in Products CRUD

* Fixed sync functions
Add variations CRUD to legacy API (#12331)
* Apply crud to variable products in legacy API v1

* New REST API do not need fallback for default attributes

* Apply variations CRUD to legacy API v2

* Legacy v2 - save default attributes

* Variations in legacy API v2 do not have descriptions

* Fixed legacy API v2 variations params

* Applied variations CRUD to legacy API v3

* Sync before save in legacy apis

* Punc
Products endpoint tweaks (#12354)
* Var type already normalized on CRUD

* Let Product CRUD handle with validation, sanitization and conditional checks

* Set downloads using WC_Product_Download

* Stop try catch exceptions more than one time

* Handle WC_Data_Exception in legacy API

* Complete remove products when fails on creating

* On creating I mean!

* Already have a method to complete delete products

* Fixed standards using WP CodeSniffer

* get_the_terms() returns false when empty

* get_manage_stock returns boolean

@claudiosanches
Product CRUD improvements (#12359)
* args is not used any more - remove todo

* Added test for attributes

* wc_get_price_excluding_tax usage

* parent usage

* Fix rating counts

* Test fixes

* Cleanup after tests

* Make sure status transition code runs even during API calls, not just in admin.

* Default visibility

* Fix attribute setting in API

* Use get name instead of get title

* variation id usage

* Improved cross sell templates

* variation_data

* Grouped product sync

* Notices

* Sync is not needed in API

* Delete

* Rename interfaces

* Update counts in data store
Merge branch 'master' into product-crud
# Conflicts:
#	includes/class-wc-data-store.php
#	woocommerce.php

@mikejolley mikejolley merged commit 76b32c9 into master Nov 16, 2016

0 of 3 checks passed

Scrutinizer Installing Code
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

@claudiosanches claudiosanches deleted the product-crud branch Nov 18, 2016

@surferking surferking referenced this pull request Feb 19, 2018

Closed

Custom order tables + new orders UI #10071

6 of 13 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment