Skip to content

Commit

Permalink
Merge pull request #96 from wp-graphql/release-v0.2.0
Browse files Browse the repository at this point in the history
Release v0.2.0
  • Loading branch information
kidunot89 authored Jul 11, 2019
2 parents f96a71b + 81735e9 commit 4aedd90
Show file tree
Hide file tree
Showing 78 changed files with 5,042 additions and 601 deletions.
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

0 comments on commit 4aedd90

Please sign in to comment.