From ce05bbcfd932f12625aa7b2ddef53dccc0c8c479 Mon Sep 17 00:00:00 2001 From: Maria Fernanda Magallanes Zubillaga Date: Wed, 1 Nov 2023 20:14:12 -0500 Subject: [PATCH] fix: change data base names --- .github/workflows/continuous-integration.yml | 4 +-- ...-openedx-commerce-enrollment-info-form.php | 28 +++++++++---------- includes/class-openedx-commerce-i18n.php | 2 +- .../class-openedx-commerce-api-calls.php | 2 +- .../class-openedx-commerce-enrollment.php | 12 ++++---- .../class-openedx-commerce-post-type.php | 18 ++++++------ utils/openedx-utils.php | 14 +++++----- 7 files changed, 40 insertions(+), 40 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index c5212759..df73d389 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -94,7 +94,7 @@ jobs: uses: thedoctor0/zip-release@0.7.1 with: type: 'zip' - filename: 'openedx-woocommerce-plugin.zip' + filename: 'openedx-commerce.zip' exclusions: '*.git*' - name: Create a GitHub release @@ -104,4 +104,4 @@ jobs: tag: ${{ steps.tag_version.outputs.new_tag }} name: Release ${{ steps.tag_version.outputs.new_tag }} body: ${{ steps.tag_version.outputs.changelog }} - artifacts: "openedx-woocommerce-plugin.zip" + artifacts: "openedx-commerce.zip" diff --git a/admin/views/class-openedx-commerce-enrollment-info-form.php b/admin/views/class-openedx-commerce-enrollment-info-form.php index a00ff01d..ff171850 100644 --- a/admin/views/class-openedx-commerce-enrollment-info-form.php +++ b/admin/views/class-openedx-commerce-enrollment-info-form.php @@ -113,7 +113,7 @@ public function render_enrollment_info_form( $post ) { ?> > ? - + @@ -123,8 +123,8 @@ public function render_enrollment_info_form( $post ) { ? - - + + @@ -138,7 +138,7 @@ public function render_enrollment_info_form( $post ) { ? - + @@ -157,7 +157,7 @@ public function render_enrollment_info_form( $post ) { ?> > ? - + @@ -192,31 +192,31 @@ public function render_enrollment_info_form( $post ) { ?> ? - + - + ? - + - + ? - + - + - + diff --git a/includes/class-openedx-commerce-i18n.php b/includes/class-openedx-commerce-i18n.php index 5b285d89..40bca342 100644 --- a/includes/class-openedx-commerce-i18n.php +++ b/includes/class-openedx-commerce-i18n.php @@ -36,7 +36,7 @@ class Openedx_Commerce_I18n { public function load_plugin_textdomain() { load_plugin_textdomain( - 'openedx-woocommerce-plugin', + 'openedx-commerce', false, dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/' ); diff --git a/includes/model/class-openedx-commerce-api-calls.php b/includes/model/class-openedx-commerce-api-calls.php index dcf70ab3..dc9604d0 100644 --- a/includes/model/class-openedx-commerce-api-calls.php +++ b/includes/model/class-openedx-commerce-api-calls.php @@ -435,7 +435,7 @@ public function get_enrollment_process_body( $enrollment_data, $use_old_endpoint ), 'enrollment_attributes' => array( array( - 'namespace' => 'openedx-woocommerce-plugin', + 'namespace' => 'openedx-commerce', 'name' => 'message', 'value' => 'Enrollment request response.', ), diff --git a/includes/model/class-openedx-commerce-enrollment.php b/includes/model/class-openedx-commerce-enrollment.php index 4872ca4e..e641d95b 100644 --- a/includes/model/class-openedx-commerce-enrollment.php +++ b/includes/model/class-openedx-commerce-enrollment.php @@ -148,7 +148,7 @@ public function register_status() { register_post_status( 'enrollment-success', array( - 'label' => __( 'Success', 'wp-openedx-woocommerce-plugin' ), + 'label' => __( 'Success', 'wp-openedx-commerce' ), 'public' => false, 'internal' => true, 'private' => true, @@ -156,13 +156,13 @@ public function register_status() { 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, // translators: %s: number of items. - 'label_count' => _n_noop( 'Success (%s)', 'Success (%s)', 'wp-openedx-woocommerce-plugin' ), + 'label_count' => _n_noop( 'Success (%s)', 'Success (%s)', 'wp-openedx-commerce' ), ) ); register_post_status( 'enrollment-pending', array( - 'label' => __( 'Pending', 'wp-openedx-woocommerce-plugin' ), + 'label' => __( 'Pending', 'wp-openedx-commerce' ), 'public' => false, 'internal' => true, 'private' => true, @@ -170,13 +170,13 @@ public function register_status() { 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, // translators: %s: number of items. - 'label_count' => _n_noop( 'Pending (%s)', 'Pending (%s)', 'wp-openedx-woocommerce-plugin' ), + 'label_count' => _n_noop( 'Pending (%s)', 'Pending (%s)', 'wp-openedx-commerce' ), ) ); register_post_status( 'enrollment-error', array( - 'label' => __( 'Error', 'wp-openedx-woocommerce-plugin' ), + 'label' => __( 'Error', 'wp-openedx-commerce' ), 'public' => false, 'internal' => true, 'private' => true, @@ -184,7 +184,7 @@ public function register_status() { 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, // translators: %s: number of items. - 'label_count' => _n_noop( 'Error (%s)', 'Error (%s)', 'wp-openedx-woocommerce-plugin' ), + 'label_count' => _n_noop( 'Error (%s)', 'Error (%s)', 'wp-openedx-commerce' ), ) ); } diff --git a/includes/model/class-openedx-commerce-post-type.php b/includes/model/class-openedx-commerce-post-type.php index ad49813d..2708b622 100644 --- a/includes/model/class-openedx-commerce-post-type.php +++ b/includes/model/class-openedx-commerce-post-type.php @@ -101,23 +101,23 @@ public function register_post_type() { 'name' => $this->plural, 'singular_name' => $this->single, 'name_admin_bar' => $this->single, - 'add_new' => _x( 'Add New', $this->post_type, 'wp-openedx-woocommerce-plugin' ), // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralContext + 'add_new' => _x( 'Add New', $this->post_type, 'wp-openedx-commerce' ), // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralContext // translators: %s: Name of the post type in singular. - 'add_new_item' => sprintf( __( 'Add New %s', 'wp-openedx-woocommerce-plugin' ), $this->single ), + 'add_new_item' => sprintf( __( 'Add New %s', 'wp-openedx-commerce' ), $this->single ), // translators: %s: Name of the post type in singular. - 'edit_item' => sprintf( __( 'Edit %s', 'wp-openedx-woocommerce-plugin' ), $this->single ), + 'edit_item' => sprintf( __( 'Edit %s', 'wp-openedx-commerce' ), $this->single ), // translators: %s: Name of the post type in singular. - 'new_item' => sprintf( __( 'New %s', 'wp-openedx-woocommerce-plugin' ), $this->single ), + 'new_item' => sprintf( __( 'New %s', 'wp-openedx-commerce' ), $this->single ), // translators: %s: Name of the post type in plural. - 'all_items' => sprintf( __( 'All %s', 'wp-openedx-woocommerce-plugin' ), $this->plural ), + 'all_items' => sprintf( __( 'All %s', 'wp-openedx-commerce' ), $this->plural ), // translators: %s: Name of the post type in singular. - 'view_item' => sprintf( __( 'View %s', 'wp-openedx-woocommerce-plugin' ), $this->single ), + 'view_item' => sprintf( __( 'View %s', 'wp-openedx-commerce' ), $this->single ), // translators: %s: Name of the post type in plural. - 'search_items' => sprintf( __( 'Search %s', 'wp-openedx-woocommerce-plugin' ), $this->plural ), + 'search_items' => sprintf( __( 'Search %s', 'wp-openedx-commerce' ), $this->plural ), // translators: %s: Name of the post type in plural. - 'not_found' => sprintf( __( 'No %s Found', 'wp-openedx-woocommerce-plugin' ), $this->plural ), + 'not_found' => sprintf( __( 'No %s Found', 'wp-openedx-commerce' ), $this->plural ), // translators: %s: Name of the post type in plural. - 'not_found_in_trash' => sprintf( __( 'No %s Found In Trash', 'wp-openedx-woocommerce-plugin' ), $this->plural ), + 'not_found_in_trash' => sprintf( __( 'No %s Found In Trash', 'wp-openedx-commerce' ), $this->plural ), // translators: %s: Name of the post type in singular. 'parent_item_colon' => sprintf( __( 'Parent %s' ), $this->single ), 'menu_name' => $this->plural, diff --git a/utils/openedx-utils.php b/utils/openedx-utils.php index e1920315..7388c83a 100644 --- a/utils/openedx-utils.php +++ b/utils/openedx-utils.php @@ -2,7 +2,7 @@ /** * Open edX WooCommerce Plugin utils. * - * @package openedx-woocommerce-plugin + * @package openedx-commerce * @since 1.6.0 */ @@ -13,11 +13,11 @@ */ function get_enrollment_options() { return array( - 'Honor' => __( 'Honor', 'wp-openedx-woocommerce-plugin' ), - 'Audit' => __( 'Audit', 'wp-openedx-woocommerce-plugin' ), - 'Verified' => __( 'Verified', 'wp-openedx-woocommerce-plugin' ), - 'Credit' => __( 'Credit', 'wp-openedx-woocommerce-plugin' ), - 'Professional' => __( 'Professional', 'wp-openedx-woocommerce-plugin' ), - 'No ID Professional' => __( 'No ID Professional', 'wp-openedx-woocommerce-plugin' ), + 'Honor' => __( 'Honor', 'wp-openedx-commerce' ), + 'Audit' => __( 'Audit', 'wp-openedx-commerce' ), + 'Verified' => __( 'Verified', 'wp-openedx-commerce' ), + 'Credit' => __( 'Credit', 'wp-openedx-commerce' ), + 'Professional' => __( 'Professional', 'wp-openedx-commerce' ), + 'No ID Professional' => __( 'No ID Professional', 'wp-openedx-commerce' ), ); }