From 87923a66cc5e5afbf6196648214885f2c4479366 Mon Sep 17 00:00:00 2001 From: cleissonbr Date: Mon, 19 Jul 2021 03:41:42 -0300 Subject: [PATCH 1/8] add functions --- snippets/functions.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/snippets/functions.json b/snippets/functions.json index 628ed2d..7df48b2 100644 --- a/snippets/functions.json +++ b/snippets/functions.json @@ -2943,5 +2943,15 @@ "prefix": "wc_importer_wordpress_mappings", "body": "wc_importer_wordpress_mappings( ${1:mappings} )", "description": "Add mappings for WordPress tables." + }, + "woocommerce_widget_shopping_cart_subtotal": { + "prefix": "woocommerce_widget_shopping_cart_subtotal", + "body": "woocommerce_widget_shopping_cart_subtotal()", + "description": "Output to view cart subtotal." + }, + "wc_translate_user_roles": { + "prefix": "wc_translate_user_roles", + "body": "wc_translate_user_roles( ${1:translation}, ${2:text}, ${3:context}, ${4:domain} )", + "description": "Translate WC roles using the woocommerce textdomain." } } \ No newline at end of file From cdd499fa1c3621c9868a0c9ed676a00a4b2433b5 Mon Sep 17 00:00:00 2001 From: cleissonbr Date: Mon, 19 Jul 2021 03:49:45 -0300 Subject: [PATCH 2/8] add new parameter to wc_add_notice version 3.9.0 --- snippets/functions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/functions.json b/snippets/functions.json index 7df48b2..fb8e9eb 100644 --- a/snippets/functions.json +++ b/snippets/functions.json @@ -1201,7 +1201,7 @@ }, "wc_add_notice": { "prefix": "wc_add_notice", - "body": "wc_add_notice( ${1:message}${2:, ${3:notice_type}} )", + "body": "wc_add_notice( ${1:message}${2:, ${3:notice_type}}${4:, ${5:data}} )", "description": "Add and store a notice." }, "wc_set_notices": { From 5efb9c78711d2d1cf7a8259814bb17418071eb2b Mon Sep 17 00:00:00 2001 From: cleissonbr Date: Mon, 19 Jul 2021 03:52:40 -0300 Subject: [PATCH 3/8] add new parameter to wc_print_notice version 3.9.0 --- snippets/functions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/functions.json b/snippets/functions.json index fb8e9eb..7e0a3f9 100644 --- a/snippets/functions.json +++ b/snippets/functions.json @@ -1221,7 +1221,7 @@ }, "wc_print_notice": { "prefix": "wc_print_notice", - "body": "wc_print_notice( ${1:message}${2:, ${3:notice_type}} )", + "body": "wc_print_notice( ${1:message}${2:, ${3:notice_type}}${4:, ${5:data}} )", "description": "Print a single notice immediately." }, "wc_get_notices": { From b462f088f3cf54a91c072ca254326dda4fc183cb Mon Sep 17 00:00:00 2001 From: cleissonbr Date: Mon, 19 Jul 2021 04:00:46 -0300 Subject: [PATCH 4/8] new parameter to wc_placeholder_img version 3.6.0 --- snippets/functions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/functions.json b/snippets/functions.json index 7e0a3f9..499133c 100644 --- a/snippets/functions.json +++ b/snippets/functions.json @@ -1521,7 +1521,7 @@ }, "wc_placeholder_img": { "prefix": "wc_placeholder_img", - "body": "wc_placeholder_img( ${1:size} )", + "body": "wc_placeholder_img( ${1:size}${2:, ${3:attr}} )", "description": "Get the placeholder image." }, "wc_get_formatted_variation": { From a3ff13d8143e8be341566f843913a67662c0f71e Mon Sep 17 00:00:00 2001 From: cleissonbr Date: Mon, 19 Jul 2021 04:06:59 -0300 Subject: [PATCH 5/8] add new parameter to wc_setcookie version 3.6.0 --- snippets/functions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/functions.json b/snippets/functions.json index 499133c..ab225c9 100644 --- a/snippets/functions.json +++ b/snippets/functions.json @@ -516,7 +516,7 @@ }, "wc_setcookie": { "prefix": "wc_setcookie", - "body": "wc_setcookie( ${1:name}, ${2:value}${3:, ${4:expire}${5:, ${6:secure}}} )", + "body": "wc_setcookie( ${1:name}, ${2:value}${3:, ${4:expire}${5:, ${6:secure}}${7:, ${8:httponly}}} )", "description": "Set a cookie - wrapper for setcookie using WP constants." }, "get_woocommerce_api_url": { From 2bb06e4baf1525899af9cf06245302b8b0557c41 Mon Sep 17 00:00:00 2001 From: cleissonbr Date: Mon, 19 Jul 2021 04:16:10 -0300 Subject: [PATCH 6/8] update wc_load_webhooks last version --- snippets/functions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/functions.json b/snippets/functions.json index ab225c9..532dfb1 100644 --- a/snippets/functions.json +++ b/snippets/functions.json @@ -2841,7 +2841,7 @@ }, "wc_load_webhooks": { "prefix": "wc_load_webhooks", - "body": "wc_load_webhooks()", + "body": "wc_load_webhooks( ${1:status}${2:, ${3:topic}} )", "description": "Load webhooks." }, "wc_get_webhook": { From 06d97b860ffa06a41b95577423b2a3b4ee58de83 Mon Sep 17 00:00:00 2001 From: cleissonbr Date: Mon, 19 Jul 2021 04:20:13 -0300 Subject: [PATCH 7/8] new parameter wc_get_shipping_method_count 4.3.0 --- snippets/functions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/functions.json b/snippets/functions.json index 532dfb1..b26465e 100644 --- a/snippets/functions.json +++ b/snippets/functions.json @@ -651,7 +651,7 @@ }, "wc_get_shipping_method_count": { "prefix": "wc_get_shipping_method_count", - "body": "wc_get_shipping_method_count( ${1:include_legacy} )", + "body": "wc_get_shipping_method_count( ${1:include_legacy}${2:, ${3:enabled_only}} )", "description": "Gets number of shipping methods currently enabled. Used to identify if" }, "wc_set_time_limit": { From ac030b7b516376a8bb99b6f41e9e3a93c860a540 Mon Sep 17 00:00:00 2001 From: cleissonbr Date: Mon, 19 Jul 2021 04:22:01 -0300 Subject: [PATCH 8/8] fix description of wc_get_shipping_method_count --- snippets/functions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/functions.json b/snippets/functions.json index b26465e..1aa238e 100644 --- a/snippets/functions.json +++ b/snippets/functions.json @@ -652,7 +652,7 @@ "wc_get_shipping_method_count": { "prefix": "wc_get_shipping_method_count", "body": "wc_get_shipping_method_count( ${1:include_legacy}${2:, ${3:enabled_only}} )", - "description": "Gets number of shipping methods currently enabled. Used to identify if" + "description": "Gets number of shipping methods currently enabled. Used to identify if shipping is configured" }, "wc_set_time_limit": { "prefix": "wc_set_time_limit",