From 4b5f8ec6b483db818509fbb217ff9e25101b05c7 Mon Sep 17 00:00:00 2001 From: Maria Fernanda Magallanes Zubillaga Date: Tue, 3 Sep 2024 11:07:25 -0500 Subject: [PATCH 1/3] fix: remove unused scripts and styles --- .../views/class-openedx-commerce-enrollment-info-form.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/admin/views/class-openedx-commerce-enrollment-info-form.php b/admin/views/class-openedx-commerce-enrollment-info-form.php index 92a46f8..23e8ef9 100644 --- a/admin/views/class-openedx-commerce-enrollment-info-form.php +++ b/admin/views/class-openedx-commerce-enrollment-info-form.php @@ -227,10 +227,6 @@ public function render_enrollment_info_form( $post ) { - - log_manager->get_logs( $post_id ); ?> -
Date: Tue, 3 Sep 2024 11:32:55 -0500 Subject: [PATCH 2/3] fix: stop using an empty enqueued script in all contexts --- public/class-openedx-commerce-public.php | 2 -- public/js/openedx-commerce-public.js | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/class-openedx-commerce-public.php b/public/class-openedx-commerce-public.php index 9dec0b5..1ac52b7 100644 --- a/public/class-openedx-commerce-public.php +++ b/public/class-openedx-commerce-public.php @@ -90,7 +90,5 @@ public function enqueue_scripts() { * between the defined hooks and the functions defined in this * class. */ - - wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/openedx-commerce-public.js', array( 'jquery' ), $this->version, false ); } } diff --git a/public/js/openedx-commerce-public.js b/public/js/openedx-commerce-public.js index 071048d..39a35e1 100644 --- a/public/js/openedx-commerce-public.js +++ b/public/js/openedx-commerce-public.js @@ -27,6 +27,10 @@ * single DOM-ready or window-load handler for a particular page. * Although scripts in the WordPress core, Plugins and Themes may be * practising this, we should strive to set a better example in our own work. + * + * + * Note: This file is not queued; you must queue it if you want to add styles here. + * For more information on why we dequeued this file, see https://github.com/openedx/openedx-wordpress-ecommerce/pull/91. */ })( jQuery ); From c51093319c7a22cb5644dd59b31d295808b5ad80 Mon Sep 17 00:00:00 2001 From: Maria Fernanda Magallanes Zubillaga Date: Tue, 3 Sep 2024 15:02:49 -0500 Subject: [PATCH 3/3] docs: change style by script in doc --- public/js/openedx-commerce-public.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/openedx-commerce-public.js b/public/js/openedx-commerce-public.js index 39a35e1..ec6b086 100644 --- a/public/js/openedx-commerce-public.js +++ b/public/js/openedx-commerce-public.js @@ -29,7 +29,7 @@ * practising this, we should strive to set a better example in our own work. * * - * Note: This file is not queued; you must queue it if you want to add styles here. + * Note: This file is not queued; you must queue it if you want to add scripts here. * For more information on why we dequeued this file, see https://github.com/openedx/openedx-wordpress-ecommerce/pull/91. */