woocommerce/plugins/woocommerce-admin/client/wp-admin-scripts
Nathan Silveira 121bfe3a29
Add tracks event for "View product" and dismiss action after update (#35582)
* Record an event 'product_view_product_click' when the 'View Product' link is clicked after creating or updating a product

* Add product_view_product_dismiss tracks events (WIP, not currently working)

* Add changelog

* Fix whitespace in addEventListener and remove console.logs

* Change link tag id to be more specific and comply with CSS guidelines
Move HTML code out of translation function

* Run phpcs in class-wc-admin-post-types

* Add tinyMCE types to add global tinymce variable in typescript code

* Add additional data in getProductData

TODO: I'm not sure if it's possible, or if it makes sense, to include stock_quantity_update in the object

* Add code review suggestions, including:

* Create isElementVisible function to backfill jQuery implementation
* Fix wrong value for is_downloadable, is_virtual, manage_stock
* Fix wrong radix
* Update menu_order implementation
* Add missing ? to weight

* Add stock_quantity_update implementation which is not working as intended

Since the page reloads after product update, the initialStockValue is updated as well

* Remove stock_quantity_update property and adjust is_downloadable, is_virtual, and manage_stock for consistency
2022-11-28 22:01:10 -03:00
..
add-term-tracking Add initial tracking for categories, tags, and attribute product pages (#33118) 2022-05-30 13:14:25 -03:00
attributes-tracking Add initial tracking for categories, tags, and attribute product pages (#33118) 2022-05-30 13:14:25 -03:00
beta-features-tracking-modal Codemod to change i18n text domain from 'woocommerce-admin' to 'woocommerce' in WCA Client 2022-04-01 11:41:32 +08:00
category-tracking Add initial tracking for categories, tags, and attribute product pages (#33118) 2022-05-30 13:14:25 -03:00
marketing-coupons Add Coupon feature (https://github.com/woocommerce/woocommerce-admin/pull/4526) 2020-06-16 12:00:41 +09:30
navigation-opt-out Codemod to change i18n text domain from 'woocommerce-admin' to 'woocommerce' in WCA Client 2022-04-01 11:41:32 +08:00
onboarding-homepage-notice Add product form buttons and specific product edit page (#34211) 2022-08-11 11:04:14 -03:00
onboarding-load-sample-products-notice Set up i18n-text-domain rule and fix missing text domain (#33780) 2022-07-08 18:37:30 +08:00
onboarding-product-import-notice Codemod to change i18n text domain from 'woocommerce-admin' to 'woocommerce' in WCA Client 2022-04-01 11:41:32 +08:00
onboarding-product-notice Codemod to change i18n text domain from 'woocommerce-admin' to 'woocommerce' in WCA Client 2022-04-01 11:41:32 +08:00
onboarding-tax-notice Codemod to change i18n text domain from 'woocommerce-admin' to 'woocommerce' in WCA Client 2022-04-01 11:41:32 +08:00
payment-method-promotions Fix JS lint errors (#33484) 2022-06-21 16:37:34 +08:00
print-shipping-label-banner Style fix for the print shipping banner close modal (#33587) 2022-06-30 14:05:00 -07:00
product-tour dev: move guided tours into consolidated folder (#34279) 2022-08-12 09:49:18 +08:00
product-tracking Add tracks event for "View product" and dismiss action after update (#35582) 2022-11-28 22:01:10 -03:00
tags-tracking Add initial tracking for categories, tags, and attribute product pages (#33118) 2022-05-30 13:14:25 -03:00
wc-addons-tour Feature: Add the In-App Marketplace Tour (#35278) 2022-11-15 11:12:17 +01:00
README.md Onboarding: Add return to task list after saving taxes (https://github.com/woocommerce/woocommerce-admin/pull/3170) 2019-11-07 08:17:46 +08:00

README.md

Scripts located in this directory are meant to be loaded on wp-admin pages outside the context of WooCommerce Admin, such as the post editor. Adding the script name to wpAdminScripts in the Webpack config will automatically build these scripts.

Scripts must be manually enqueued with any neccessary dependencies. For example, onboarding-homepage-notice uses the WooCommerce navigation package:

wp_enqueue_script( 'onboarding-homepage-notice', Loader::get_url( 'wp-scripts/onboarding-homepage-notice.js' ), array( 'wc-navigation' ) );