Skip to content
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

Release v0.2.0 #96

Merged
merged 45 commits into from
Jul 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
017da8d
initial commit
kidunot89 Jun 24, 2019
5e381c3
initial commit
kidunot89 Jul 1, 2019
bcc2d6d
.travis.yml updated.
kidunot89 Jul 1, 2019
8f89238
Merge branch 'release-v0.2.0' into feature/create-order-mutation
kidunot89 Jul 1, 2019
f5789cc
new hooks added
kidunot89 Jul 1, 2019
7086a45
New input types implemented
kidunot89 Jul 2, 2019
fccf7b9
Placemarker before Order_Mutation refactor
kidunot89 Jul 3, 2019
1b16268
Heavy refactoring done to Order_Mutation class
kidunot89 Jul 4, 2019
a782f4d
autoloader files rebuilt
kidunot89 Jul 4, 2019
acf2643
"Order_Mutation" class and "Order_Create" class refactor complete."
kidunot89 Jul 4, 2019
2f88e47
Order model initialization fixed
kidunot89 Jul 4, 2019
4f84381
Merge pull request #97 from kidunot89/feature/create-order-mutation
kidunot89 Jul 4, 2019
02303ec
"updateOrder" mutation implemented and tested.
kidunot89 Jul 5, 2019
2ea80df
Merge pull request #98 from kidunot89/feature/update-order-mutation
kidunot89 Jul 5, 2019
140b64a
"deleteOrder" mutation implemented and tested.
kidunot89 Jul 5, 2019
c10613c
input field name corrected from "order" to "orderId".
kidunot89 Jul 5, 2019
2ee563d
"forceDelete" input field added for choosing between deletion and rec…
kidunot89 Jul 5, 2019
bb4f5cb
"testDeleteOrderMutation" updated
kidunot89 Jul 5, 2019
fd80867
Authorization hook implemented.
kidunot89 Jul 6, 2019
9cb22dd
More hooks added
kidunot89 Jul 6, 2019
9a8eb46
Merge pull request #99 from kidunot89/feature/delete-order-mutation
kidunot89 Jul 6, 2019
85001f0
"Checkout_Mutation" and "Checkout" class implemented.
kidunot89 Jul 9, 2019
ad82310
crud loader refactored
kidunot89 Jul 9, 2019
97af6e1
tests debugging and code cleanup.
kidunot89 Jul 9, 2019
8535580
Tests updated, debugging needed.
kidunot89 Jul 9, 2019
95d82dd
JWT Auth fields added to "Customer" type. "Customer" added to "checko…
kidunot89 Jul 9, 2019
083adb5
Merge pull request #100 from kidunot89/feature/checkout-mutation
kidunot89 Jul 9, 2019
b810374
"slug" and "sku" arguments added to "productBy" query.
kidunot89 Jul 10, 2019
eccbcba
Merge pull request #101 from kidunot89/bugfix/query-product-by-slug
kidunot89 Jul 10, 2019
c5f86b1
"image" field added to "ProductCategory".
kidunot89 Jul 10, 2019
a47c4d8
Merge branch 'release-v0.2.0' of github.com:wp-graphql/wp-graphql-woo…
kidunot89 Jul 10, 2019
0171ff5
"Actions" class cleaned up and refactored.
kidunot89 Jul 10, 2019
36bf386
"NO_QL_SESSION_HANDLER" flag implemented.
kidunot89 Jul 10, 2019
6f253a8
Merge pull request #102 from kidunot89/feature/product-category-image
kidunot89 Jul 10, 2019
61a72a7
Merge pull request #103 from kidunot89/feature/no-ql-session-handler-…
kidunot89 Jul 10, 2019
6e28061
initial commit
kidunot89 Jul 10, 2019
d6ef041
"deleteOrderItems" implemented and tested.
kidunot89 Jul 10, 2019
5c53b2e
Merge pull request #104 from kidunot89/feature/order-item-mutations
kidunot89 Jul 10, 2019
6e1b0f1
"updateItemQuantity" mutation refactored to "updateItemQuantities" mu…
kidunot89 Jul 11, 2019
ff7b24d
autoloader files rebuilt.
kidunot89 Jul 11, 2019
6406e41
Merge pull request #106 from kidunot89/feature/update-item-quantities
kidunot89 Jul 11, 2019
74bb15f
"Actions" and "Filters" classes renamed and refactored.
kidunot89 Jul 11, 2019
158e7ff
Unnecessary "use" statements removed.
kidunot89 Jul 11, 2019
ead3970
Merge pull request #107 from kidunot89/release-v0.2.0-cleanup
kidunot89 Jul 11, 2019
81735e9
CHANGELOG.md and README.md updated.
kidunot89 Jul 11, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ notifications:
branches:
only:
- develop
- release-v0.1.0
- release-v0.1.1
- release-v0.1.2
- release-v0.2.0

cache:
apt: true
Expand Down
31 changes: 26 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,34 @@
# Change Log

## [v0.1.2-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.1.2-beta) (2019-06-23)
[Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.1.1-beta...v0.1.2-beta)
## [v0.2.0-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.2.0-beta) (2019-07-11)
[Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.1.2-beta...v0.2.0-beta)

**Implemented enhancements:**

- ProductAttribute null key error fixed. [\#91](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/91) ([kidunot89](https://github.com/kidunot89))
- VariationAttribute field "id" updated. [\#89](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/89) ([kidunot89](https://github.com/kidunot89))
- QL Session Handler [\#88](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/88) ([kidunot89](https://github.com/kidunot89))
- Release v0.2.0 code cleanup [\#107](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/107) ([kidunot89](https://github.com/kidunot89))
- updateItemQuantities mutation [\#106](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/106) ([kidunot89](https://github.com/kidunot89))
- deleteOrderItems mutation [\#104](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/104) ([kidunot89](https://github.com/kidunot89))
- Adds NO\_QL\_SESSION\_HANDLER flag [\#103](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/103) ([kidunot89](https://github.com/kidunot89))
- Adds product category image to schema. [\#102](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/102) ([kidunot89](https://github.com/kidunot89))
- Query products by slug and sku [\#101](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/101) ([kidunot89](https://github.com/kidunot89))

**Fixed bugs:**

- Custom attributes of variable products cannot be queried. [\#87](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/87)

**Closed issues:**

- Customer id doesn't match user id [\#90](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/90)

**Merged pull requests:**

- checkout mutation [\#100](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/100) ([kidunot89](https://github.com/kidunot89))
- deleteOrder mutation [\#99](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/99) ([kidunot89](https://github.com/kidunot89))
- updateOrder mutation [\#98](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/98) ([kidunot89](https://github.com/kidunot89))
- createOrder mutation [\#97](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/97) ([kidunot89](https://github.com/kidunot89))

## [v0.1.2-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.1.2-beta) (2019-06-23)
[Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.1.1-beta...v0.1.2-beta)

**Closed issues:**

Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# WPGraphQL WooCommerce
[![Build Status](https://travis-ci.org/wp-graphql/wp-graphql-woocommerce.svg?branch=develop)](https://travis-ci.org/wp-graphql/wp-graphql-woocommerce) [![Coverage Status](https://coveralls.io/repos/github/wp-graphql/wp-graphql-woocommerce/badge.svg?branch=develop)](https://coveralls.io/github/wp-graphql/wp-graphql-woocommerce?branch=develop)

## Note: This plugin is in early stages and is not quite ready for use.

## Quick Install
1. Install & activate [WooCommerce](https://woocommerce.com/)
2. Install & activate [WPGraphQL](https://www.wpgraphql.com/)
Expand All @@ -18,9 +16,7 @@ It adds WooCommerce functionality to the WPGraphQL schema using WooCommerce's [C
- Query product, customers, coupons, order, refund, product variations.

## Upcoming Features
- Adminstrator mutations. Eg. Creating and deleting products, coupons, orders and refunds
- Public/Customer mutations, Eg. Manipulating the cart and checking out.
View [Roadmap](https://github.com/wp-graphql/wp-graphql-woocommerce/projects/1) to see progress...
- Adminstrator mutations. Eg. Creating and deleting products, coupons, and refunds.

## Playground
Feel free to test out the extension using the [playground](https://docs.wpgraphql.com/extensions/wpgraphql-woocommerce/). The playground allows you to execute queries and mutations, as well as view the schema.
Expand Down
2 changes: 2 additions & 0 deletions bin/install-wp-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ setup_woocommerce() {
wp plugin install wordpress-importer --activate
echo "Installing & Activating WooCommerce"
wp plugin install woocommerce --activate
echo "Upgrading database"
wp wc update
}

setup_wpgraphql() {
Expand Down
41 changes: 41 additions & 0 deletions class-inflect.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,45 @@ public static function pluralize_if( $count, $string ) {

return $count . ' ' . self::pluralize( $string );
}

/**
* Converts a camel case formatted string to a underscore formatted string.
*
* @param string $string String to be formatted.
* @param boolean $capitalize Capitalize first letter of string.
*
* @return string
*/
public static function underscore_to_camel_case( $string, $capitalize = false ) {
$str = str_replace( ' ', '', ucwords( str_replace( '-', ' ', $string ) ) );

if ( ! $capitalize ) {
$str[0] = strtolower( $str[0] );
}

return $str;
}

/**
* Converts a camel case formatted string to a underscore formatted string.
*
* @param string $string String to be formatted.
*
* @return string
*/
public static function camel_case_to_underscore( $string ) {
preg_match_all(
'!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!',
$string,
$matches
);

$ret = $matches[0];

foreach ( $ret as &$match ) {
$match = strtoupper( $match ) === $match ? strtolower( $match ) : lcfirst( $match );
}

return implode( '_', $ret );
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "wp-graphql/wp-graphql-woocommerce",
"description": "WooCommerce bindings for wp-graphql",
"version": "0.1.2",
"version": "0.2.0",
"type": "wordpress-plugin",
"keywords": [
"wordpress",
Expand Down
157 changes: 0 additions & 157 deletions includes/class-actions.php

This file was deleted.

Loading