8232b226f7
* Add WC_ADMIN_IMAGES_FOLDER constant * Use WC_ADMIN_IMAGES_FOLDER to construct image URL * Rename WC_ADMIN_IMAGES_FOLDER to WC_ADMIN_IMAGES_FOLDER_URL * Use WC_ADMIN_IMAGES_FOLDER_URL to construct image URLs * Move wcpay-banner.png to client dir * Move wcpay-banner.png to client dir * Use WC_ADMIN_IMAGES_FOLDER_URL for wcAdminAssetUrl * Use WC_ADMIN_IMAGES_FOLDER_URL to construct image URLs * Use WC_ADMIN_IMAGES_FOLDER_URL to construct image URLs * Revert to images * Add / to the path |
||
---|---|---|
.. | ||
beta-features-tracking-modal | ||
marketing-coupons | ||
navigation-opt-out | ||
onboarding-homepage-notice | ||
onboarding-product-import-notice | ||
onboarding-product-notice | ||
onboarding-tax-notice | ||
payment-method-promotions | ||
print-shipping-label-banner | ||
README.md |
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' ) );