From 26c10932e55d9d41db5adeac2a35c6f8f5a351f0 Mon Sep 17 00:00:00 2001 From: Maria Fernanda Magallanes Zubillaga Date: Thu, 4 Apr 2024 16:51:14 -0500 Subject: [PATCH] fix: revert the change of the namespace --- admin/class-openedx-commerce-admin.php | 10 +++++----- ...class-openedx-commerce-enrollment-info-form.php | 6 +++--- admin/views/class-openedx-commerce-settings.php | 4 ++-- composer.json | 14 +++++++------- includes/class-openedx-commerce-activator.php | 2 +- includes/class-openedx-commerce-deactivator.php | 2 +- includes/class-openedx-commerce-i18n.php | 2 +- includes/class-openedx-commerce-loader.php | 2 +- includes/class-openedx-commerce.php | 10 +++++----- .../model/class-openedx-commerce-api-calls.php | 2 +- .../model/class-openedx-commerce-enrollment.php | 10 +++++----- includes/model/class-openedx-commerce-log.php | 2 +- .../model/class-openedx-commerce-post-type.php | 2 +- openedx-commerce.php | 8 ++++---- public/class-openedx-commerce-public.php | 2 +- test/class-enrollment-test.php | 8 ++++---- utils/openedx-utils.php | 2 +- 17 files changed, 44 insertions(+), 44 deletions(-) diff --git a/admin/class-openedx-commerce-admin.php b/admin/class-openedx-commerce-admin.php index dbe22042..f67b49a5 100644 --- a/admin/class-openedx-commerce-admin.php +++ b/admin/class-openedx-commerce-admin.php @@ -9,12 +9,12 @@ * @since 1.0.0 */ -namespace OpenedX_Commerce\admin; +namespace OpenedXCommerce\admin; -use OpenedX_Commerce\model\Openedx_Commerce_Enrollment; -use OpenedX_Commerce\model\Openedx_Commerce_Post_Type; -use OpenedX_Commerce\admin\views\Openedx_Commerce_Enrollment_Info_Form; -use OpenedX_Commerce\utils; +use OpenedXCommerce\model\Openedx_Commerce_Enrollment; +use OpenedXCommerce\model\Openedx_Commerce_Post_Type; +use OpenedXCommerce\admin\views\Openedx_Commerce_Enrollment_Info_Form; +use OpenedXCommerce\utils; /** diff --git a/admin/views/class-openedx-commerce-enrollment-info-form.php b/admin/views/class-openedx-commerce-enrollment-info-form.php index 92a46f85..e9c2b028 100644 --- a/admin/views/class-openedx-commerce-enrollment-info-form.php +++ b/admin/views/class-openedx-commerce-enrollment-info-form.php @@ -8,10 +8,10 @@ * @since 1.0.0 */ -namespace OpenedX_Commerce\admin\views; +namespace OpenedXCommerce\admin\views; -use OpenedX_Commerce\model\Openedx_Commerce_Log; -use OpenedX_Commerce\utils; +use OpenedXCommerce\model\Openedx_Commerce_Log; +use OpenedXCommerce\utils; if ( ! defined( 'ABSPATH' ) ) { exit; diff --git a/admin/views/class-openedx-commerce-settings.php b/admin/views/class-openedx-commerce-settings.php index 518c8cf2..e29d2373 100644 --- a/admin/views/class-openedx-commerce-settings.php +++ b/admin/views/class-openedx-commerce-settings.php @@ -8,9 +8,9 @@ * @since 1.6.0 */ -namespace OpenedX_Commerce\admin\views; +namespace OpenedXCommerce\admin\views; -use OpenedX_Commerce\model\Openedx_Commerce_Api_Calls; +use OpenedXCommerce\model\Openedx_Commerce_Api_Calls; use DateTime; use DateInterval; diff --git a/composer.json b/composer.json index a5824c4e..83dc14f1 100644 --- a/composer.json +++ b/composer.json @@ -29,13 +29,13 @@ "test/" ], "psr-4": { - "OpenedX_Commerce\\": "includes/", - "OpenedX_Commerce\\model\\": "includes/model/", - "OpenedX_Commerce\\admin\\": "admin/", - "OpenedX_Commerce\\admin\\views\\": "admin/views/", - "OpenedX_Commerce\\public\\": "public/", - "OpenedX_Commerce\\utils\\": "utils/", - "OpenedX_Commerce\\tests\\": "test/" + "OpenedXCommerce\\": "includes/", + "OpenedXCommerce\\model\\": "includes/model/", + "OpenedXCommerce\\admin\\": "admin/", + "OpenedXCommerce\\admin\\views\\": "admin/views/", + "OpenedXCommerce\\public\\": "public/", + "OpenedXCommerce\\utils\\": "utils/", + "OpenedXCommerce\\tests\\": "test/" } }, "require": { diff --git a/includes/class-openedx-commerce-activator.php b/includes/class-openedx-commerce-activator.php index 795534ff..384a1e31 100644 --- a/includes/class-openedx-commerce-activator.php +++ b/includes/class-openedx-commerce-activator.php @@ -9,7 +9,7 @@ * @subpackage Openedx_Commerce/includes */ -namespace OpenedX_Commerce; +namespace OpenedXCommerce; /** * Fired during plugin activation. diff --git a/includes/class-openedx-commerce-deactivator.php b/includes/class-openedx-commerce-deactivator.php index 48b32fdb..c9ceb198 100644 --- a/includes/class-openedx-commerce-deactivator.php +++ b/includes/class-openedx-commerce-deactivator.php @@ -9,7 +9,7 @@ * @subpackage Openedx_Commerce/includes */ -namespace OpenedX_Commerce; +namespace OpenedXCommerce; /** * Fired during plugin deactivation. diff --git a/includes/class-openedx-commerce-i18n.php b/includes/class-openedx-commerce-i18n.php index 035ba209..19d9f73c 100644 --- a/includes/class-openedx-commerce-i18n.php +++ b/includes/class-openedx-commerce-i18n.php @@ -12,7 +12,7 @@ * @subpackage Openedx_Commerce/includes */ -namespace OpenedX_Commerce; +namespace OpenedXCommerce; /** * Define the internationalization functionality. diff --git a/includes/class-openedx-commerce-loader.php b/includes/class-openedx-commerce-loader.php index 287f06cd..59f0c6b8 100644 --- a/includes/class-openedx-commerce-loader.php +++ b/includes/class-openedx-commerce-loader.php @@ -9,7 +9,7 @@ * @subpackage Openedx_Commerce/includes */ -namespace OpenedX_Commerce; +namespace OpenedXCommerce; /** * Register all actions and filters for the plugin. diff --git a/includes/class-openedx-commerce.php b/includes/class-openedx-commerce.php index 6f3a5c09..6a025e1e 100644 --- a/includes/class-openedx-commerce.php +++ b/includes/class-openedx-commerce.php @@ -14,12 +14,12 @@ * @author eduNEXT */ -namespace OpenedX_Commerce; +namespace OpenedXCommerce; -use OpenedX_Commerce\admin\Openedx_Commerce_Admin; -use OpenedX_Commerce\public\Openedx_Commerce_Public; -use OpenedX_Commerce\admin\views\Openedx_Commerce_Settings; -use OpenedX_Commerce\model\Openedx_Commerce_Enrollment; +use OpenedXCommerce\admin\Openedx_Commerce_Admin; +use OpenedXCommerce\public\Openedx_Commerce_Public; +use OpenedXCommerce\admin\views\Openedx_Commerce_Settings; +use OpenedXCommerce\model\Openedx_Commerce_Enrollment; /** * This class contains the function to register a new custom post type. diff --git a/includes/model/class-openedx-commerce-api-calls.php b/includes/model/class-openedx-commerce-api-calls.php index e029ec73..58b53ea4 100644 --- a/includes/model/class-openedx-commerce-api-calls.php +++ b/includes/model/class-openedx-commerce-api-calls.php @@ -9,7 +9,7 @@ * @since 1.6.0 */ -namespace OpenedX_Commerce\model; +namespace OpenedXCommerce\model; require_once plugin_dir_path( dirname( __DIR__ ) ) . 'vendor/autoload.php'; use DateTime; diff --git a/includes/model/class-openedx-commerce-enrollment.php b/includes/model/class-openedx-commerce-enrollment.php index b65930e8..7d6fda6e 100644 --- a/includes/model/class-openedx-commerce-enrollment.php +++ b/includes/model/class-openedx-commerce-enrollment.php @@ -10,12 +10,12 @@ * @since 1.0.0 */ -namespace OpenedX_Commerce\model; +namespace OpenedXCommerce\model; -use OpenedX_Commerce\model\Openedx_Commerce_Log; -use OpenedX_Commerce\Openedx_Commerce; -use OpenedX_Commerce\admin\Openedx_Commerce_Admin; -use OpenedX_Commerce\model\Openedx_Commerce_Api_Calls; +use OpenedXCommerce\model\Openedx_Commerce_Log; +use OpenedXCommerce\Openedx_Commerce; +use OpenedXCommerce\admin\Openedx_Commerce_Admin; +use OpenedXCommerce\model\Openedx_Commerce_Api_Calls; if ( ! defined( 'ABSPATH' ) ) { exit; diff --git a/includes/model/class-openedx-commerce-log.php b/includes/model/class-openedx-commerce-log.php index d401588d..ec219c0f 100644 --- a/includes/model/class-openedx-commerce-log.php +++ b/includes/model/class-openedx-commerce-log.php @@ -9,7 +9,7 @@ * @since 1.4.0 */ -namespace OpenedX_Commerce\model; +namespace OpenedXCommerce\model; if ( ! defined( 'ABSPATH' ) ) { exit; diff --git a/includes/model/class-openedx-commerce-post-type.php b/includes/model/class-openedx-commerce-post-type.php index eb373176..a5ad61d8 100644 --- a/includes/model/class-openedx-commerce-post-type.php +++ b/includes/model/class-openedx-commerce-post-type.php @@ -8,7 +8,7 @@ * @since 1.0.0 */ -namespace OpenedX_Commerce\model; +namespace OpenedXCommerce\model; if ( ! defined( 'ABSPATH' ) ) { exit; diff --git a/openedx-commerce.php b/openedx-commerce.php index 9658b4f0..14c201e5 100644 --- a/openedx-commerce.php +++ b/openedx-commerce.php @@ -13,14 +13,14 @@ * Requires at least: 6.3 * Requires PHP: 8.0 * - * @package OpenedX_Commerce + * @package Openedx_Commerce * * @wordpress-plugin */ -use OpenedX_Commerce\Openedx_Commerce_Activator; -use OpenedX_Commerce\Openedx_Commerce_Deactivator; -use OpenedX_Commerce\Openedx_Commerce; +use OpenedXCommerce\Openedx_Commerce_Activator; +use OpenedXCommerce\Openedx_Commerce_Deactivator; +use OpenedXCommerce\Openedx_Commerce; // If this file is called directly, abort. if ( ! defined( 'WPINC' ) ) { diff --git a/public/class-openedx-commerce-public.php b/public/class-openedx-commerce-public.php index da3b7e22..36cb6916 100644 --- a/public/class-openedx-commerce-public.php +++ b/public/class-openedx-commerce-public.php @@ -9,7 +9,7 @@ * @subpackage Openedx_Commerce/public */ -namespace OpenedX_Commerce\public; +namespace OpenedXCommerce\public; /** * The public-facing functionality of the plugin. diff --git a/test/class-enrollment-test.php b/test/class-enrollment-test.php index 034d81c6..68664a23 100644 --- a/test/class-enrollment-test.php +++ b/test/class-enrollment-test.php @@ -6,11 +6,11 @@ * @subpackage openedx-commerce/tests */ -namespace OpenedX_Commerce\tests; +namespace OpenedXCommerce\tests; -use OpenedX_Commerce\model\Openedx_Commerce_Enrollment; -use OpenedX_Commerce\model\Openedx_Commerce_Post_Type; -use OpenedX_Commerce\admin\Openedx_Commerce_Admin; +use OpenedXCommerce\model\Openedx_Commerce_Enrollment; +use OpenedXCommerce\model\Openedx_Commerce_Post_Type; +use OpenedXCommerce\admin\Openedx_Commerce_Admin; use PHPUnit\Framework\TestCase; /** diff --git a/utils/openedx-utils.php b/utils/openedx-utils.php index 955db8ac..eb641c8d 100644 --- a/utils/openedx-utils.php +++ b/utils/openedx-utils.php @@ -6,7 +6,7 @@ * @since 1.6.0 */ -namespace OpenedX_Commerce\utils; +namespace OpenedXCommerce\utils; /** * Enrollment Request mode options.