Skip to content

Commit

Permalink
v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
seb86 committed Mar 22, 2022
1 parent 4ccefeb commit 5c6a87e
Show file tree
Hide file tree
Showing 5 changed files with 264 additions and 14 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.2.0] - 22nd March 2022

* New: Introduced 5 new functions added in CoCart since 3.2
* New: Introduced 22 new filters added in CoCart since v3.2

## [1.1.0] - 27th July 2021

* New: Introduced 3 new actions added in CoCart v3.1.
* New: Introduced 23 new filters added in CoCart v3.1.
* New: Introduced 3 new actions added in CoCart v3.1
* New: Introduced 23 new filters added in CoCart v3.1

## [1.0.0] - 22nd May 2021

Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<h1 align="center">CoCart - Snippets & Autocomplete <a href="https://github.com/co-cart/co-cart/releases/latest/"><img src="https://img.shields.io/static/v1?goVersion=&message=v1.1.0&label=&color=9a6fc4&style=flat-square"></a></h1>
<h1 align="center">CoCart - Snippets & Autocomplete <a href="https://github.com/co-cart/co-cart/releases/latest/"><img src="https://img.shields.io/static/v1?goVersion=&message=v1.2.0&label=&color=9a6fc4&style=flat-square"></a></h1>

<br>

<p align="center"><img src="https://raw.githubusercontent.com/co-cart/co-cart/master/.github/Logo-1024x534.png.webp" alt="CoCart" /></p>
<p align="center"><img src="https://cocart.xyz/wp-content/uploads/2021/11/cocart-home-default.png.webp" alt="CoCart Logo" /></p>

This extension for Visual Studio Code adds [CoCart](https://cocart.xyz) snippets and autocompletion of functions, classes and hooks.

## Features

Autocomplete for:

CoCart version: 3.1
CoCart version: 3.2

Functions : 8
Functions : 13
Actions : 12
Filters : 139
Filters : 161
Constants : 20

---
Expand All @@ -23,25 +23,25 @@ Autocomplete for:

We have different channels at your disposal where you can find information about the CoCart project, discuss it and get involved:

[![Twitter: cart_co](https://img.shields.io/twitter/follow/cart_co?style=social)](https://twitter.com/cart_co) [![CoCart Github Stars](https://img.shields.io/github/stars/co-cart/cocart-vscode?style=social)](https://github.com/co-cart/cocart-vscode)
[![Twitter: cocartapi](https://img.shields.io/twitter/follow/cocartapi?style=social)](https://twitter.com/cocartapi) [![CoCart Github Stars](https://img.shields.io/github/stars/co-cart/cocart-vscode?style=social)](https://github.com/co-cart/cocart-vscode)

<ul>
<li>📖 <strong>Docs</strong>: this is the place to learn how to build amazing sites with CoCart. <a href="https://docs.cocart.xyz/#getting-started">Get started!</a></li>
<li>👪 <strong>Community</strong>: use our Slack chat room to share any doubts, feedback and meet great people. This is your place too to share <a href="https://cocart.xyz/community/">how are you planning to use CoCart!</a></li>
<li>🐞 <strong>GitHub</strong>: we use GitHub for bugs and pull requests, doubts are solved with the community.</li>
<li>🐦 <strong>Social media</strong>: a more informal place to interact with CoCart users, reach out to us on <a href="https://twitter.com/cart_co">Twitter.</a></li>
<li>🐦 <strong>Social media</strong>: a more informal place to interact with CoCart users, reach out to us on <a href="https://twitter.com/cocartapi">Twitter.</a></li>
<li>💌 <strong>Newsletter</strong>: do you want to receive the latest plugin updates and news? Subscribe <a href="https://twitter.com/cart_co">here.</a></li>
</ul>

## License

[![License](https://img.shields.io/badge/license-GPL--3.0%2B-red.svg)](https://github.com/co-cart/co-cart/blob/master/LICENSE.md)

CoCart is released under [GNU General Public License v3.0](http://www.gnu.org/licenses/gpl-3.0.html).
CoCart - Snippets & Autocomplete is released under [GNU General Public License v3.0](http://www.gnu.org/licenses/gpl-3.0.html).

## Credits

CoCart is developed and maintained by [Sébastien Dumont](https://github.com/seb86).
CoCart - Snippets & Autocomplete is developed and maintained by [Sébastien Dumont](https://github.com/seb86).

---

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "cocart-vscode",
"displayName": "CoCart - Snippets & Autocomplete",
"description": "A collection of CoCart snippets and autocompletions.",
"version": "1.1.0",
"description": "A collection of CoCart snippets and autocompletion.",
"version": "1.2.0",
"publisher": "sebastien-dumont",
"author": {
"name": "Sébastien Dumont"
Expand Down
222 changes: 221 additions & 1 deletion snippets/filters.json
Original file line number Diff line number Diff line change
Expand Up @@ -1388,5 +1388,225 @@
"prefix": "af_cocart_secure_registered_users",
"body": "add_filter( 'cocart_secure_registered_users', ${2:'${1:callback}'}${3} );",
"description": "Filter snippet: cocart_secure_registered_users"
}
},
"cocart_prevent_wc_admin_note_created": {
"prefix": "cocart_prevent_wc_admin_note_created",
"body": "cocart_prevent_wc_admin_note_created",
"description": "Filter allows you to prevent WooCommerce Admin notes by CoCart from being created."
},
"af_cocart_prevent_wc_admin_note_created": {
"prefix": "af_cocart_prevent_wc_admin_note_created",
"body": "add_filter( 'cocart_prevent_wc_admin_note_created', ${2:'${1:callback}'}${3} );",
"description": "Filter allows you to prevent WooCommerce Admin notes by CoCart from being created."
},
"cocart_override_cart_item": {
"prefix": "cocart_override_cart_item",
"body": "cocart_override_cart_item",
"description": "Filter allows developers to override cart item for anything."
},
"af_cocart_override_cart_item": {
"prefix": "af_cocart_override_cart_item",
"body": "add_filter( 'cocart_override_cart_item', ${2:'${1:callback}'}${3}, 10, 2 );",
"description": "Filter allows developers to override cart item for anything."
},
"cocart_add_item_query_parameters": {
"prefix": "cocart_add_item_query_parameters",
"body": "cocart_add_item_query_parameters",
"description": "Filter allows developers to extend the query parameters for adding an item."
},
"af_cocart_add_item_query_parameters": {
"prefix": "af_cocart_add_item_query_parameters",
"body": "add_filter( 'cocart_add_item_query_parameters', ${2:'${1:callback}'}${3} );",
"description": "Filter allows developers to extend the query parameters for adding an item."
},
"cocart_add_items_query_parameters": {
"prefix": "cocart_add_items_query_parameters",
"body": "cocart_add_items_query_parameters",
"description": "Filter allows developers to extend the query parameters for adding an items."
},
"af_cocart_add_items_query_parameters": {
"prefix": "af_cocart_add_items_query_parameters",
"body": "add_filter( 'cocart_add_items_query_parameters', ${2:'${1:callback}'}${3} );",
"description": "Filter allows developers to extend the query parameters for adding an items."
},
"cocart_cart_query_parameters": {
"prefix": "cocart_cart_query_parameters",
"body": "cocart_cart_query_parameters",
"description": "Filter allows developers to extend the query parameters for getting the cart."
},
"af_cocart_cart_query_parameters": {
"prefix": "af_cocart_cart_query_parameters",
"body": "add_filter( 'cocart_cart_query_parameters', ${2:'${1:callback}'}${3} );",
"description": "Filter allows developers to extend the query parameters for getting the cart."
},
"cocart_cart_item_restored_title": {
"prefix": "cocart_cart_item_restored_title",
"body": "cocart_cart_item_restored_title",
"description": "Filter allows developers to change the title of the product restored for the notice."
},
"af_cocart_cart_item_restored_title": {
"prefix": "af_cocart_cart_item_restored_title",
"body": "add_filter( 'cocart_cart_item_restored_title', ${2:'${1:callback}'}${3} );",
"description": "Filter allows developers to change the title of the product restored for the notice."
},
"cocart_cart_item_restored_message": {
"prefix": "cocart_cart_item_restored_message",
"body": "cocart_cart_item_restored_message",
"description": "Filter allows developers to change the message of the restored item notice."
},
"af_cocart_cart_item_restored_message": {
"prefix": "af_cocart_cart_item_restored_message",
"body": "add_filter( 'cocart_cart_item_restored_message', ${2:'${1:callback}'}${3} );",
"description": "Filter allows developers to change the message of the restored item notice."
},
"cocart_cart_updated": {
"prefix": "cocart_cart_updated",
"body": "cocart_cart_updated",
"description": "Filter allows developers to change the message of the restored item notice."
},
"af_cocart_cart_updated": {
"prefix": "af_cocart_cart_updated",
"body": "add_filter( 'cocart_cart_updated', ${2:'${1:callback}'}${3} );",
"description": "Filter allows developers to hook in once the cart has updated."
},
"cocart_cart_item_subtotal_tax": {
"prefix": "cocart_cart_item_subtotal_tax",
"body": "cocart_cart_item_subtotal_tax",
"description": "Filter allows developers to change the item subtotal tax."
},
"af_cocart_cart_item_subtotal_tax": {
"prefix": "af_cocart_cart_item_subtotal_tax",
"body": "add_filter( 'cocart_cart_item_subtotal_tax', ${2:'${1:callback}'}${3} );",
"description": "Filter allows developers to change the item subtotal tax."
},
"cocart_cart_item_total": {
"prefix": "cocart_cart_item_total",
"body": "cocart_cart_item_total",
"description": "Filter allows developers to change the item total."
},
"af_cocart_cart_item_total": {
"prefix": "af_cocart_cart_item_total",
"body": "add_filter( 'cocart_cart_item_total', ${2:'${1:callback}'}${3} );",
"description": "Filter allows developers to change the item total."
},
"cocart_cart_item_tax": {
"prefix": "cocart_cart_item_tax",
"body": "cocart_cart_item_tax",
"description": "Filter allows developers to change the item tax."
},
"af_cocart_cart_item_tax": {
"prefix": "af_cocart_cart_item_tax",
"body": "add_filter( 'cocart_cart_item_tax', ${2:'${1:callback}'}${3} );",
"description": "Filter allows developers to change the item tax."
},
"cocart_update_cart_validation": {
"prefix": "cocart_update_cart_validation",
"body": "cocart_update_cart_validation",
"description": "Filter allows developers to change the validation for updating a specific item in the cart."
},
"af_cocart_update_cart_validation": {
"prefix": "af_cocart_update_cart_validation",
"body": "add_filter( 'cocart_update_cart_validation', ${2:'${1:callback}'}${3} );",
"description": "Filter allows developers to change the validation for updating a specific item in the cart."
},
"cocart_prepare_money_disable_decimals": {
"prefix": "cocart_prepare_money_disable_decimals",
"body": "cocart_prepare_money_disable_decimals",
"description": "Filter allows you to disable the decimals used when returning the monetary value."
},
"af_cocart_prepare_money_disable_decimals": {
"prefix": "af_cocart_prepare_money_disable_decimals",
"body": "add_filter( 'cocart_prepare_money_disable_decimals', ${2:'${1:callback}'}${3} );",
"description": "Filter allows you to disable the decimals used when returning the monetary value."
},
"cocart_quantity_maximum_allowed": {
"prefix": "cocart_quantity_maximum_allowed",
"body": "cocart_quantity_maximum_allowed",
"description": "Filter allows control over the maximum quantity a customer is able to add said item to the cart."
},
"af_cocart_quantity_maximum_allowed": {
"prefix": "af_cocart_quantity_maximum_allowed",
"body": "add_filter( 'cocart_quantity_maximum_allowed', ${2:'${1:callback}'}${3} );",
"description": "Filter allows control over the maximum quantity a customer is able to add said item to the cart."
},
"cocart_quantity_minimum_requirement": {
"prefix": "cocart_quantity_minimum_requirement",
"body": "cocart_quantity_minimum_requirement",
"description": "Filter allows you to specify minimum quantity requirement if not 1."
},
"af_cocart_quantity_minimum_requirement": {
"prefix": "af_cocart_quantity_minimum_requirement",
"body": "add_filter( 'cocart_quantity_minimum_requirement', ${2:'${1:callback}'}${3} );",
"description": "Filter allows you to specify minimum quantity requirement if not 1."
},
"cocart_product_not_enough_stock_message": {
"prefix": "cocart_product_not_enough_stock_message",
"body": "cocart_product_not_enough_stock_message",
"description": "Filter allows you to change the message about product not having enough stock."
},
"af_cocart_product_not_enough_stock_message": {
"prefix": "af_cocart_product_not_enough_stock_message",
"body": "add_filter( 'cocart_product_not_enough_stock_message', ${2:'${1:callback}'}${3} );",
"description": "Filter allows you to change the message about product not having enough stock."
},
"cocart_products_variable_empty_price": {
"prefix": "cocart_products_variable_empty_price",
"body": "cocart_products_variable_empty_price",
"description": "Filter allows you to provide a custom price range for variable products should none exist yet."
},
"af_cocart_products_variable_empty_price": {
"prefix": "af_cocart_products_variable_empty_price",
"body": "add_filter( 'cocart_products_variable_empty_price', ${2:'${1:callback}'}${3} );",
"description": "Filter allows you to provide a custom price range for variable products should none exist yet."
},
"cocart_products_get_price_range": {
"prefix": "cocart_products_get_price_range",
"body": "cocart_products_get_price_range",
"description": "Filter allows you to alter the price range for variable products."
},
"af_cocart_products_get_price_range": {
"prefix": "af_cocart_products_get_price_range",
"body": "add_filter( 'cocart_products_get_price_range', ${2:'${1:callback}'}${3} );",
"description": "Filter allows you to alter the price range for variable products."
},
"cocart_products_add_to_cart_rest_url": {
"prefix": "cocart_products_add_to_cart_rest_url",
"body": "cocart_products_add_to_cart_rest_url",
"description": "Filter allows for quick easy direct access to POST item to cart for other product types."
},
"af_cocart_products_add_to_cart_rest_url": {
"prefix": "af_cocart_products_add_to_cart_rest_url",
"body": "add_filter( 'cocart_products_add_to_cart_rest_url', ${2:'${1:callback}'}${3} );",
"description": "Filter allows for quick easy direct access to POST item to cart for other product types."
},
"cocart_products_category_thumbnail": {
"prefix": "cocart_products_category_thumbnail",
"body": "cocart_products_category_thumbnail",
"description": "Filter allows developers to change the thumbnail ID for product category."
},
"af_cocart_products_category_thumbnail": {
"prefix": "af_cocart_products_category_thumbnail",
"body": "add_filter( 'cocart_products_category_thumbnail', ${2:'${1:callback}'}${3} );",
"description": "Filter allows developers to change the thumbnail ID for product category."
},
"cocart_products_category_thumbnail_size": {
"prefix": "cocart_products_category_thumbnail_size",
"body": "cocart_products_category_thumbnail_size",
"description": "Filter allows developers to change the thumbnail size for product category."
},
"af_cocart_products_category_thumbnail_size": {
"prefix": "af_cocart_products_category_thumbnail_size",
"body": "add_filter( 'cocart_products_category_thumbnail_size', ${2:'${1:callback}'}${3} );",
"description": "Filter allows developers to change the thumbnail size for product category."
},
"cocart_products_category_thumbnail_src": {
"prefix": "cocart_products_category_thumbnail_src",
"body": "cocart_products_category_thumbnail_src",
"description": "Filter allows developers to change the thumbnail src for product category."
},
"af_cocart_products_category_thumbnail_src": {
"prefix": "af_cocart_products_category_thumbnail_src",
"body": "add_filter( 'cocart_products_category_thumbnail_src', ${2:'${1:callback}'}${3} );",
"description": "Filter allows developers to change the thumbnail src for product category."
},
}
25 changes: 25 additions & 0 deletions snippets/functions.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,30 @@
"prefix": "cocart_add_to_cart_message",
"body": "cocart_add_to_cart_message( ${1:products}, ${2:show_qty}, ${3:return} )",
"description": "Add to cart messages."
},
"cocart_task_clear_carts": {
"prefix": "cocart_task_clear_carts",
"body": "cocart_task_clear_carts( ${1:return_results} )",
"description": "Clears all carts from the database."
},
"cocart_task_cleanup_carts": {
"prefix": "cocart_task_cleanup_carts",
"body": "cocart_task_cleanup_carts()",
"description": "Cleans up carts from the database that have expired."
},
"cocart_get_store_currency": {
"prefix": "cocart_get_store_currency",
"body": "cocart_get_store_currency()",
"description": "Prepares a list of store currency data to return in responses."
},
"cocart_prepare_money_response": {
"prefix": "cocart_prepare_money_response",
"body": "cocart_prepare_money_response( ${1:amount}, ${2:decimals}, ${3:rounding_mode} )",
"description": "Convert monetary values from WooCommerce to string based integers, using the smallest unit of a currency."
},
"cocart_prepare_date_response": {
"prefix": "cocart_prepare_date_response",
"body": "cocart_prepare_date_response( ${1:date}, ${2:utc} )",
"description": "Parses and formats a date for ISO8601/RFC3339."
}
}

0 comments on commit 5c6a87e

Please sign in to comment.