From 09a0d2568e50191a0a26dbdefaedbc96558538cc Mon Sep 17 00:00:00 2001 From: RJChow Date: Thu, 31 Mar 2022 19:26:53 +0800 Subject: [PATCH] Codemod to change php i18n text domain from 'woocommerce-admin' to 'woocommerce' in post-merge WCA folders --- .../react-admin/connect-existing-pages.php | 50 +++---- .../html-admin-report-export-download.php | 2 +- .../plain-admin-report-export-download.php | 2 +- .../emails/plain-merchant-notification.php | 2 +- plugins/woocommerce/src/Admin/API/Coupons.php | 2 +- .../src/Admin/API/CustomAttributeTraits.php | 2 +- .../woocommerce/src/Admin/API/Customers.php | 2 +- plugins/woocommerce/src/Admin/API/Data.php | 2 +- .../src/Admin/API/DataDownloadIPs.php | 6 +- .../woocommerce/src/Admin/API/Experiments.php | 2 +- .../woocommerce/src/Admin/API/Features.php | 2 +- .../src/Admin/API/Leaderboards.php | 56 ++++---- .../woocommerce/src/Admin/API/Marketing.php | 2 +- .../src/Admin/API/MarketingOverview.php | 6 +- .../src/Admin/API/NavigationFavorites.php | 2 +- .../woocommerce/src/Admin/API/NoteActions.php | 8 +- plugins/woocommerce/src/Admin/API/Notes.php | 70 +++++----- .../Admin/API/OnboardingFreeExtensions.php | 2 +- .../src/Admin/API/OnboardingProductTypes.php | 2 +- .../src/Admin/API/OnboardingProfile.php | 40 +++--- .../src/Admin/API/OnboardingTasks.php | 76 +++++------ .../src/Admin/API/OnboardingThemes.php | 20 +-- plugins/woocommerce/src/Admin/API/Options.php | 10 +- plugins/woocommerce/src/Admin/API/Orders.php | 2 +- .../Admin/API/PaymentGatewaySuggestions.php | 16 +-- plugins/woocommerce/src/Admin/API/Plugins.php | 48 +++---- .../src/Admin/API/ProductAttributeTerms.php | 4 +- .../src/Admin/API/ProductAttributes.php | 4 +- .../src/Admin/API/ProductVariations.php | 8 +- .../woocommerce/src/Admin/API/Products.php | 6 +- .../src/Admin/API/ProductsLowInStock.php | 6 +- .../API/Reports/Categories/Controller.php | 46 +++---- .../API/Reports/Categories/DataStore.php | 2 +- .../src/Admin/API/Reports/Controller.php | 42 +++--- .../Admin/API/Reports/Coupons/Controller.php | 48 +++---- .../Admin/API/Reports/Coupons/DataStore.php | 4 +- .../API/Reports/Coupons/Stats/Controller.php | 50 +++---- .../API/Reports/Coupons/Stats/Segmenter.php | 2 +- .../API/Reports/Customers/Controller.php | 126 +++++++++--------- .../Reports/Customers/Stats/Controller.php | 72 +++++----- .../API/Reports/Downloads/Controller.php | 66 ++++----- .../Reports/Downloads/Stats/Controller.php | 54 ++++---- .../API/Reports/Downloads/Stats/DataStore.php | 4 +- .../Admin/API/Reports/Export/Controller.php | 20 +-- .../Admin/API/Reports/Import/Controller.php | 12 +- .../Admin/API/Reports/Orders/Controller.php | 94 ++++++------- .../API/Reports/Orders/Stats/Controller.php | 92 ++++++------- .../API/Reports/Orders/Stats/DataStore.php | 4 +- .../API/Reports/Orders/Stats/Segmenter.php | 2 +- .../PerformanceIndicators/Controller.php | 26 ++-- .../Admin/API/Reports/Products/Controller.php | 70 +++++----- .../Admin/API/Reports/Products/DataStore.php | 2 +- .../API/Reports/Products/Stats/Controller.php | 56 ++++---- .../API/Reports/Products/Stats/DataStore.php | 4 +- .../API/Reports/Products/Stats/Segmenter.php | 2 +- .../src/Admin/API/Reports/Query.php | 2 +- .../API/Reports/Revenue/Stats/Controller.php | 82 ++++++------ .../Admin/API/Reports/Stock/Controller.php | 42 +++--- .../API/Reports/Stock/Stats/Controller.php | 8 +- .../Admin/API/Reports/Taxes/Controller.php | 46 +++---- .../API/Reports/Taxes/Stats/Controller.php | 52 ++++---- .../API/Reports/Taxes/Stats/DataStore.php | 4 +- .../src/Admin/API/Reports/TimeInterval.php | 8 +- .../API/Reports/Variations/Controller.php | 70 +++++----- .../Reports/Variations/Stats/Controller.php | 66 ++++----- .../Reports/Variations/Stats/DataStore.php | 4 +- plugins/woocommerce/src/Admin/API/Taxes.php | 4 +- plugins/woocommerce/src/Admin/API/Themes.php | 12 +- .../src/Admin/Features/Features.php | 8 +- .../Admin/Features/Navigation/CoreMenu.php | 30 ++--- .../Admin/Features/Navigation/Favorites.php | 4 +- .../src/Admin/Features/Navigation/Init.php | 6 +- .../src/Admin/Features/Navigation/Menu.php | 6 +- .../Admin/Features/OnboardingTasks/Task.php | 2 +- .../Features/OnboardingTasks/TaskList.php | 2 +- .../Features/OnboardingTasks/TaskLists.php | 14 +- .../Tasks/AdditionalPayments.php | 6 +- .../OnboardingTasks/Tasks/Appearance.php | 10 +- .../OnboardingTasks/Tasks/Marketing.php | 10 +- .../OnboardingTasks/Tasks/Payments.php | 10 +- .../OnboardingTasks/Tasks/Products.php | 10 +- .../OnboardingTasks/Tasks/Purchase.php | 10 +- .../OnboardingTasks/Tasks/Shipping.php | 10 +- .../OnboardingTasks/Tasks/StoreDetails.php | 10 +- .../Features/OnboardingTasks/Tasks/Tax.php | 16 +-- .../Tasks/WooCommercePayments.php | 10 +- .../DefaultPaymentGateways.php | 68 +++++----- .../PaymentGatewaysController.php | 2 +- .../woocommerce/src/Admin/Notes/DataStore.php | 2 +- plugins/woocommerce/src/Admin/Notes/Note.php | 28 ++-- plugins/woocommerce/src/Admin/Notes/Notes.php | 2 +- .../woocommerce/src/Admin/PageController.php | 6 +- .../woocommerce/src/Admin/PluginsHelper.php | 20 +-- .../woocommerce/src/Admin/ReportCSVEmail.php | 24 ++-- plugins/woocommerce/src/Admin/ReportsSync.php | 8 +- .../src/Internal/Admin/Analytics.php | 40 +++--- .../src/Internal/Admin/Coupons.php | 4 +- .../Admin/CustomerEffortScoreTracks.php | 20 +-- .../src/Internal/Admin/FeaturePlugin.php | 4 +- .../src/Internal/Admin/Homescreen.php | 4 +- .../woocommerce/src/Internal/Admin/Loader.php | 22 +-- .../src/Internal/Admin/Marketing.php | 6 +- .../Internal/Admin/Notes/AddFirstProduct.php | 10 +- .../Notes/AddingAndManangingProducts.php | 6 +- .../Internal/Admin/Notes/ChoosingTheme.php | 6 +- .../Admin/Notes/CompleteStoreDetails.php | 6 +- .../Internal/Admin/Notes/CouponPageMoved.php | 6 +- .../Admin/Notes/CustomizeStoreWithBlocks.php | 6 +- .../Admin/Notes/CustomizingProductCatalog.php | 6 +- .../Internal/Admin/Notes/DeactivatePlugin.php | 6 +- .../src/Internal/Admin/Notes/EUVATNumber.php | 6 +- .../Admin/Notes/EditProductsOnTheMove.php | 6 +- .../Admin/Notes/EmailNotification.php | 4 +- .../Admin/Notes/FirstDownlaodableProduct.php | 6 +- .../src/Internal/Admin/Notes/FirstProduct.php | 6 +- .../Admin/Notes/GivingFeedbackNotes.php | 6 +- .../Notes/InsightFirstProductAndPayment.php | 12 +- .../Internal/Admin/Notes/InsightFirstSale.php | 12 +- .../Admin/Notes/InstallJPAndWCSPlugins.php | 6 +- .../Internal/Admin/Notes/LaunchChecklist.php | 6 +- .../Internal/Admin/Notes/MagentoMigration.php | 6 +- .../Admin/Notes/ManageOrdersOnTheGo.php | 6 +- .../ManageStoreActivityFromHomeScreen.php | 6 +- .../Internal/Admin/Notes/MarketingJetpack.php | 6 +- .../Admin/Notes/MigrateFromShopify.php | 6 +- .../src/Internal/Admin/Notes/MobileApp.php | 6 +- .../Internal/Admin/Notes/NavigationNudge.php | 6 +- .../Internal/Admin/Notes/NewSalesRecord.php | 6 +- .../Admin/Notes/OnboardingPayments.php | 6 +- .../Admin/Notes/OnlineClothingStore.php | 6 +- .../Internal/Admin/Notes/OrderMilestones.php | 16 +-- .../Admin/Notes/PaymentsRemindMeLater.php | 6 +- .../Admin/Notes/PerformanceOnMobile.php | 6 +- .../Internal/Admin/Notes/PersonalizeStore.php | 6 +- .../Admin/Notes/RealTimeOrderAlerts.php | 6 +- .../Admin/Notes/SellingOnlineCourses.php | 6 +- .../Notes/SetUpAdditionalPaymentTypes.php | 6 +- .../src/Internal/Admin/Notes/TestCheckout.php | 6 +- .../Internal/Admin/Notes/TrackingOptIn.php | 6 +- .../Admin/Notes/UnsecuredReportFiles.php | 8 +- .../Admin/Notes/UpdateStoreDetails.php | 6 +- .../WelcomeToWooCommerceForStoreUsers.php | 6 +- .../Admin/Notes/WooCommercePayments.php | 10 +- .../Admin/Notes/WooCommerceSubscriptions.php | 6 +- .../Admin/Notes/WooSubscriptionsNotes.php | 18 +-- .../Admin/Onboarding/OnboardingHelper.php | 26 ++-- .../Admin/Onboarding/OnboardingIndustries.php | 18 +-- .../Admin/Onboarding/OnboardingProducts.php | 16 +-- .../DefaultFreeExtensions.php | 44 +++--- .../Admin/Schedulers/CustomersScheduler.php | 2 +- .../src/Internal/Admin/Settings.php | 18 +-- .../Admin/SettingsNavigationFeature.php | 4 +- .../Internal/Admin/ShippingLabelBanner.php | 2 +- .../src/Internal/Admin/WCAdminAssets.php | 2 +- ...PaymentGatewayPreInstallWCPayPromotion.php | 4 +- .../src/Internal/Admin/WcPayWelcomePage.php | 8 +- 156 files changed, 1320 insertions(+), 1320 deletions(-) diff --git a/plugins/woocommerce/includes/react-admin/connect-existing-pages.php b/plugins/woocommerce/includes/react-admin/connect-existing-pages.php index b80f4c77ef0..0949d050e9f 100644 --- a/plugins/woocommerce/includes/react-admin/connect-existing-pages.php +++ b/plugins/woocommerce/includes/react-admin/connect-existing-pages.php @@ -23,25 +23,25 @@ function wc_admin_get_core_pages_to_connect() { return array( 'wc-addons' => array( - 'title' => __( 'Extensions', 'woocommerce-admin' ), + 'title' => __( 'Extensions', 'woocommerce' ), 'tabs' => array(), ), 'wc-reports' => array( - 'title' => __( 'Reports', 'woocommerce-admin' ), + 'title' => __( 'Reports', 'woocommerce' ), 'tabs' => $report_tabs, ), 'wc-settings' => array( - 'title' => __( 'Settings', 'woocommerce-admin' ), + 'title' => __( 'Settings', 'woocommerce' ), 'tabs' => apply_filters( 'woocommerce_settings_tabs_array', array() ), ), 'wc-status' => array( - 'title' => __( 'Status', 'woocommerce-admin' ), + 'title' => __( 'Status', 'woocommerce' ), 'tabs' => apply_filters( 'woocommerce_admin_status_tabs', array( - 'status' => __( 'System status', 'woocommerce-admin' ), - 'tools' => __( 'Tools', 'woocommerce-admin' ), - 'logs' => __( 'Logs', 'woocommerce-admin' ), + 'status' => __( 'System status', 'woocommerce' ), + 'tools' => __( 'Tools', 'woocommerce' ), + 'logs' => __( 'Logs', 'woocommerce' ), ) ), ), @@ -59,7 +59,7 @@ function wc_admin_filter_core_page_breadcrumbs( $breadcrumbs ) { $pages_to_connect = wc_admin_get_core_pages_to_connect(); $woocommerce_breadcrumb = array( 'admin.php?page=wc-admin', - __( 'WooCommerce', 'woocommerce-admin' ), + __( 'WooCommerce', 'woocommerce' ), ); foreach ( $pages_to_connect as $page_id => $page_data ) { @@ -129,7 +129,7 @@ wc_admin_connect_page( array( 'id' => 'woocommerce-orders', 'screen_id' => 'edit-shop_order', - 'title' => __( 'Orders', 'woocommerce-admin' ), + 'title' => __( 'Orders', 'woocommerce' ), 'path' => add_query_arg( 'post_type', 'shop_order', $posttype_list_base ), ) ); @@ -140,7 +140,7 @@ wc_admin_connect_page( 'id' => 'woocommerce-add-order', 'parent' => 'woocommerce-orders', 'screen_id' => 'shop_order-add', - 'title' => __( 'Add New', 'woocommerce-admin' ), + 'title' => __( 'Add New', 'woocommerce' ), ) ); @@ -150,7 +150,7 @@ wc_admin_connect_page( 'id' => 'woocommerce-edit-order', 'parent' => 'woocommerce-orders', 'screen_id' => 'shop_order', - 'title' => __( 'Edit Order', 'woocommerce-admin' ), + 'title' => __( 'Edit Order', 'woocommerce' ), ) ); @@ -160,7 +160,7 @@ wc_admin_connect_page( 'id' => 'woocommerce-coupons', 'parent' => Features::is_enabled( 'coupons' ) ? 'woocommerce-marketing' : null, 'screen_id' => 'edit-shop_coupon', - 'title' => __( 'Coupons', 'woocommerce-admin' ), + 'title' => __( 'Coupons', 'woocommerce' ), 'path' => add_query_arg( 'post_type', 'shop_coupon', $posttype_list_base ), ) ); @@ -171,7 +171,7 @@ wc_admin_connect_page( 'id' => 'woocommerce-add-coupon', 'parent' => 'woocommerce-coupons', 'screen_id' => 'shop_coupon-add', - 'title' => __( 'Add New', 'woocommerce-admin' ), + 'title' => __( 'Add New', 'woocommerce' ), ) ); @@ -181,7 +181,7 @@ wc_admin_connect_page( 'id' => 'woocommerce-edit-coupon', 'parent' => 'woocommerce-coupons', 'screen_id' => 'shop_coupon', - 'title' => __( 'Edit Coupon', 'woocommerce-admin' ), + 'title' => __( 'Edit Coupon', 'woocommerce' ), ) ); @@ -190,7 +190,7 @@ wc_admin_connect_page( array( 'id' => 'woocommerce-products', 'screen_id' => 'edit-product', - 'title' => __( 'Products', 'woocommerce-admin' ), + 'title' => __( 'Products', 'woocommerce' ), 'path' => add_query_arg( 'post_type', 'product', $posttype_list_base ), ) ); @@ -201,7 +201,7 @@ wc_admin_connect_page( 'id' => 'woocommerce-add-product', 'parent' => 'woocommerce-products', 'screen_id' => 'product-add', - 'title' => __( 'Add New', 'woocommerce-admin' ), + 'title' => __( 'Add New', 'woocommerce' ), ) ); @@ -211,7 +211,7 @@ wc_admin_connect_page( 'id' => 'woocommerce-edit-product', 'parent' => 'woocommerce-products', 'screen_id' => 'product', - 'title' => __( 'Edit Product', 'woocommerce-admin' ), + 'title' => __( 'Edit Product', 'woocommerce' ), ) ); @@ -221,7 +221,7 @@ wc_admin_connect_page( 'id' => 'woocommerce-import-products', 'parent' => 'woocommerce-products', 'screen_id' => 'product_page_product_importer', - 'title' => __( 'Import Products', 'woocommerce-admin' ), + 'title' => __( 'Import Products', 'woocommerce' ), ) ); @@ -231,7 +231,7 @@ wc_admin_connect_page( 'id' => 'woocommerce-export-products', 'parent' => 'woocommerce-products', 'screen_id' => 'product_page_product_exporter', - 'title' => __( 'Export Products', 'woocommerce-admin' ), + 'title' => __( 'Export Products', 'woocommerce' ), ) ); @@ -241,7 +241,7 @@ wc_admin_connect_page( 'id' => 'woocommerce-product-categories', 'parent' => 'woocommerce-products', 'screen_id' => 'edit-product_cat', - 'title' => __( 'Product categories', 'woocommerce-admin' ), + 'title' => __( 'Product categories', 'woocommerce' ), ) ); @@ -251,7 +251,7 @@ wc_admin_connect_page( 'id' => 'woocommerce-product-edit-category', 'parent' => 'woocommerce-products', 'screen_id' => 'product_cat', - 'title' => __( 'Edit category', 'woocommerce-admin' ), + 'title' => __( 'Edit category', 'woocommerce' ), ) ); @@ -261,7 +261,7 @@ wc_admin_connect_page( 'id' => 'woocommerce-product-tags', 'parent' => 'woocommerce-products', 'screen_id' => 'edit-product_tag', - 'title' => __( 'Product tags', 'woocommerce-admin' ), + 'title' => __( 'Product tags', 'woocommerce' ), ) ); @@ -271,7 +271,7 @@ wc_admin_connect_page( 'id' => 'woocommerce-product-edit-tag', 'parent' => 'woocommerce-products', 'screen_id' => 'product_tag', - 'title' => __( 'Edit tag', 'woocommerce-admin' ), + 'title' => __( 'Edit tag', 'woocommerce' ), ) ); @@ -281,7 +281,7 @@ wc_admin_connect_page( 'id' => 'woocommerce-product-attributes', 'parent' => 'woocommerce-products', 'screen_id' => 'product_page_product_attributes', - 'title' => __( 'Attributes', 'woocommerce-admin' ), + 'title' => __( 'Attributes', 'woocommerce' ), ) ); @@ -291,6 +291,6 @@ wc_admin_connect_page( 'id' => 'woocommerce-product-edit-attribute', 'parent' => 'woocommerce-products', 'screen_id' => 'product_page_product_attribute-edit', - 'title' => __( 'Edit attribute', 'woocommerce-admin' ), + 'title' => __( 'Edit attribute', 'woocommerce' ), ) ); diff --git a/plugins/woocommerce/includes/react-admin/emails/html-admin-report-export-download.php b/plugins/woocommerce/includes/react-admin/emails/html-admin-report-export-download.php index dc195750295..519cbce0edc 100644 --- a/plugins/woocommerce/includes/react-admin/emails/html-admin-report-export-download.php +++ b/plugins/woocommerce/includes/react-admin/emails/html-admin-report-export-download.php @@ -16,7 +16,7 @@ do_action( 'woocommerce_email_header', $email_heading, $email ); label, $trigger_note_action_url . $an_action->id ) ); + echo wp_kses_post( sprintf( __( '%1$s: %2$s', 'woocommerce' ), $an_action->label, $trigger_note_action_url . $an_action->id ) ); } echo "\n\n----------------------------------------\n\n"; diff --git a/plugins/woocommerce/src/Admin/API/Coupons.php b/plugins/woocommerce/src/Admin/API/Coupons.php index 0d970596d9f..f5a6cf478be 100644 --- a/plugins/woocommerce/src/Admin/API/Coupons.php +++ b/plugins/woocommerce/src/Admin/API/Coupons.php @@ -32,7 +32,7 @@ class Coupons extends \WC_REST_Coupons_Controller { public function get_collection_params() { $params = parent::get_collection_params(); $params['search'] = array( - 'description' => __( 'Limit results to coupons with codes matching a given string.', 'woocommerce-admin' ), + 'description' => __( 'Limit results to coupons with codes matching a given string.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); diff --git a/plugins/woocommerce/src/Admin/API/CustomAttributeTraits.php b/plugins/woocommerce/src/Admin/API/CustomAttributeTraits.php index 870062d4ba8..5a9db7ec4c2 100644 --- a/plugins/woocommerce/src/Admin/API/CustomAttributeTraits.php +++ b/plugins/woocommerce/src/Admin/API/CustomAttributeTraits.php @@ -26,7 +26,7 @@ trait CustomAttributeTraits { if ( empty( $matching_attributes ) ) { return new \WP_Error( 'woocommerce_rest_product_attribute_not_found', - __( 'No product attribute with that slug was found.', 'woocommerce-admin' ), + __( 'No product attribute with that slug was found.', 'woocommerce' ), array( 'status' => 404 ) ); } diff --git a/plugins/woocommerce/src/Admin/API/Customers.php b/plugins/woocommerce/src/Admin/API/Customers.php index e9621f08dbb..8eb58776f37 100644 --- a/plugins/woocommerce/src/Admin/API/Customers.php +++ b/plugins/woocommerce/src/Admin/API/Customers.php @@ -48,7 +48,7 @@ class Customers extends \Automattic\WooCommerce\Admin\API\Reports\Customers\Cont array( 'args' => array( 'id' => array( - 'description' => __( 'Unique ID for the resource.', 'woocommerce-admin' ), + 'description' => __( 'Unique ID for the resource.', 'woocommerce' ), 'type' => 'integer', ), ), diff --git a/plugins/woocommerce/src/Admin/API/Data.php b/plugins/woocommerce/src/Admin/API/Data.php index ffa4612512f..525f9b6e2e0 100644 --- a/plugins/woocommerce/src/Admin/API/Data.php +++ b/plugins/woocommerce/src/Admin/API/Data.php @@ -36,7 +36,7 @@ class Data extends \WC_REST_Data_Controller { $this->prepare_item_for_response( (object) array( 'slug' => 'download-ips', - 'description' => __( 'An endpoint used for searching download logs for a specific IP address.', 'woocommerce-admin' ), + 'description' => __( 'An endpoint used for searching download logs for a specific IP address.', 'woocommerce' ), ), $request ) diff --git a/plugins/woocommerce/src/Admin/API/DataDownloadIPs.php b/plugins/woocommerce/src/Admin/API/DataDownloadIPs.php index a7428dc3f99..258eba97c15 100644 --- a/plugins/woocommerce/src/Admin/API/DataDownloadIPs.php +++ b/plugins/woocommerce/src/Admin/API/DataDownloadIPs.php @@ -70,7 +70,7 @@ class DataDownloadIPs extends \WC_REST_Data_Controller { ) ); } else { - return new \WP_Error( 'woocommerce_rest_data_download_ips_invalid_request', __( 'Invalid request. Please pass the match parameter.', 'woocommerce-admin' ), array( 'status' => 400 ) ); + return new \WP_Error( 'woocommerce_rest_data_download_ips_invalid_request', __( 'Invalid request. Please pass the match parameter.', 'woocommerce' ), array( 'status' => 400 ) ); } $data = array(); @@ -134,7 +134,7 @@ class DataDownloadIPs extends \WC_REST_Data_Controller { $params = array(); $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['match'] = array( - 'description' => __( 'A partial IP address can be passed and matching results will be returned.', 'woocommerce-admin' ), + 'description' => __( 'A partial IP address can be passed and matching results will be returned.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); @@ -155,7 +155,7 @@ class DataDownloadIPs extends \WC_REST_Data_Controller { 'properties' => array( 'user_ip_address' => array( 'type' => 'string', - 'description' => __( 'IP address.', 'woocommerce-admin' ), + 'description' => __( 'IP address.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, ), diff --git a/plugins/woocommerce/src/Admin/API/Experiments.php b/plugins/woocommerce/src/Admin/API/Experiments.php index 2014a020b11..480d0cbdde9 100644 --- a/plugins/woocommerce/src/Admin/API/Experiments.php +++ b/plugins/woocommerce/src/Admin/API/Experiments.php @@ -62,7 +62,7 @@ class Experiments extends \WC_REST_Data_Controller { if ( ! isset( $args['experiment_name'] ) ) { return new \WP_Error( 'woocommerce_rest_experiment_name_required', - __( 'Sorry, experiment_name is required.', 'woocommerce-admin' ), + __( 'Sorry, experiment_name is required.', 'woocommerce' ), array( 'status' => 400 ) ); } diff --git a/plugins/woocommerce/src/Admin/API/Features.php b/plugins/woocommerce/src/Admin/API/Features.php index 5810a33d135..1adac8dfdbb 100644 --- a/plugins/woocommerce/src/Admin/API/Features.php +++ b/plugins/woocommerce/src/Admin/API/Features.php @@ -59,7 +59,7 @@ class Features extends \WC_REST_Data_Controller { */ public function get_items_permissions_check( $request ) { if ( ! wc_rest_check_manager_permissions( 'settings', 'read' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; diff --git a/plugins/woocommerce/src/Admin/API/Leaderboards.php b/plugins/woocommerce/src/Admin/API/Leaderboards.php index 14078cc08ce..2de5c7e3bc5 100644 --- a/plugins/woocommerce/src/Admin/API/Leaderboards.php +++ b/plugins/woocommerce/src/Admin/API/Leaderboards.php @@ -120,16 +120,16 @@ class Leaderboards extends \WC_REST_Data_Controller { return array( 'id' => 'coupons', - 'label' => __( 'Top Coupons - Number of Orders', 'woocommerce-admin' ), + 'label' => __( 'Top Coupons - Number of Orders', 'woocommerce' ), 'headers' => array( array( - 'label' => __( 'Coupon code', 'woocommerce-admin' ), + 'label' => __( 'Coupon code', 'woocommerce' ), ), array( - 'label' => __( 'Orders', 'woocommerce-admin' ), + 'label' => __( 'Orders', 'woocommerce' ), ), array( - 'label' => __( 'Amount discounted', 'woocommerce-admin' ), + 'label' => __( 'Amount discounted', 'woocommerce' ), ), ), 'rows' => $rows, @@ -189,16 +189,16 @@ class Leaderboards extends \WC_REST_Data_Controller { return array( 'id' => 'categories', - 'label' => __( 'Top categories - Items sold', 'woocommerce-admin' ), + 'label' => __( 'Top categories - Items sold', 'woocommerce' ), 'headers' => array( array( - 'label' => __( 'Category', 'woocommerce-admin' ), + 'label' => __( 'Category', 'woocommerce' ), ), array( - 'label' => __( 'Items sold', 'woocommerce-admin' ), + 'label' => __( 'Items sold', 'woocommerce' ), ), array( - 'label' => __( 'Net sales', 'woocommerce-admin' ), + 'label' => __( 'Net sales', 'woocommerce' ), ), ), 'rows' => $rows, @@ -256,16 +256,16 @@ class Leaderboards extends \WC_REST_Data_Controller { return array( 'id' => 'customers', - 'label' => __( 'Top Customers - Total Spend', 'woocommerce-admin' ), + 'label' => __( 'Top Customers - Total Spend', 'woocommerce' ), 'headers' => array( array( - 'label' => __( 'Customer Name', 'woocommerce-admin' ), + 'label' => __( 'Customer Name', 'woocommerce' ), ), array( - 'label' => __( 'Orders', 'woocommerce-admin' ), + 'label' => __( 'Orders', 'woocommerce' ), ), array( - 'label' => __( 'Total Spend', 'woocommerce-admin' ), + 'label' => __( 'Total Spend', 'woocommerce' ), ), ), 'rows' => $rows, @@ -325,16 +325,16 @@ class Leaderboards extends \WC_REST_Data_Controller { return array( 'id' => 'products', - 'label' => __( 'Top products - Items sold', 'woocommerce-admin' ), + 'label' => __( 'Top products - Items sold', 'woocommerce' ), 'headers' => array( array( - 'label' => __( 'Product', 'woocommerce-admin' ), + 'label' => __( 'Product', 'woocommerce' ), ), array( - 'label' => __( 'Items sold', 'woocommerce-admin' ), + 'label' => __( 'Items sold', 'woocommerce' ), ), array( - 'label' => __( 'Net sales', 'woocommerce-admin' ), + 'label' => __( 'Net sales', 'woocommerce' ), ), ), 'rows' => $rows, @@ -445,7 +445,7 @@ class Leaderboards extends \WC_REST_Data_Controller { public function get_collection_params() { $params = array(); $params['page'] = array( - 'description' => __( 'Current page of the collection.', 'woocommerce-admin' ), + 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', @@ -453,7 +453,7 @@ class Leaderboards extends \WC_REST_Data_Controller { 'minimum' => 1, ); $params['per_page'] = array( - 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce-admin' ), + 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 5, 'minimum' => 1, @@ -462,19 +462,19 @@ class Leaderboards extends \WC_REST_Data_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['after'] = array( - 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['before'] = array( - 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['persisted_query'] = array( - 'description' => __( 'URL query to persist across links.', 'woocommerce-admin' ), + 'description' => __( 'URL query to persist across links.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); @@ -494,26 +494,26 @@ class Leaderboards extends \WC_REST_Data_Controller { 'properties' => array( 'id' => array( 'type' => 'string', - 'description' => __( 'Leaderboard ID.', 'woocommerce-admin' ), + 'description' => __( 'Leaderboard ID.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, ), 'label' => array( 'type' => 'string', - 'description' => __( 'Displayed title for the leaderboard.', 'woocommerce-admin' ), + 'description' => __( 'Displayed title for the leaderboard.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, ), 'headers' => array( 'type' => 'array', - 'description' => __( 'Table headers.', 'woocommerce-admin' ), + 'description' => __( 'Table headers.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'items' => array( 'type' => 'array', 'properties' => array( 'label' => array( - 'description' => __( 'Table column header.', 'woocommerce-admin' ), + 'description' => __( 'Table column header.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -523,20 +523,20 @@ class Leaderboards extends \WC_REST_Data_Controller { ), 'rows' => array( 'type' => 'array', - 'description' => __( 'Table rows.', 'woocommerce-admin' ), + 'description' => __( 'Table rows.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'items' => array( 'type' => 'array', 'properties' => array( 'display' => array( - 'description' => __( 'Table cell display.', 'woocommerce-admin' ), + 'description' => __( 'Table cell display.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'value' => array( - 'description' => __( 'Table cell value.', 'woocommerce-admin' ), + 'description' => __( 'Table cell value.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, diff --git a/plugins/woocommerce/src/Admin/API/Marketing.php b/plugins/woocommerce/src/Admin/API/Marketing.php index 58d9ac8c71e..de06c4b7071 100644 --- a/plugins/woocommerce/src/Admin/API/Marketing.php +++ b/plugins/woocommerce/src/Admin/API/Marketing.php @@ -88,7 +88,7 @@ class Marketing extends \WC_REST_Data_Controller { */ public function get_recommended_plugins_permissions_check( $request ) { if ( ! current_user_can( 'install_plugins' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_update', __( 'Sorry, you cannot manage plugins.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_update', __( 'Sorry, you cannot manage plugins.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; diff --git a/plugins/woocommerce/src/Admin/API/MarketingOverview.php b/plugins/woocommerce/src/Admin/API/MarketingOverview.php index 6b4a81c568d..930dcb4c0fc 100644 --- a/plugins/woocommerce/src/Admin/API/MarketingOverview.php +++ b/plugins/woocommerce/src/Admin/API/MarketingOverview.php @@ -84,13 +84,13 @@ class MarketingOverview extends \WC_REST_Data_Controller { $plugin_slug = $request->get_param( 'plugin' ); if ( ! PluginsHelper::is_plugin_installed( $plugin_slug ) ) { - return new \WP_Error( 'woocommerce_rest_invalid_plugin', __( 'Invalid plugin.', 'woocommerce-admin' ), 404 ); + return new \WP_Error( 'woocommerce_rest_invalid_plugin', __( 'Invalid plugin.', 'woocommerce' ), 404 ); } $result = activate_plugin( PluginsHelper::get_plugin_path_from_slug( $plugin_slug ) ); if ( ! is_null( $result ) ) { - return new \WP_Error( 'woocommerce_rest_invalid_plugin', __( 'The plugin could not be activated.', 'woocommerce-admin' ), 500 ); + return new \WP_Error( 'woocommerce_rest_invalid_plugin', __( 'The plugin could not be activated.', 'woocommerce' ), 500 ); } // IMPORTANT - Don't return the active plugins data here. @@ -111,7 +111,7 @@ class MarketingOverview extends \WC_REST_Data_Controller { */ public function install_plugins_permissions_check( $request ) { if ( ! current_user_can( 'install_plugins' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_update', __( 'Sorry, you cannot manage plugins.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_update', __( 'Sorry, you cannot manage plugins.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; diff --git a/plugins/woocommerce/src/Admin/API/NavigationFavorites.php b/plugins/woocommerce/src/Admin/API/NavigationFavorites.php index 59ac1a40980..757727b36d4 100644 --- a/plugins/woocommerce/src/Admin/API/NavigationFavorites.php +++ b/plugins/woocommerce/src/Admin/API/NavigationFavorites.php @@ -118,7 +118,7 @@ class NavigationFavorites extends \WC_REST_Data_Controller { return $this->prepare_error( new \WP_Error( 'woocommerce_favorites_invalid_user', - __( 'Invalid user_id provided', 'woocommerce-admin' ) + __( 'Invalid user_id provided', 'woocommerce' ) ) ); } diff --git a/plugins/woocommerce/src/Admin/API/NoteActions.php b/plugins/woocommerce/src/Admin/API/NoteActions.php index bfe79173f18..cd8723963ef 100644 --- a/plugins/woocommerce/src/Admin/API/NoteActions.php +++ b/plugins/woocommerce/src/Admin/API/NoteActions.php @@ -30,11 +30,11 @@ class NoteActions extends Notes { array( 'args' => array( 'note_id' => array( - 'description' => __( 'Unique ID for the Note.', 'woocommerce-admin' ), + 'description' => __( 'Unique ID for the Note.', 'woocommerce' ), 'type' => 'integer', ), 'action_id' => array( - 'description' => __( 'Unique ID for the Note Action.', 'woocommerce-admin' ), + 'description' => __( 'Unique ID for the Note Action.', 'woocommerce' ), 'type' => 'integer', ), ), @@ -61,7 +61,7 @@ class NoteActions extends Notes { if ( ! $note ) { return new \WP_Error( 'woocommerce_note_invalid_id', - __( 'Sorry, there is no resource with that ID.', 'woocommerce-admin' ), + __( 'Sorry, there is no resource with that ID.', 'woocommerce' ), array( 'status' => 404 ) ); } @@ -74,7 +74,7 @@ class NoteActions extends Notes { if ( ! $triggered_action ) { return new \WP_Error( 'woocommerce_note_action_invalid_id', - __( 'Sorry, there is no resource with that ID.', 'woocommerce-admin' ), + __( 'Sorry, there is no resource with that ID.', 'woocommerce' ), array( 'status' => 404 ) ); } diff --git a/plugins/woocommerce/src/Admin/API/Notes.php b/plugins/woocommerce/src/Admin/API/Notes.php index a9cc6897345..70bb5400aa4 100644 --- a/plugins/woocommerce/src/Admin/API/Notes.php +++ b/plugins/woocommerce/src/Admin/API/Notes.php @@ -67,7 +67,7 @@ class Notes extends \WC_REST_CRUD_Controller { array( 'args' => array( 'id' => array( - 'description' => __( 'Unique ID for the resource.', 'woocommerce-admin' ), + 'description' => __( 'Unique ID for the resource.', 'woocommerce' ), 'type' => 'integer', ), ), @@ -108,7 +108,7 @@ class Notes extends \WC_REST_CRUD_Controller { 'permission_callback' => array( $this, 'update_items_permissions_check' ), 'args' => array( 'status' => array( - 'description' => __( 'Status of note.', 'woocommerce-admin' ), + 'description' => __( 'Status of note.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', @@ -175,7 +175,7 @@ class Notes extends \WC_REST_CRUD_Controller { if ( ! $note ) { return new \WP_Error( 'woocommerce_note_invalid_id', - __( 'Sorry, there is no resource with that ID.', 'woocommerce-admin' ), + __( 'Sorry, there is no resource with that ID.', 'woocommerce' ), array( 'status' => 404 ) ); } @@ -295,7 +295,7 @@ class Notes extends \WC_REST_CRUD_Controller { */ public function get_item_permissions_check( $request ) { if ( ! wc_rest_check_manager_permissions( 'system_status', 'read' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; @@ -309,7 +309,7 @@ class Notes extends \WC_REST_CRUD_Controller { */ public function get_items_permissions_check( $request ) { if ( ! wc_rest_check_manager_permissions( 'system_status', 'read' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; @@ -327,7 +327,7 @@ class Notes extends \WC_REST_CRUD_Controller { if ( ! $note ) { return new \WP_Error( 'woocommerce_note_invalid_id', - __( 'Sorry, there is no resource with that ID.', 'woocommerce-admin' ), + __( 'Sorry, there is no resource with that ID.', 'woocommerce' ), array( 'status' => 404 ) ); } @@ -348,7 +348,7 @@ class Notes extends \WC_REST_CRUD_Controller { if ( ! $note ) { return new \WP_Error( 'woocommerce_note_invalid_id', - __( 'Sorry, there is no note with that ID.', 'woocommerce-admin' ), + __( 'Sorry, there is no note with that ID.', 'woocommerce' ), array( 'status' => 404 ) ); } @@ -434,7 +434,7 @@ class Notes extends \WC_REST_CRUD_Controller { if ( ! isset( $note_ids ) || ! is_array( $note_ids ) ) { return new \WP_Error( 'woocommerce_note_invalid_ids', - __( 'Please provide an array of IDs through the noteIds param.', 'woocommerce-admin' ), + __( 'Please provide an array of IDs through the noteIds param.', 'woocommerce' ), array( 'status' => 422 ) ); } @@ -464,7 +464,7 @@ class Notes extends \WC_REST_CRUD_Controller { if ( ! in_array( $promo_note_name, $this->allowed_promo_notes, true ) ) { return new \WP_Error( 'woocommerce_note_invalid_promo_note_name', - __( 'Please provide a valid promo note name.', 'woocommerce-admin' ), + __( 'Please provide a valid promo note name.', 'woocommerce' ), array( 'status' => 422 ) ); } @@ -505,7 +505,7 @@ class Notes extends \WC_REST_CRUD_Controller { */ public function update_items_permissions_check( $request ) { if ( ! wc_rest_check_manager_permissions( 'settings', 'edit' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_edit', __( 'Sorry, you cannot edit this resource.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_edit', __( 'Sorry, you cannot edit this resource.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; } @@ -634,14 +634,14 @@ class Notes extends \WC_REST_CRUD_Controller { $params = array(); $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['order'] = array( - 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce-admin' ), + 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ), 'type' => 'string', 'default' => 'desc', 'enum' => array( 'asc', 'desc' ), 'validate_callback' => 'rest_validate_request_arg', ); $params['orderby'] = array( - 'description' => __( 'Sort collection by object attribute.', 'woocommerce-admin' ), + 'description' => __( 'Sort collection by object attribute.', 'woocommerce' ), 'type' => 'string', 'default' => 'date', 'enum' => array( @@ -654,7 +654,7 @@ class Notes extends \WC_REST_CRUD_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['page'] = array( - 'description' => __( 'Current page of the collection.', 'woocommerce-admin' ), + 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', @@ -662,7 +662,7 @@ class Notes extends \WC_REST_CRUD_Controller { 'minimum' => 1, ); $params['per_page'] = array( - 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce-admin' ), + 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 10, 'minimum' => 1, @@ -671,7 +671,7 @@ class Notes extends \WC_REST_CRUD_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['type'] = array( - 'description' => __( 'Type of note.', 'woocommerce-admin' ), + 'description' => __( 'Type of note.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', @@ -681,7 +681,7 @@ class Notes extends \WC_REST_CRUD_Controller { ), ); $params['status'] = array( - 'description' => __( 'Status of note.', 'woocommerce-admin' ), + 'description' => __( 'Status of note.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', @@ -691,7 +691,7 @@ class Notes extends \WC_REST_CRUD_Controller { ), ); $params['source'] = array( - 'description' => __( 'Source of note.', 'woocommerce-admin' ), + 'description' => __( 'Source of note.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_list', 'validate_callback' => 'rest_validate_request_arg', @@ -714,108 +714,108 @@ class Notes extends \WC_REST_CRUD_Controller { 'type' => 'object', 'properties' => array( 'id' => array( - 'description' => __( 'ID of the note record.', 'woocommerce-admin' ), + 'description' => __( 'ID of the note record.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view' ), 'readonly' => true, ), 'name' => array( - 'description' => __( 'Name of the note.', 'woocommerce-admin' ), + 'description' => __( 'Name of the note.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'type' => array( - 'description' => __( 'The type of the note (e.g. error, warning, etc.).', 'woocommerce-admin' ), + 'description' => __( 'The type of the note (e.g. error, warning, etc.).', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'locale' => array( - 'description' => __( 'Locale used for the note title and content.', 'woocommerce-admin' ), + 'description' => __( 'Locale used for the note title and content.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'title' => array( - 'description' => __( 'Title of the note.', 'woocommerce-admin' ), + 'description' => __( 'Title of the note.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'content' => array( - 'description' => __( 'Content of the note.', 'woocommerce-admin' ), + 'description' => __( 'Content of the note.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'content_data' => array( - 'description' => __( 'Content data for the note. JSON string. Available for re-localization.', 'woocommerce-admin' ), + 'description' => __( 'Content data for the note. JSON string. Available for re-localization.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'status' => array( - 'description' => __( 'The status of the note (e.g. unactioned, actioned).', 'woocommerce-admin' ), + 'description' => __( 'The status of the note (e.g. unactioned, actioned).', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), ), 'source' => array( - 'description' => __( 'Source of the note.', 'woocommerce-admin' ), + 'description' => __( 'Source of the note.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_created' => array( - 'description' => __( 'Date the note was created.', 'woocommerce-admin' ), + 'description' => __( 'Date the note was created.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_created_gmt' => array( - 'description' => __( 'Date the note was created (GMT).', 'woocommerce-admin' ), + 'description' => __( 'Date the note was created (GMT).', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_reminder' => array( - 'description' => __( 'Date after which the user should be reminded of the note, if any.', 'woocommerce-admin' ), + 'description' => __( 'Date after which the user should be reminded of the note, if any.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, // @todo Allow date_reminder to be updated. ), 'date_reminder_gmt' => array( - 'description' => __( 'Date after which the user should be reminded of the note, if any (GMT).', 'woocommerce-admin' ), + 'description' => __( 'Date after which the user should be reminded of the note, if any (GMT).', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'is_snoozable' => array( - 'description' => __( 'Whether or not a user can request to be reminded about the note.', 'woocommerce-admin' ), + 'description' => __( 'Whether or not a user can request to be reminded about the note.', 'woocommerce' ), 'type' => 'boolean', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'actions' => array( - 'description' => __( 'An array of actions, if any, for the note.', 'woocommerce-admin' ), + 'description' => __( 'An array of actions, if any, for the note.', 'woocommerce' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'layout' => array( - 'description' => __( 'The layout of the note (e.g. banner, thumbnail, plain).', 'woocommerce-admin' ), + 'description' => __( 'The layout of the note (e.g. banner, thumbnail, plain).', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'image' => array( - 'description' => __( 'The image of the note, if any.', 'woocommerce-admin' ), + 'description' => __( 'The image of the note, if any.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'is_deleted' => array( - 'description' => __( 'Registers whether the note is deleted or not', 'woocommerce-admin' ), + 'description' => __( 'Registers whether the note is deleted or not', 'woocommerce' ), 'type' => 'boolean', 'context' => array( 'view', 'edit' ), 'readonly' => true, diff --git a/plugins/woocommerce/src/Admin/API/OnboardingFreeExtensions.php b/plugins/woocommerce/src/Admin/API/OnboardingFreeExtensions.php index 90a9ec8ec4e..4719ceff621 100644 --- a/plugins/woocommerce/src/Admin/API/OnboardingFreeExtensions.php +++ b/plugins/woocommerce/src/Admin/API/OnboardingFreeExtensions.php @@ -59,7 +59,7 @@ class OnboardingFreeExtensions extends \WC_REST_Data_Controller { */ public function get_items_permissions_check( $request ) { if ( ! wc_rest_check_manager_permissions( 'settings', 'read' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; diff --git a/plugins/woocommerce/src/Admin/API/OnboardingProductTypes.php b/plugins/woocommerce/src/Admin/API/OnboardingProductTypes.php index 45044078526..269d7b49e4f 100644 --- a/plugins/woocommerce/src/Admin/API/OnboardingProductTypes.php +++ b/plugins/woocommerce/src/Admin/API/OnboardingProductTypes.php @@ -59,7 +59,7 @@ class OnboardingProductTypes extends \WC_REST_Data_Controller { */ public function get_items_permissions_check( $request ) { if ( ! wc_rest_check_manager_permissions( 'settings', 'read' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; diff --git a/plugins/woocommerce/src/Admin/API/OnboardingProfile.php b/plugins/woocommerce/src/Admin/API/OnboardingProfile.php index d4e9391ed0f..a148810ed2e 100644 --- a/plugins/woocommerce/src/Admin/API/OnboardingProfile.php +++ b/plugins/woocommerce/src/Admin/API/OnboardingProfile.php @@ -87,7 +87,7 @@ class OnboardingProfile extends \WC_REST_Data_Controller { */ public function get_items_permissions_check( $request ) { if ( ! wc_rest_check_manager_permissions( 'settings', 'read' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; @@ -101,7 +101,7 @@ class OnboardingProfile extends \WC_REST_Data_Controller { */ public function update_items_permissions_check( $request ) { if ( ! wc_rest_check_manager_permissions( 'settings', 'edit' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot edit this resource.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot edit this resource.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; @@ -162,7 +162,7 @@ class OnboardingProfile extends \WC_REST_Data_Controller { $result = array( 'status' => 'success', - 'message' => __( 'Onboarding profile data has been updated.', 'woocommerce-admin' ), + 'message' => __( 'Onboarding profile data has been updated.', 'woocommerce' ), ); $response = $this->prepare_item_for_response( $result, $request ); @@ -263,21 +263,21 @@ class OnboardingProfile extends \WC_REST_Data_Controller { $properties = array( 'completed' => array( 'type' => 'boolean', - 'description' => __( 'Whether or not the profile was completed.', 'woocommerce-admin' ), + 'description' => __( 'Whether or not the profile was completed.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'validate_callback' => 'rest_validate_request_arg', ), 'skipped' => array( 'type' => 'boolean', - 'description' => __( 'Whether or not the profile was skipped.', 'woocommerce-admin' ), + 'description' => __( 'Whether or not the profile was skipped.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'validate_callback' => 'rest_validate_request_arg', ), 'industry' => array( 'type' => 'array', - 'description' => __( 'Industry.', 'woocommerce-admin' ), + 'description' => __( 'Industry.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'validate_callback' => 'rest_validate_request_arg', @@ -287,7 +287,7 @@ class OnboardingProfile extends \WC_REST_Data_Controller { ), 'product_types' => array( 'type' => 'array', - 'description' => __( 'Types of products sold.', 'woocommerce-admin' ), + 'description' => __( 'Types of products sold.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'sanitize_callback' => 'wp_parse_slug_list', @@ -299,7 +299,7 @@ class OnboardingProfile extends \WC_REST_Data_Controller { ), 'product_count' => array( 'type' => 'string', - 'description' => __( 'Number of products to be added.', 'woocommerce-admin' ), + 'description' => __( 'Number of products to be added.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'validate_callback' => 'rest_validate_request_arg', @@ -313,7 +313,7 @@ class OnboardingProfile extends \WC_REST_Data_Controller { ), 'selling_venues' => array( 'type' => 'string', - 'description' => __( 'Other places the store is selling products.', 'woocommerce-admin' ), + 'description' => __( 'Other places the store is selling products.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'validate_callback' => 'rest_validate_request_arg', @@ -327,7 +327,7 @@ class OnboardingProfile extends \WC_REST_Data_Controller { ), 'number_employees' => array( 'type' => 'string', - 'description' => __( 'Number of employees of the store.', 'woocommerce-admin' ), + 'description' => __( 'Number of employees of the store.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'validate_callback' => 'rest_validate_request_arg', @@ -342,7 +342,7 @@ class OnboardingProfile extends \WC_REST_Data_Controller { ), 'revenue' => array( 'type' => 'string', - 'description' => __( 'Current annual revenue of the store.', 'woocommerce-admin' ), + 'description' => __( 'Current annual revenue of the store.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'validate_callback' => 'rest_validate_request_arg', @@ -358,7 +358,7 @@ class OnboardingProfile extends \WC_REST_Data_Controller { ), 'other_platform' => array( 'type' => 'string', - 'description' => __( 'Name of other platform used to sell.', 'woocommerce-admin' ), + 'description' => __( 'Name of other platform used to sell.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'validate_callback' => 'rest_validate_request_arg', @@ -376,14 +376,14 @@ class OnboardingProfile extends \WC_REST_Data_Controller { ), 'other_platform_name' => array( 'type' => 'string', - 'description' => __( 'Name of other platform used to sell (not listed).', 'woocommerce-admin' ), + 'description' => __( 'Name of other platform used to sell (not listed).', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'validate_callback' => 'rest_validate_request_arg', ), 'business_extensions' => array( 'type' => 'array', - 'description' => __( 'Extra business extensions to install.', 'woocommerce-admin' ), + 'description' => __( 'Extra business extensions to install.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'sanitize_callback' => 'wp_parse_slug_list', @@ -404,7 +404,7 @@ class OnboardingProfile extends \WC_REST_Data_Controller { ), 'theme' => array( 'type' => 'string', - 'description' => __( 'Selected store theme.', 'woocommerce-admin' ), + 'description' => __( 'Selected store theme.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'sanitize_callback' => 'sanitize_title_with_dashes', @@ -412,28 +412,28 @@ class OnboardingProfile extends \WC_REST_Data_Controller { ), 'setup_client' => array( 'type' => 'boolean', - 'description' => __( 'Whether or not this store was setup for a client.', 'woocommerce-admin' ), + 'description' => __( 'Whether or not this store was setup for a client.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'validate_callback' => 'rest_validate_request_arg', ), 'wccom_connected' => array( 'type' => 'boolean', - 'description' => __( 'Whether or not the store was connected to WooCommerce.com during the extension flow.', 'woocommerce-admin' ), + 'description' => __( 'Whether or not the store was connected to WooCommerce.com during the extension flow.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'validate_callback' => 'rest_validate_request_arg', ), 'is_agree_marketing' => array( 'type' => 'boolean', - 'description' => __( 'Whether or not this store agreed to receiving marketing contents from WooCommerce.com.', 'woocommerce-admin' ), + 'description' => __( 'Whether or not this store agreed to receiving marketing contents from WooCommerce.com.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'validate_callback' => 'rest_validate_request_arg', ), 'store_email' => array( 'type' => 'string', - 'description' => __( 'Store email address.', 'woocommerce-admin' ), + 'description' => __( 'Store email address.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, 'validate_callback' => array( __CLASS__, 'rest_validate_marketing_email' ), @@ -456,7 +456,7 @@ class OnboardingProfile extends \WC_REST_Data_Controller { if ( ( $is_agree_marketing || ! empty( $value ) ) && ! is_email( $value ) ) { - return new \WP_Error( 'rest_invalid_email', __( 'Invalid email address', 'woocommerce-admin' ) ); + return new \WP_Error( 'rest_invalid_email', __( 'Invalid email address', 'woocommerce' ) ); }; return true; } diff --git a/plugins/woocommerce/src/Admin/API/OnboardingTasks.php b/plugins/woocommerce/src/Admin/API/OnboardingTasks.php index 9fded2cd6d6..f1b597f6380 100644 --- a/plugins/woocommerce/src/Admin/API/OnboardingTasks.php +++ b/plugins/woocommerce/src/Admin/API/OnboardingTasks.php @@ -91,7 +91,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { 'template_name' => array( 'required' => true, 'type' => 'string', - 'description' => __( 'Product template name.', 'woocommerce-admin' ), + 'description' => __( 'Product template name.', 'woocommerce' ), ), ) ), @@ -110,7 +110,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { 'permission_callback' => array( $this, 'get_tasks_permission_check' ), 'args' => array( 'ids' => array( - 'description' => __( 'Optional parameter to get only specific task lists by id.', 'woocommerce-admin' ), + 'description' => __( 'Optional parameter to get only specific task lists by id.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', @@ -189,14 +189,14 @@ class OnboardingTasks extends \WC_REST_Data_Controller { array( 'args' => array( 'duration' => array( - 'description' => __( 'Time period to snooze the task.', 'woocommerce-admin' ), + 'description' => __( 'Time period to snooze the task.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => function( $param, $request, $key ) { return in_array( $param, array_keys( $this->duration_to_ms ), true ); }, ), 'task_list_id' => array( - 'description' => __( 'Optional parameter to query specific task list.', 'woocommerce-admin' ), + 'description' => __( 'Optional parameter to query specific task list.', 'woocommerce' ), 'type' => 'string', ), ), @@ -244,7 +244,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { */ public function create_products_permission_check( $request ) { if ( ! wc_rest_check_post_permissions( 'product', 'create' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_create', __( 'Sorry, you are not allowed to create resources.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_create', __( 'Sorry, you are not allowed to create resources.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; @@ -258,7 +258,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { */ public function create_pages_permission_check( $request ) { if ( ! wc_rest_check_post_permissions( 'page', 'create' ) || ! current_user_can( 'manage_options' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_create', __( 'Sorry, you are not allowed to create new pages.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_create', __( 'Sorry, you are not allowed to create new pages.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; @@ -272,7 +272,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { */ public function get_tasks_permission_check( $request ) { if ( ! current_user_can( 'manage_woocommerce' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_create', __( 'Sorry, you are not allowed to retrieve onboarding tasks.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_create', __( 'Sorry, you are not allowed to retrieve onboarding tasks.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; @@ -286,7 +286,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { */ public function hide_task_list_permission_check( $request ) { if ( ! current_user_can( 'manage_woocommerce' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_update', __( 'Sorry, you are not allowed to hide task lists.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_update', __( 'Sorry, you are not allowed to hide task lists.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; @@ -300,7 +300,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { */ public function snooze_task_permissions_check( $request ) { if ( ! current_user_can( 'manage_woocommerce' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_create', __( 'Sorry, you are not allowed to snooze onboarding tasks.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_create', __( 'Sorry, you are not allowed to snooze onboarding tasks.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; @@ -329,7 +329,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { $import = $importer->import(); return $import; } else { - return new \WP_Error( 'woocommerce_rest_import_error', __( 'Sorry, the sample products data file was not found.', 'woocommerce-admin' ) ); + return new \WP_Error( 'woocommerce_rest_import_error', __( 'Sorry, the sample products data file was not found.', 'woocommerce' ) ); } } @@ -365,7 +365,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { return new \WP_Error( 'woocommerce_rest_product_creation_error', /* translators: %s is template name */ - __( 'Sorry, creating the product with template failed.', 'woocommerce-admin' ), + __( 'Sorry, creating the product with template failed.', 'woocommerce' ), array( 'status' => 500 ) ); } @@ -439,31 +439,31 @@ class OnboardingTasks extends \WC_REST_Data_Controller { $shop_url = get_permalink( wc_get_page_id( 'shop' ) ); if ( ! empty( $image['url'] ) && ! empty( $image['id'] ) ) { return ' -
-

' . __( 'Welcome to the store', 'woocommerce-admin' ) . '

+
+

' . __( 'Welcome to the store', 'woocommerce' ) . '

-

' . __( 'Write a short welcome message here', 'woocommerce-admin' ) . '

+

' . __( 'Write a short welcome message here', 'woocommerce' ) . '

- +
'; } return ' -
-

' . __( 'Welcome to the store', 'woocommerce-admin' ) . '

+
+

' . __( 'Welcome to the store', 'woocommerce' ) . '

-

' . __( 'Write a short welcome message here', 'woocommerce-admin' ) . '

+

' . __( 'Write a short welcome message here', 'woocommerce' ) . '

- +
'; } @@ -482,14 +482,14 @@ class OnboardingTasks extends \WC_REST_Data_Controller { if ( ! empty( $image['url'] ) && ! empty( $image['id'] ) ) { return ' -
+

'; } return ' -
+

'; @@ -509,25 +509,25 @@ class OnboardingTasks extends \WC_REST_Data_Controller { $image_1 = ! empty( $images[0] ) ? $images[0] : ''; $template = self::get_homepage_cover_block( $image_1 ) . ' -

' . __( 'Shop by Category', 'woocommerce-admin' ) . '

+

' . __( 'Shop by Category', 'woocommerce' ) . '

[product_categories number="0" parent="0"] -

' . __( 'New In', 'woocommerce-admin' ) . '

+

' . __( 'New In', 'woocommerce' ) . '

-

' . __( 'Fan Favorites', 'woocommerce-admin' ) . '

+

' . __( 'Fan Favorites', 'woocommerce' ) . '

-

' . __( 'On Sale', 'woocommerce-admin' ) . '

+

' . __( 'On Sale', 'woocommerce' ) . '

-

' . __( 'Best Sellers', 'woocommerce-admin' ) . '

+

' . __( 'Best Sellers', 'woocommerce' ) . '

'; @@ -546,7 +546,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { $image_3 = ! empty( $images[2] ) ? $images[2] : ''; $template = self::get_homepage_cover_block( $image_1 ) . ' -

' . __( 'New Products', 'woocommerce-admin' ) . '

+

' . __( 'New Products', 'woocommerce' ) . '

' . @@ -648,7 +648,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { public static function create_homepage() { $post_id = wp_insert_post( array( - 'post_title' => __( 'Homepage', 'woocommerce-admin' ), + 'post_title' => __( 'Homepage', 'woocommerce' ), 'post_type' => 'page', 'post_status' => 'publish', 'post_content' => '', // Template content is updated below, so images can be attached to the post. @@ -676,7 +676,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { return array( 'status' => 'success', - 'message' => __( 'Homepage created', 'woocommerce-admin' ), + 'message' => __( 'Homepage created', 'woocommerce' ), 'post_id' => $post_id, 'edit_post_link' => htmlspecialchars_decode( get_edit_post_link( $post_id ) ), ); @@ -693,7 +693,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { public function get_task_list_params() { $params = array(); $params['ids'] = array( - 'description' => __( 'Optional parameter to get only specific task lists by id.', 'woocommerce-admin' ), + 'description' => __( 'Optional parameter to get only specific task lists by id.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', @@ -703,7 +703,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { ), ); $params['extended_tasks'] = array( - 'description' => __( 'List of extended deprecated tasks from the client side filter.', 'woocommerce-admin' ), + 'description' => __( 'List of extended deprecated tasks from the client side filter.', 'woocommerce' ), 'type' => 'array', 'validate_callback' => function( $param, $request, $key ) { $has_valid_keys = true; @@ -764,7 +764,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { if ( ! $task || ! $task->is_dismissable() ) { return new \WP_Error( 'woocommerce_rest_invalid_task', - __( 'Sorry, no dismissable task with that ID was found.', 'woocommerce-admin' ), + __( 'Sorry, no dismissable task with that ID was found.', 'woocommerce' ), array( 'status' => 404, ) @@ -797,7 +797,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { if ( ! $task || ! $task->is_dismissable() ) { return new \WP_Error( 'woocommerce_rest_invalid_task', - __( 'Sorry, no dismissable task with that ID was found.', 'woocommerce-admin' ), + __( 'Sorry, no dismissable task with that ID was found.', 'woocommerce' ), array( 'status' => 404, ) @@ -835,7 +835,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { if ( ! $task || ! $task->is_snoozeable() ) { return new \WP_Error( 'woocommerce_rest_invalid_task', - __( 'Sorry, no snoozeable task with that ID was found.', 'woocommerce-admin' ), + __( 'Sorry, no snoozeable task with that ID was found.', 'woocommerce' ), array( 'status' => 404, ) @@ -868,7 +868,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { if ( ! $task || ! $task->is_snoozeable() ) { return new \WP_Error( 'woocommerce_rest_invalid_task', - __( 'Sorry, no snoozeable task with that ID was found.', 'woocommerce-admin' ), + __( 'Sorry, no snoozeable task with that ID was found.', 'woocommerce' ), array( 'status' => 404, ) @@ -893,7 +893,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { if ( ! $task_list ) { return new \WP_Error( 'woocommerce_rest_invalid_task_list', - __( 'Sorry, that task list was not found', 'woocommerce-admin' ), + __( 'Sorry, that task list was not found', 'woocommerce' ), array( 'status' => 404, ) @@ -920,7 +920,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { if ( ! $task_list ) { return new \WP_Error( 'woocommerce_tasks_invalid_task_list', - __( 'Sorry, that task list was not found', 'woocommerce-admin' ), + __( 'Sorry, that task list was not found', 'woocommerce' ), array( 'status' => 404, ) @@ -954,7 +954,7 @@ class OnboardingTasks extends \WC_REST_Data_Controller { if ( ! $task ) { return new \WP_Error( 'woocommerce_rest_invalid_task', - __( 'Sorry, no task with that ID was found.', 'woocommerce-admin' ), + __( 'Sorry, no task with that ID was found.', 'woocommerce' ), array( 'status' => 404, ) diff --git a/plugins/woocommerce/src/Admin/API/OnboardingThemes.php b/plugins/woocommerce/src/Admin/API/OnboardingThemes.php index df1ea4945bc..62c1fb807e8 100644 --- a/plugins/woocommerce/src/Admin/API/OnboardingThemes.php +++ b/plugins/woocommerce/src/Admin/API/OnboardingThemes.php @@ -71,7 +71,7 @@ class OnboardingThemes extends \WC_REST_Data_Controller { */ public function update_item_permissions_check( $request ) { if ( ! current_user_can( 'switch_themes' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_update', __( 'Sorry, you cannot manage themes.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_update', __( 'Sorry, you cannot manage themes.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; } @@ -87,7 +87,7 @@ class OnboardingThemes extends \WC_REST_Data_Controller { $theme = sanitize_text_field( $request['theme'] ); if ( ! in_array( $theme, $allowed_themes, true ) ) { - return new \WP_Error( 'woocommerce_rest_invalid_theme', __( 'Invalid theme.', 'woocommerce-admin' ), 404 ); + return new \WP_Error( 'woocommerce_rest_invalid_theme', __( 'Invalid theme.', 'woocommerce' ), 404 ); } $installed_themes = wp_get_themes(); @@ -121,7 +121,7 @@ class OnboardingThemes extends \WC_REST_Data_Controller { 'woocommerce_rest_theme_install', sprintf( /* translators: %s: theme slug (example: woocommerce-services) */ - __( 'The requested theme `%s` could not be installed. Theme API call failed.', 'woocommerce-admin' ), + __( 'The requested theme `%s` could not be installed. Theme API call failed.', 'woocommerce' ), $theme ), 500 @@ -136,7 +136,7 @@ class OnboardingThemes extends \WC_REST_Data_Controller { 'woocommerce_rest_theme_install', sprintf( /* translators: %s: theme slug (example: woocommerce-services) */ - __( 'The requested theme `%s` could not be installed.', 'woocommerce-admin' ), + __( 'The requested theme `%s` could not be installed.', 'woocommerce' ), $theme ), 500 @@ -160,7 +160,7 @@ class OnboardingThemes extends \WC_REST_Data_Controller { $allowed_themes = Themes::get_allowed_themes(); $theme = sanitize_text_field( $request['theme'] ); if ( ! in_array( $theme, $allowed_themes, true ) ) { - return new \WP_Error( 'woocommerce_rest_invalid_theme', __( 'Invalid theme.', 'woocommerce-admin' ), 404 ); + return new \WP_Error( 'woocommerce_rest_invalid_theme', __( 'Invalid theme.', 'woocommerce' ), 404 ); } require_once ABSPATH . 'wp-admin/includes/theme.php'; @@ -169,12 +169,12 @@ class OnboardingThemes extends \WC_REST_Data_Controller { if ( ! in_array( $theme, array_keys( $installed_themes ), true ) ) { /* translators: %s: theme slug (example: woocommerce-services) */ - return new \WP_Error( 'woocommerce_rest_invalid_theme', sprintf( __( 'Invalid theme %s.', 'woocommerce-admin' ), $theme ), 404 ); + return new \WP_Error( 'woocommerce_rest_invalid_theme', sprintf( __( 'Invalid theme %s.', 'woocommerce' ), $theme ), 404 ); } $result = switch_theme( $theme ); if ( ! is_null( $result ) ) { - return new \WP_Error( 'woocommerce_rest_invalid_theme', sprintf( __( 'The requested theme could not be activated.', 'woocommerce-admin' ), $theme ), 500 ); + return new \WP_Error( 'woocommerce_rest_invalid_theme', sprintf( __( 'The requested theme could not be activated.', 'woocommerce' ), $theme ), 500 ); } return( array( @@ -196,19 +196,19 @@ class OnboardingThemes extends \WC_REST_Data_Controller { 'type' => 'object', 'properties' => array( 'slug' => array( - 'description' => __( 'Theme slug.', 'woocommerce-admin' ), + 'description' => __( 'Theme slug.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'name' => array( - 'description' => __( 'Theme name.', 'woocommerce-admin' ), + 'description' => __( 'Theme name.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'status' => array( - 'description' => __( 'Theme status.', 'woocommerce-admin' ), + 'description' => __( 'Theme status.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, diff --git a/plugins/woocommerce/src/Admin/API/Options.php b/plugins/woocommerce/src/Admin/API/Options.php index bfcdeada250..90537163d54 100644 --- a/plugins/woocommerce/src/Admin/API/Options.php +++ b/plugins/woocommerce/src/Admin/API/Options.php @@ -72,12 +72,12 @@ class Options extends \WC_REST_Data_Controller { $params = explode( ',', $request['options'] ); if ( ! isset( $request['options'] ) || ! is_array( $params ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'You must supply an array of options.', 'woocommerce-admin' ), 500 ); + return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'You must supply an array of options.', 'woocommerce' ), 500 ); } foreach ( $params as $option ) { if ( ! $this->user_has_permission( $option, $request ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot view these options.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot view these options.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } } @@ -113,12 +113,12 @@ class Options extends \WC_REST_Data_Controller { $params = $request->get_json_params(); if ( ! is_array( $params ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_update', __( 'You must supply an array of options and values.', 'woocommerce-admin' ), 500 ); + return new \WP_Error( 'woocommerce_rest_cannot_update', __( 'You must supply an array of options and values.', 'woocommerce' ), 500 ); } foreach ( $params as $option_name => $option_value ) { if ( ! $this->user_has_permission( $option_name, $request, true ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_update', __( 'Sorry, you cannot manage these options.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_update', __( 'Sorry, you cannot manage these options.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } } @@ -248,7 +248,7 @@ class Options extends \WC_REST_Data_Controller { 'properties' => array( 'options' => array( 'type' => 'array', - 'description' => __( 'Array of options with associated values.', 'woocommerce-admin' ), + 'description' => __( 'Array of options with associated values.', 'woocommerce' ), 'context' => array( 'view' ), 'readonly' => true, ), diff --git a/plugins/woocommerce/src/Admin/API/Orders.php b/plugins/woocommerce/src/Admin/API/Orders.php index 24039925183..e85bec04c10 100644 --- a/plugins/woocommerce/src/Admin/API/Orders.php +++ b/plugins/woocommerce/src/Admin/API/Orders.php @@ -34,7 +34,7 @@ class Orders extends \WC_REST_Orders_Controller { $params = parent::get_collection_params(); // This needs to remain a string to support extensions that filter Order Number. $params['number'] = array( - 'description' => __( 'Limit result set to orders matching part of an order number.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to orders matching part of an order number.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); diff --git a/plugins/woocommerce/src/Admin/API/PaymentGatewaySuggestions.php b/plugins/woocommerce/src/Admin/API/PaymentGatewaySuggestions.php index 71cc2b94acb..05c28f284af 100644 --- a/plugins/woocommerce/src/Admin/API/PaymentGatewaySuggestions.php +++ b/plugins/woocommerce/src/Admin/API/PaymentGatewaySuggestions.php @@ -73,7 +73,7 @@ class PaymentGatewaySuggestions extends \WC_REST_Data_Controller { */ public function get_permission_check( $request ) { if ( ! current_user_can( 'install_plugins' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_update', __( 'Sorry, you cannot manage plugins.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_update', __( 'Sorry, you cannot manage plugins.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; } @@ -114,43 +114,43 @@ class PaymentGatewaySuggestions extends \WC_REST_Data_Controller { 'type' => 'array', 'properties' => array( 'content' => array( - 'description' => __( 'Suggestion description.', 'woocommerce-admin' ), + 'description' => __( 'Suggestion description.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'id' => array( - 'description' => __( 'Suggestion ID.', 'woocommerce-admin' ), + 'description' => __( 'Suggestion ID.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'image' => array( - 'description' => __( 'Gateway image.', 'woocommerce-admin' ), + 'description' => __( 'Gateway image.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'is_visible' => array( - 'description' => __( 'Suggestion visibility.', 'woocommerce-admin' ), + 'description' => __( 'Suggestion visibility.', 'woocommerce' ), 'type' => 'boolean', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'plugins' => array( - 'description' => __( 'Array of plugin slugs.', 'woocommerce-admin' ), + 'description' => __( 'Array of plugin slugs.', 'woocommerce' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'recommendation_priority' => array( - 'description' => __( 'Priority of recommendation.', 'woocommerce-admin' ), + 'description' => __( 'Priority of recommendation.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'title' => array( - 'description' => __( 'Gateway title.', 'woocommerce-admin' ), + 'description' => __( 'Gateway title.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, diff --git a/plugins/woocommerce/src/Admin/API/Plugins.php b/plugins/woocommerce/src/Admin/API/Plugins.php index 3d189532cba..86a869e160d 100644 --- a/plugins/woocommerce/src/Admin/API/Plugins.php +++ b/plugins/woocommerce/src/Admin/API/Plugins.php @@ -217,7 +217,7 @@ class Plugins extends \WC_REST_Data_Controller { */ public function update_item_permissions_check( $request ) { if ( ! current_user_can( 'install_plugins' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_update', __( 'Sorry, you cannot manage plugins.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_update', __( 'Sorry, you cannot manage plugins.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; } @@ -245,7 +245,7 @@ class Plugins extends \WC_REST_Data_Controller { $plugins = explode( ',', $request['plugins'] ); if ( empty( $request['plugins'] ) || ! is_array( $plugins ) ) { - return new \WP_Error( 'woocommerce_rest_invalid_plugins', __( 'Plugins must be a non-empty array.', 'woocommerce-admin' ), 404 ); + return new \WP_Error( 'woocommerce_rest_invalid_plugins', __( 'Plugins must be a non-empty array.', 'woocommerce' ), 404 ); } if ( isset( $request['async'] ) && $request['async'] ) { @@ -256,7 +256,7 @@ class Plugins extends \WC_REST_Data_Controller { 'job_id' => $job_id, 'plugins' => $plugins, ), - 'message' => __( 'Plugin installation has been scheduled.', 'woocommerce-admin' ), + 'message' => __( 'Plugin installation has been scheduled.', 'woocommerce' ), ); } @@ -271,8 +271,8 @@ class Plugins extends \WC_REST_Data_Controller { 'errors' => $data['errors'], 'success' => count( $data['errors']->errors ) === 0, 'message' => count( $data['errors']->errors ) === 0 - ? __( 'Plugins were successfully installed.', 'woocommerce-admin' ) - : __( 'There was a problem installing some of the requested plugins.', 'woocommerce-admin' ), + ? __( 'Plugins were successfully installed.', 'woocommerce' ) + : __( 'There was a problem installing some of the requested plugins.', 'woocommerce' ), ); } @@ -340,7 +340,7 @@ class Plugins extends \WC_REST_Data_Controller { $plugins = explode( ',', $request['plugins'] ); if ( empty( $request['plugins'] ) || ! is_array( $plugins ) ) { - return new \WP_Error( 'woocommerce_rest_invalid_plugins', __( 'Plugins must be a non-empty array.', 'woocommerce-admin' ), 404 ); + return new \WP_Error( 'woocommerce_rest_invalid_plugins', __( 'Plugins must be a non-empty array.', 'woocommerce' ), 404 ); } if ( isset( $request['async'] ) && $request['async'] ) { @@ -351,7 +351,7 @@ class Plugins extends \WC_REST_Data_Controller { 'job_id' => $job_id, 'plugins' => $plugins, ), - 'message' => __( 'Plugin activation has been scheduled.', 'woocommerce-admin' ), + 'message' => __( 'Plugin activation has been scheduled.', 'woocommerce' ), ); } @@ -365,8 +365,8 @@ class Plugins extends \WC_REST_Data_Controller { 'errors' => $data['errors'], 'success' => count( $data['errors']->errors ) === 0, 'message' => count( $data['errors']->errors ) === 0 - ? __( 'Plugins were successfully activated.', 'woocommerce-admin' ) - : __( 'There was a problem activating some of the requested plugins.', 'woocommerce-admin' ), + ? __( 'Plugins were successfully activated.', 'woocommerce' ) + : __( 'There was a problem activating some of the requested plugins.', 'woocommerce' ), ) ); } @@ -400,7 +400,7 @@ class Plugins extends \WC_REST_Data_Controller { */ public function connect_jetpack( $request ) { if ( ! class_exists( '\Jetpack' ) ) { - return new \WP_Error( 'woocommerce_rest_jetpack_not_active', __( 'Jetpack is not installed or active.', 'woocommerce-admin' ), 404 ); + return new \WP_Error( 'woocommerce_rest_jetpack_not_active', __( 'Jetpack is not installed or active.', 'woocommerce' ), 404 ); } $redirect_url = apply_filters( 'woocommerce_admin_onboarding_jetpack_connect_redirect_url', esc_url_raw( $request['redirect_url'] ) ); @@ -411,7 +411,7 @@ class Plugins extends \WC_REST_Data_Controller { return( array( 'slug' => 'jetpack', - 'name' => __( 'Jetpack', 'woocommerce-admin' ), + 'name' => __( 'Jetpack', 'woocommerce' ), 'connectAction' => $connect_url, ) ); } @@ -424,7 +424,7 @@ class Plugins extends \WC_REST_Data_Controller { public function request_wccom_connect() { include_once WC_ABSPATH . 'includes/admin/helper/class-wc-helper-api.php'; if ( ! class_exists( 'WC_Helper_API' ) ) { - return new \WP_Error( 'woocommerce_rest_helper_not_active', __( 'There was an error loading the WooCommerce.com Helper API.', 'woocommerce-admin' ), 404 ); + return new \WP_Error( 'woocommerce_rest_helper_not_active', __( 'There was an error loading the WooCommerce.com Helper API.', 'woocommerce' ), 404 ); } $redirect_uri = wc_admin_url( '&task=connect&wccom-connected=1' ); @@ -441,12 +441,12 @@ class Plugins extends \WC_REST_Data_Controller { $code = wp_remote_retrieve_response_code( $request ); if ( 200 !== $code ) { - return new \WP_Error( 'woocommerce_rest_helper_connect', __( 'There was an error connecting to WooCommerce.com. Please try again.', 'woocommerce-admin' ), 500 ); + return new \WP_Error( 'woocommerce_rest_helper_connect', __( 'There was an error connecting to WooCommerce.com. Please try again.', 'woocommerce' ), 500 ); } $secret = json_decode( wp_remote_retrieve_body( $request ) ); if ( empty( $secret ) ) { - return new \WP_Error( 'woocommerce_rest_helper_connect', __( 'There was an error connecting to WooCommerce.com. Please try again.', 'woocommerce-admin' ), 500 ); + return new \WP_Error( 'woocommerce_rest_helper_connect', __( 'There was an error connecting to WooCommerce.com. Please try again.', 'woocommerce' ), 500 ); } do_action( 'woocommerce_helper_connect_start' ); @@ -487,7 +487,7 @@ class Plugins extends \WC_REST_Data_Controller { include_once WC_ABSPATH . 'includes/admin/helper/class-wc-helper-updater.php'; include_once WC_ABSPATH . 'includes/admin/helper/class-wc-helper-options.php'; if ( ! class_exists( 'WC_Helper_API' ) ) { - return new \WP_Error( 'woocommerce_rest_helper_not_active', __( 'There was an error loading the WooCommerce.com Helper API.', 'woocommerce-admin' ), 404 ); + return new \WP_Error( 'woocommerce_rest_helper_not_active', __( 'There was an error loading the WooCommerce.com Helper API.', 'woocommerce' ), 404 ); } // Obtain an access token. @@ -503,12 +503,12 @@ class Plugins extends \WC_REST_Data_Controller { $code = wp_remote_retrieve_response_code( $request ); if ( 200 !== $code ) { - return new \WP_Error( 'woocommerce_rest_helper_connect', __( 'There was an error connecting to WooCommerce.com. Please try again.', 'woocommerce-admin' ), 500 ); + return new \WP_Error( 'woocommerce_rest_helper_connect', __( 'There was an error connecting to WooCommerce.com. Please try again.', 'woocommerce' ), 500 ); } $access_token = json_decode( wp_remote_retrieve_body( $request ), true ); if ( ! $access_token ) { - return new \WP_Error( 'woocommerce_rest_helper_connect', __( 'There was an error connecting to WooCommerce.com. Please try again.', 'woocommerce-admin' ), 500 ); + return new \WP_Error( 'woocommerce_rest_helper_connect', __( 'There was an error connecting to WooCommerce.com. Please try again.', 'woocommerce' ), 500 ); } \WC_Helper_Options::update( @@ -524,7 +524,7 @@ class Plugins extends \WC_REST_Data_Controller { if ( ! \WC_Helper::_flush_authentication_cache() ) { \WC_Helper_Options::update( 'auth', array() ); - return new \WP_Error( 'woocommerce_rest_helper_connect', __( 'There was an error connecting to WooCommerce.com. Please try again.', 'woocommerce-admin' ), 500 ); + return new \WP_Error( 'woocommerce_rest_helper_connect', __( 'There was an error connecting to WooCommerce.com. Please try again.', 'woocommerce' ), 500 ); } delete_transient( '_woocommerce_helper_subscriptions' ); @@ -545,7 +545,7 @@ class Plugins extends \WC_REST_Data_Controller { */ public function connect_square() { if ( ! class_exists( '\WooCommerce\Square\Handlers\Connection' ) ) { - return new \WP_Error( 'woocommerce_rest_helper_connect', __( 'There was an error connecting to Square.', 'woocommerce-admin' ), 500 ); + return new \WP_Error( 'woocommerce_rest_helper_connect', __( 'There was an error connecting to Square.', 'woocommerce' ), 500 ); } if ( 'US' === WC()->countries->get_base_country() ) { @@ -597,7 +597,7 @@ class Plugins extends \WC_REST_Data_Controller { */ public function connect_wcpay() { if ( ! class_exists( 'WC_Payments_Account' ) ) { - return new \WP_Error( 'woocommerce_rest_helper_connect', __( 'There was an error communicating with the WooCommerce Payments plugin.', 'woocommerce-admin' ), 500 ); + return new \WP_Error( 'woocommerce_rest_helper_connect', __( 'There was an error communicating with the WooCommerce Payments plugin.', 'woocommerce' ), 500 ); } $connect_url = add_query_arg( @@ -625,19 +625,19 @@ class Plugins extends \WC_REST_Data_Controller { 'type' => 'object', 'properties' => array( 'slug' => array( - 'description' => __( 'Plugin slug.', 'woocommerce-admin' ), + 'description' => __( 'Plugin slug.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'name' => array( - 'description' => __( 'Plugin name.', 'woocommerce-admin' ), + 'description' => __( 'Plugin name.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'status' => array( - 'description' => __( 'Plugin status.', 'woocommerce-admin' ), + 'description' => __( 'Plugin status.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -657,7 +657,7 @@ class Plugins extends \WC_REST_Data_Controller { $schema = $this->get_item_schema(); unset( $schema['properties']['status'] ); $schema['properties']['connectAction'] = array( - 'description' => __( 'Action that should be completed to connect Jetpack.', 'woocommerce-admin' ), + 'description' => __( 'Action that should be completed to connect Jetpack.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, diff --git a/plugins/woocommerce/src/Admin/API/ProductAttributeTerms.php b/plugins/woocommerce/src/Admin/API/ProductAttributeTerms.php index 5eb0dd38594..1ec9ce71d43 100644 --- a/plugins/woocommerce/src/Admin/API/ProductAttributeTerms.php +++ b/plugins/woocommerce/src/Admin/API/ProductAttributeTerms.php @@ -38,7 +38,7 @@ class ProductAttributeTerms extends \WC_REST_Product_Attribute_Terms_Controller array( 'args' => array( 'slug' => array( - 'description' => __( 'Slug identifier for the resource.', 'woocommerce-admin' ), + 'description' => __( 'Slug identifier for the resource.', 'woocommerce' ), 'type' => 'string', ), ), @@ -63,7 +63,7 @@ class ProductAttributeTerms extends \WC_REST_Product_Attribute_Terms_Controller if ( ! wc_rest_check_manager_permissions( 'attributes', 'read' ) ) { return new WP_Error( 'woocommerce_rest_cannot_view', - __( 'Sorry, you cannot view this resource.', 'woocommerce-admin' ), + __( 'Sorry, you cannot view this resource.', 'woocommerce' ), array( 'status' => rest_authorization_required_code(), ) diff --git a/plugins/woocommerce/src/Admin/API/ProductAttributes.php b/plugins/woocommerce/src/Admin/API/ProductAttributes.php index 3e091ff64d2..a82963e9d00 100644 --- a/plugins/woocommerce/src/Admin/API/ProductAttributes.php +++ b/plugins/woocommerce/src/Admin/API/ProductAttributes.php @@ -37,7 +37,7 @@ class ProductAttributes extends \WC_REST_Product_Attributes_Controller { array( 'args' => array( 'slug' => array( - 'description' => __( 'Slug identifier for the resource.', 'woocommerce-admin' ), + 'description' => __( 'Slug identifier for the resource.', 'woocommerce' ), 'type' => 'string', ), ), @@ -59,7 +59,7 @@ class ProductAttributes extends \WC_REST_Product_Attributes_Controller { public function get_collection_params() { $params = parent::get_collection_params(); $params['search'] = array( - 'description' => __( 'Search by similar attribute name.', 'woocommerce-admin' ), + 'description' => __( 'Search by similar attribute name.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); diff --git a/plugins/woocommerce/src/Admin/API/ProductVariations.php b/plugins/woocommerce/src/Admin/API/ProductVariations.php index 44f1ac8b777..a5307500a9b 100644 --- a/plugins/woocommerce/src/Admin/API/ProductVariations.php +++ b/plugins/woocommerce/src/Admin/API/ProductVariations.php @@ -53,7 +53,7 @@ class ProductVariations extends \WC_REST_Product_Variations_Controller { public function get_collection_params() { $params = parent::get_collection_params(); $params['search'] = array( - 'description' => __( 'Search by similar product name, sku, or attribute value.', 'woocommerce-admin' ), + 'description' => __( 'Search by similar product name, sku, or attribute value.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); @@ -163,19 +163,19 @@ class ProductVariations extends \WC_REST_Product_Variations_Controller { $schema = parent::get_item_schema(); $schema['properties']['name'] = array( - 'description' => __( 'Product parent name.', 'woocommerce-admin' ), + 'description' => __( 'Product parent name.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), ); $schema['properties']['type'] = array( - 'description' => __( 'Product type.', 'woocommerce-admin' ), + 'description' => __( 'Product type.', 'woocommerce' ), 'type' => 'string', 'default' => 'variation', 'enum' => array( 'variation' ), 'context' => array( 'view', 'edit' ), ); $schema['properties']['parent_id'] = array( - 'description' => __( 'Product parent ID.', 'woocommerce-admin' ), + 'description' => __( 'Product parent ID.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), ); diff --git a/plugins/woocommerce/src/Admin/API/Products.php b/plugins/woocommerce/src/Admin/API/Products.php index e129a93154f..2e9e16c7aab 100644 --- a/plugins/woocommerce/src/Admin/API/Products.php +++ b/plugins/woocommerce/src/Admin/API/Products.php @@ -54,7 +54,7 @@ class Products extends \WC_REST_Products_Controller { } $schema['properties']['last_order_date'] = array( - 'description' => __( "The date the last order for this product was placed, in the site's timezone.", 'woocommerce-admin' ), + 'description' => __( "The date the last order for this product was placed, in the site's timezone.", 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -71,13 +71,13 @@ class Products extends \WC_REST_Products_Controller { public function get_collection_params() { $params = parent::get_collection_params(); $params['low_in_stock'] = array( - 'description' => __( 'Limit result set to products that are low or out of stock. (Deprecated)', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to products that are low or out of stock. (Deprecated)', 'woocommerce' ), 'type' => 'boolean', 'default' => false, 'sanitize_callback' => 'wc_string_to_bool', ); $params['search'] = array( - 'description' => __( 'Search by similar product name or sku.', 'woocommerce-admin' ), + 'description' => __( 'Search by similar product name or sku.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); diff --git a/plugins/woocommerce/src/Admin/API/ProductsLowInStock.php b/plugins/woocommerce/src/Admin/API/ProductsLowInStock.php index d4d88eea9d4..0457eefea60 100644 --- a/plugins/woocommerce/src/Admin/API/ProductsLowInStock.php +++ b/plugins/woocommerce/src/Admin/API/ProductsLowInStock.php @@ -288,7 +288,7 @@ final class ProductsLowInStock extends \WC_REST_Products_Controller { $params['context']['default'] = 'view'; $params['page'] = array( - 'description' => __( 'Current page of the collection.', 'woocommerce-admin' ), + 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', @@ -296,7 +296,7 @@ final class ProductsLowInStock extends \WC_REST_Products_Controller { 'minimum' => 1, ); $params['per_page'] = array( - 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce-admin' ), + 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 10, 'minimum' => 1, @@ -307,7 +307,7 @@ final class ProductsLowInStock extends \WC_REST_Products_Controller { $params['status'] = array( 'default' => 'publish', - 'description' => __( 'Limit result set to products assigned a specific status.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to products assigned a specific status.', 'woocommerce' ), 'type' => 'string', 'enum' => array_merge( array_keys( get_post_statuses() ), array( 'future' ) ), 'sanitize_callback' => 'sanitize_key', diff --git a/plugins/woocommerce/src/Admin/API/Reports/Categories/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Categories/Controller.php index 19d0d7dbd2c..ea114f07bb8 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Categories/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Categories/Controller.php @@ -73,7 +73,7 @@ class Controller extends ReportsController implements ExportableInterface { } if ( ! isset( $report_data->data ) || ! isset( $report_data->page_no ) || ! isset( $report_data->pages ) ) { - return new \WP_Error( 'woocommerce_rest_reports_categories_invalid_response', __( 'Invalid response from data store.', 'woocommerce-admin' ), array( 'status' => 500 ) ); + return new \WP_Error( 'woocommerce_rest_reports_categories_invalid_response', __( 'Invalid response from data store.', 'woocommerce' ), array( 'status' => 500 ) ); } $out_data = array(); @@ -165,31 +165,31 @@ class Controller extends ReportsController implements ExportableInterface { 'type' => 'object', 'properties' => array( 'category_id' => array( - 'description' => __( 'Category ID.', 'woocommerce-admin' ), + 'description' => __( 'Category ID.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'items_sold' => array( - 'description' => __( 'Amount of items sold.', 'woocommerce-admin' ), + 'description' => __( 'Amount of items sold.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'net_revenue' => array( - 'description' => __( 'Total sales.', 'woocommerce-admin' ), + 'description' => __( 'Total sales.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'orders_count' => array( - 'description' => __( 'Number of orders.', 'woocommerce-admin' ), + 'description' => __( 'Number of orders.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'products_count' => array( - 'description' => __( 'Amount of products.', 'woocommerce-admin' ), + 'description' => __( 'Amount of products.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -199,7 +199,7 @@ class Controller extends ReportsController implements ExportableInterface { 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Category name.', 'woocommerce-admin' ), + 'description' => __( 'Category name.', 'woocommerce' ), ), ), ), @@ -217,7 +217,7 @@ class Controller extends ReportsController implements ExportableInterface { $params = array(); $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['page'] = array( - 'description' => __( 'Current page of the collection.', 'woocommerce-admin' ), + 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', @@ -225,7 +225,7 @@ class Controller extends ReportsController implements ExportableInterface { 'minimum' => 1, ); $params['per_page'] = array( - 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce-admin' ), + 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 10, 'minimum' => 1, @@ -234,26 +234,26 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['after'] = array( - 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['before'] = array( - 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['order'] = array( - 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce-admin' ), + 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ), 'type' => 'string', 'default' => 'desc', 'enum' => array( 'asc', 'desc' ), 'validate_callback' => 'rest_validate_request_arg', ); $params['orderby'] = array( - 'description' => __( 'Sort collection by object attribute.', 'woocommerce-admin' ), + 'description' => __( 'Sort collection by object attribute.', 'woocommerce' ), 'type' => 'string', 'default' => 'category_id', 'enum' => array( @@ -267,7 +267,7 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['interval'] = array( - 'description' => __( 'Time interval to use for buckets in the returned data.', 'woocommerce-admin' ), + 'description' => __( 'Time interval to use for buckets in the returned data.', 'woocommerce' ), 'type' => 'string', 'default' => 'week', 'enum' => array( @@ -281,7 +281,7 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['status_is'] = array( - 'description' => __( 'Limit result set to items that have the specified order status.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that have the specified order status.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', @@ -291,7 +291,7 @@ class Controller extends ReportsController implements ExportableInterface { ), ); $params['status_is_not'] = array( - 'description' => __( 'Limit result set to items that don\'t have the specified order status.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that don\'t have the specified order status.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', @@ -301,7 +301,7 @@ class Controller extends ReportsController implements ExportableInterface { ), ); $params['categories'] = array( - 'description' => __( 'Limit result set to all items that have the specified term assigned in the categories taxonomy.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to all items that have the specified term assigned in the categories taxonomy.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -310,7 +310,7 @@ class Controller extends ReportsController implements ExportableInterface { ), ); $params['extended_info'] = array( - 'description' => __( 'Add additional piece of info about each category to the report.', 'woocommerce-admin' ), + 'description' => __( 'Add additional piece of info about each category to the report.', 'woocommerce' ), 'type' => 'boolean', 'default' => false, 'sanitize_callback' => 'wc_string_to_bool', @@ -327,11 +327,11 @@ class Controller extends ReportsController implements ExportableInterface { */ public function get_export_columns() { $export_columns = array( - 'category' => __( 'Category', 'woocommerce-admin' ), - 'items_sold' => __( 'Items sold', 'woocommerce-admin' ), - 'net_revenue' => __( 'Net Revenue', 'woocommerce-admin' ), - 'products_count' => __( 'Products', 'woocommerce-admin' ), - 'orders_count' => __( 'Orders', 'woocommerce-admin' ), + 'category' => __( 'Category', 'woocommerce' ), + 'items_sold' => __( 'Items sold', 'woocommerce' ), + 'net_revenue' => __( 'Net Revenue', 'woocommerce' ), + 'products_count' => __( 'Products', 'woocommerce' ), + 'orders_count' => __( 'Orders', 'woocommerce' ), ); /** diff --git a/plugins/woocommerce/src/Admin/API/Reports/Categories/DataStore.php b/plugins/woocommerce/src/Admin/API/Reports/Categories/DataStore.php index e0e4a03ef24..869804394a6 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Categories/DataStore.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Categories/DataStore.php @@ -272,7 +272,7 @@ class DataStore extends ReportsDataStore implements DataStoreInterface { ); if ( null === $categories_data ) { - return new \WP_Error( 'woocommerce_analytics_categories_result_failed', __( 'Sorry, fetching revenue data failed.', 'woocommerce-admin' ), array( 'status' => 500 ) ); + return new \WP_Error( 'woocommerce_analytics_categories_result_failed', __( 'Sorry, fetching revenue data failed.', 'woocommerce' ), array( 'status' => 500 ) ); } $record_count = count( $categories_data ); diff --git a/plugins/woocommerce/src/Admin/API/Reports/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Controller.php index f16e6acf793..992ed93450b 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Controller.php @@ -58,7 +58,7 @@ class Controller extends \WC_REST_Reports_Controller { */ public function get_items_permissions_check( $request ) { if ( ! wc_rest_check_manager_permissions( 'reports', 'read' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; @@ -76,71 +76,71 @@ class Controller extends \WC_REST_Reports_Controller { $reports = array( array( 'slug' => 'performance-indicators', - 'description' => __( 'Batch endpoint for getting specific performance indicators from `stats` endpoints.', 'woocommerce-admin' ), + 'description' => __( 'Batch endpoint for getting specific performance indicators from `stats` endpoints.', 'woocommerce' ), ), array( 'slug' => 'revenue/stats', - 'description' => __( 'Stats about revenue.', 'woocommerce-admin' ), + 'description' => __( 'Stats about revenue.', 'woocommerce' ), ), array( 'slug' => 'orders/stats', - 'description' => __( 'Stats about orders.', 'woocommerce-admin' ), + 'description' => __( 'Stats about orders.', 'woocommerce' ), ), array( 'slug' => 'products', - 'description' => __( 'Products detailed reports.', 'woocommerce-admin' ), + 'description' => __( 'Products detailed reports.', 'woocommerce' ), ), array( 'slug' => 'products/stats', - 'description' => __( 'Stats about products.', 'woocommerce-admin' ), + 'description' => __( 'Stats about products.', 'woocommerce' ), ), array( 'slug' => 'variations', - 'description' => __( 'Variations detailed reports.', 'woocommerce-admin' ), + 'description' => __( 'Variations detailed reports.', 'woocommerce' ), ), array( 'slug' => 'variations/stats', - 'description' => __( 'Stats about variations.', 'woocommerce-admin' ), + 'description' => __( 'Stats about variations.', 'woocommerce' ), ), array( 'slug' => 'categories', - 'description' => __( 'Product categories detailed reports.', 'woocommerce-admin' ), + 'description' => __( 'Product categories detailed reports.', 'woocommerce' ), ), array( 'slug' => 'categories/stats', - 'description' => __( 'Stats about product categories.', 'woocommerce-admin' ), + 'description' => __( 'Stats about product categories.', 'woocommerce' ), ), array( 'slug' => 'coupons', - 'description' => __( 'Coupons detailed reports.', 'woocommerce-admin' ), + 'description' => __( 'Coupons detailed reports.', 'woocommerce' ), ), array( 'slug' => 'coupons/stats', - 'description' => __( 'Stats about coupons.', 'woocommerce-admin' ), + 'description' => __( 'Stats about coupons.', 'woocommerce' ), ), array( 'slug' => 'taxes', - 'description' => __( 'Taxes detailed reports.', 'woocommerce-admin' ), + 'description' => __( 'Taxes detailed reports.', 'woocommerce' ), ), array( 'slug' => 'taxes/stats', - 'description' => __( 'Stats about taxes.', 'woocommerce-admin' ), + 'description' => __( 'Stats about taxes.', 'woocommerce' ), ), array( 'slug' => 'downloads', - 'description' => __( 'Product downloads detailed reports.', 'woocommerce-admin' ), + 'description' => __( 'Product downloads detailed reports.', 'woocommerce' ), ), array( 'slug' => 'downloads/files', - 'description' => __( 'Product download files detailed reports.', 'woocommerce-admin' ), + 'description' => __( 'Product download files detailed reports.', 'woocommerce' ), ), array( 'slug' => 'downloads/stats', - 'description' => __( 'Stats about product downloads.', 'woocommerce-admin' ), + 'description' => __( 'Stats about product downloads.', 'woocommerce' ), ), array( 'slug' => 'customers', - 'description' => __( 'Customers detailed reports.', 'woocommerce-admin' ), + 'description' => __( 'Customers detailed reports.', 'woocommerce' ), ), ); @@ -285,19 +285,19 @@ class Controller extends \WC_REST_Reports_Controller { 'type' => 'object', 'properties' => array( 'slug' => array( - 'description' => __( 'An alphanumeric identifier for the resource.', 'woocommerce-admin' ), + 'description' => __( 'An alphanumeric identifier for the resource.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view' ), 'readonly' => true, ), 'description' => array( - 'description' => __( 'A human-readable description of the resource.', 'woocommerce-admin' ), + 'description' => __( 'A human-readable description of the resource.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view' ), 'readonly' => true, ), 'path' => array( - 'description' => __( 'API path.', 'woocommerce-admin' ), + 'description' => __( 'API path.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view' ), 'readonly' => true, diff --git a/plugins/woocommerce/src/Admin/API/Reports/Coupons/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Coupons/Controller.php index 624413a447c..ff6a75c6ea7 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Coupons/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Coupons/Controller.php @@ -152,19 +152,19 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'type' => 'object', 'properties' => array( 'coupon_id' => array( - 'description' => __( 'Coupon ID.', 'woocommerce-admin' ), + 'description' => __( 'Coupon ID.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'amount' => array( - 'description' => __( 'Net discount amount.', 'woocommerce-admin' ), + 'description' => __( 'Net discount amount.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'orders_count' => array( - 'description' => __( 'Number of orders.', 'woocommerce-admin' ), + 'description' => __( 'Number of orders.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -174,38 +174,38 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Coupon code.', 'woocommerce-admin' ), + 'description' => __( 'Coupon code.', 'woocommerce' ), ), 'date_created' => array( 'type' => 'date-time', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Coupon creation date.', 'woocommerce-admin' ), + 'description' => __( 'Coupon creation date.', 'woocommerce' ), ), 'date_created_gmt' => array( 'type' => 'date-time', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Coupon creation date in GMT.', 'woocommerce-admin' ), + 'description' => __( 'Coupon creation date in GMT.', 'woocommerce' ), ), 'date_expires' => array( 'type' => 'date-time', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Coupon expiration date.', 'woocommerce-admin' ), + 'description' => __( 'Coupon expiration date.', 'woocommerce' ), ), 'date_expires_gmt' => array( 'type' => 'date-time', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Coupon expiration date in GMT.', 'woocommerce-admin' ), + 'description' => __( 'Coupon expiration date in GMT.', 'woocommerce' ), ), 'discount_type' => array( 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit' ), 'enum' => array_keys( wc_get_coupon_types() ), - 'description' => __( 'Coupon discount type.', 'woocommerce-admin' ), + 'description' => __( 'Coupon discount type.', 'woocommerce' ), ), ), ), @@ -223,7 +223,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf $params = array(); $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['page'] = array( - 'description' => __( 'Current page of the collection.', 'woocommerce-admin' ), + 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', @@ -231,7 +231,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'minimum' => 1, ); $params['per_page'] = array( - 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce-admin' ), + 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 10, 'minimum' => 1, @@ -240,26 +240,26 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'validate_callback' => 'rest_validate_request_arg', ); $params['after'] = array( - 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['before'] = array( - 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['order'] = array( - 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce-admin' ), + 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ), 'type' => 'string', 'default' => 'desc', 'enum' => array( 'asc', 'desc' ), 'validate_callback' => 'rest_validate_request_arg', ); $params['orderby'] = array( - 'description' => __( 'Sort collection by object attribute.', 'woocommerce-admin' ), + 'description' => __( 'Sort collection by object attribute.', 'woocommerce' ), 'type' => 'string', 'default' => 'coupon_id', 'enum' => array( @@ -271,7 +271,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'validate_callback' => 'rest_validate_request_arg', ); $params['coupons'] = array( - 'description' => __( 'Limit result set to coupons assigned specific coupon IDs.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to coupons assigned specific coupon IDs.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -280,7 +280,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf ), ); $params['extended_info'] = array( - 'description' => __( 'Add additional piece of info about each coupon to the report.', 'woocommerce-admin' ), + 'description' => __( 'Add additional piece of info about each coupon to the report.', 'woocommerce' ), 'type' => 'boolean', 'default' => false, 'sanitize_callback' => 'wc_string_to_bool', @@ -297,12 +297,12 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf */ public function get_export_columns() { $export_columns = array( - 'code' => __( 'Coupon code', 'woocommerce-admin' ), - 'orders_count' => __( 'Orders', 'woocommerce-admin' ), - 'amount' => __( 'Amount discounted', 'woocommerce-admin' ), - 'created' => __( 'Created', 'woocommerce-admin' ), - 'expires' => __( 'Expires', 'woocommerce-admin' ), - 'type' => __( 'Type', 'woocommerce-admin' ), + 'code' => __( 'Coupon code', 'woocommerce' ), + 'orders_count' => __( 'Orders', 'woocommerce' ), + 'amount' => __( 'Amount discounted', 'woocommerce' ), + 'created' => __( 'Created', 'woocommerce' ), + 'expires' => __( 'Expires', 'woocommerce' ), + 'type' => __( 'Type', 'woocommerce' ), ); /** @@ -325,7 +325,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf */ public function prepare_item_for_export( $item ) { $date_expires = empty( $item['extended_info']['date_expires'] ) - ? __( 'N/A', 'woocommerce-admin' ) + ? __( 'N/A', 'woocommerce' ) : $item['extended_info']['date_expires']; $export_item = array( diff --git a/plugins/woocommerce/src/Admin/API/Reports/Coupons/DataStore.php b/plugins/woocommerce/src/Admin/API/Reports/Coupons/DataStore.php index 6d9597342c1..743a62d023d 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Coupons/DataStore.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Coupons/DataStore.php @@ -170,12 +170,12 @@ class DataStore extends ReportsDataStore implements DataStoreInterface { if ( 0 === $coupon->get_id() ) { // Deleted or otherwise invalid coupon. $extended_info = array( - 'code' => __( '(Deleted)', 'woocommerce-admin' ), + 'code' => __( '(Deleted)', 'woocommerce' ), 'date_created' => '', 'date_created_gmt' => '', 'date_expires' => '', 'date_expires_gmt' => '', - 'discount_type' => __( 'N/A', 'woocommerce-admin' ), + 'discount_type' => __( 'N/A', 'woocommerce' ), ); } else { $gmt_timzone = new \DateTimeZone( 'UTC' ); diff --git a/plugins/woocommerce/src/Admin/API/Reports/Coupons/Stats/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Coupons/Stats/Controller.php index 5c660ab89c3..7f715f68b31 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Coupons/Stats/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Coupons/Stats/Controller.php @@ -142,7 +142,7 @@ class Controller extends \WC_REST_Reports_Controller { public function get_item_schema() { $data_values = array( 'amount' => array( - 'description' => __( 'Net discount amount.', 'woocommerce-admin' ), + 'description' => __( 'Net discount amount.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -150,14 +150,14 @@ class Controller extends \WC_REST_Reports_Controller { 'format' => 'currency', ), 'coupons_count' => array( - 'description' => __( 'Number of coupons.', 'woocommerce-admin' ), + 'description' => __( 'Number of coupons.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'orders_count' => array( - 'title' => __( 'Discounted orders', 'woocommerce-admin' ), - 'description' => __( 'Number of discounted orders.', 'woocommerce-admin' ), + 'title' => __( 'Discounted orders', 'woocommerce' ), + 'description' => __( 'Number of discounted orders.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -167,7 +167,7 @@ class Controller extends \WC_REST_Reports_Controller { $segments = array( 'segments' => array( - 'description' => __( 'Reports data grouped by segment condition.', 'woocommerce-admin' ), + 'description' => __( 'Reports data grouped by segment condition.', 'woocommerce' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -175,13 +175,13 @@ class Controller extends \WC_REST_Reports_Controller { 'type' => 'object', 'properties' => array( 'segment_id' => array( - 'description' => __( 'Segment identificator.', 'woocommerce-admin' ), + 'description' => __( 'Segment identificator.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'subtotals' => array( - 'description' => __( 'Interval subtotals.', 'woocommerce-admin' ), + 'description' => __( 'Interval subtotals.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -200,14 +200,14 @@ class Controller extends \WC_REST_Reports_Controller { 'type' => 'object', 'properties' => array( 'totals' => array( - 'description' => __( 'Totals data.', 'woocommerce-admin' ), + 'description' => __( 'Totals data.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'properties' => $totals, ), 'intervals' => array( - 'description' => __( 'Reports data grouped by intervals.', 'woocommerce-admin' ), + 'description' => __( 'Reports data grouped by intervals.', 'woocommerce' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -215,38 +215,38 @@ class Controller extends \WC_REST_Reports_Controller { 'type' => 'object', 'properties' => array( 'interval' => array( - 'description' => __( 'Type of interval.', 'woocommerce-admin' ), + 'description' => __( 'Type of interval.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'enum' => array( 'day', 'week', 'month', 'year' ), ), 'date_start' => array( - 'description' => __( "The date the report start, in the site's timezone.", 'woocommerce-admin' ), + 'description' => __( "The date the report start, in the site's timezone.", 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_start_gmt' => array( - 'description' => __( 'The date the report start, as GMT.', 'woocommerce-admin' ), + 'description' => __( 'The date the report start, as GMT.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_end' => array( - 'description' => __( "The date the report end, in the site's timezone.", 'woocommerce-admin' ), + 'description' => __( "The date the report end, in the site's timezone.", 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_end_gmt' => array( - 'description' => __( 'The date the report end, as GMT.', 'woocommerce-admin' ), + 'description' => __( 'The date the report end, as GMT.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'subtotals' => array( - 'description' => __( 'Interval subtotals.', 'woocommerce-admin' ), + 'description' => __( 'Interval subtotals.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -270,7 +270,7 @@ class Controller extends \WC_REST_Reports_Controller { $params = array(); $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['page'] = array( - 'description' => __( 'Current page of the collection.', 'woocommerce-admin' ), + 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', @@ -278,7 +278,7 @@ class Controller extends \WC_REST_Reports_Controller { 'minimum' => 1, ); $params['per_page'] = array( - 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce-admin' ), + 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 10, 'minimum' => 1, @@ -287,26 +287,26 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['after'] = array( - 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['before'] = array( - 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['order'] = array( - 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce-admin' ), + 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ), 'type' => 'string', 'default' => 'desc', 'enum' => array( 'asc', 'desc' ), 'validate_callback' => 'rest_validate_request_arg', ); $params['orderby'] = array( - 'description' => __( 'Sort collection by object attribute.', 'woocommerce-admin' ), + 'description' => __( 'Sort collection by object attribute.', 'woocommerce' ), 'type' => 'string', 'default' => 'date', 'enum' => array( @@ -318,7 +318,7 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['interval'] = array( - 'description' => __( 'Time interval to use for buckets in the returned data.', 'woocommerce-admin' ), + 'description' => __( 'Time interval to use for buckets in the returned data.', 'woocommerce' ), 'type' => 'string', 'default' => 'week', 'enum' => array( @@ -332,7 +332,7 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['coupons'] = array( - 'description' => __( 'Limit result set to coupons assigned specific coupon IDs.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to coupons assigned specific coupon IDs.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -341,7 +341,7 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['segmentby'] = array( - 'description' => __( 'Segment the response by additional constraint.', 'woocommerce-admin' ), + 'description' => __( 'Segment the response by additional constraint.', 'woocommerce' ), 'type' => 'string', 'enum' => array( 'product', @@ -352,7 +352,7 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['fields'] = array( - 'description' => __( 'Limit stats fields to the specified items.', 'woocommerce-admin' ), + 'description' => __( 'Limit stats fields to the specified items.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', diff --git a/plugins/woocommerce/src/Admin/API/Reports/Coupons/Stats/Segmenter.php b/plugins/woocommerce/src/Admin/API/Reports/Coupons/Stats/Segmenter.php index 12d7c737b4b..011d8a42c51 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Coupons/Stats/Segmenter.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Coupons/Stats/Segmenter.php @@ -280,7 +280,7 @@ class Segmenter extends ReportsSegmenter { $segments = $this->get_product_related_segments( $type, $segmenting_selections, $segmenting_from, $segmenting_where, $segmenting_groupby, $segmenting_dimension_name, $table_name, $query_params, $unique_orders_table ); } elseif ( 'variation' === $this->query_args['segmentby'] ) { if ( ! isset( $this->query_args['product_includes'] ) || count( $this->query_args['product_includes'] ) !== 1 ) { - throw new ParameterException( 'wc_admin_reports_invalid_segmenting_variation', __( 'product_includes parameter need to specify exactly one product when segmenting by variation.', 'woocommerce-admin' ) ); + throw new ParameterException( 'wc_admin_reports_invalid_segmenting_variation', __( 'product_includes parameter need to specify exactly one product when segmenting by variation.', 'woocommerce' ) ); } $product_level_columns = $this->get_segment_selections_product_level( $product_segmenting_table ); diff --git a/plugins/woocommerce/src/Admin/API/Reports/Customers/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Customers/Controller.php index 7e732d6010c..03feed63b71 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Customers/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Customers/Controller.php @@ -222,91 +222,91 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'type' => 'object', 'properties' => array( 'id' => array( - 'description' => __( 'Customer ID.', 'woocommerce-admin' ), + 'description' => __( 'Customer ID.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'user_id' => array( - 'description' => __( 'User ID.', 'woocommerce-admin' ), + 'description' => __( 'User ID.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'name' => array( - 'description' => __( 'Name.', 'woocommerce-admin' ), + 'description' => __( 'Name.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'username' => array( - 'description' => __( 'Username.', 'woocommerce-admin' ), + 'description' => __( 'Username.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'country' => array( - 'description' => __( 'Country / Region.', 'woocommerce-admin' ), + 'description' => __( 'Country / Region.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'city' => array( - 'description' => __( 'City.', 'woocommerce-admin' ), + 'description' => __( 'City.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'state' => array( - 'description' => __( 'Region.', 'woocommerce-admin' ), + 'description' => __( 'Region.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'postcode' => array( - 'description' => __( 'Postal code.', 'woocommerce-admin' ), + 'description' => __( 'Postal code.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_registered' => array( - 'description' => __( 'Date registered.', 'woocommerce-admin' ), + 'description' => __( 'Date registered.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_registered_gmt' => array( - 'description' => __( 'Date registered GMT.', 'woocommerce-admin' ), + 'description' => __( 'Date registered GMT.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_last_active' => array( - 'description' => __( 'Date last active.', 'woocommerce-admin' ), + 'description' => __( 'Date last active.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_last_active_gmt' => array( - 'description' => __( 'Date last active GMT.', 'woocommerce-admin' ), + 'description' => __( 'Date last active GMT.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'orders_count' => array( - 'description' => __( 'Order count.', 'woocommerce-admin' ), + 'description' => __( 'Order count.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'total_spend' => array( - 'description' => __( 'Total spend.', 'woocommerce-admin' ), + 'description' => __( 'Total spend.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'avg_order_value' => array( - 'description' => __( 'Avg order value.', 'woocommerce-admin' ), + 'description' => __( 'Avg order value.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -325,31 +325,31 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf $params = array(); $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['registered_before'] = array( - 'description' => __( 'Limit response to objects registered before (or at) a given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects registered before (or at) a given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['registered_after'] = array( - 'description' => __( 'Limit response to objects registered after (or at) a given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects registered after (or at) a given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['after'] = array( - 'description' => __( 'Limit response to resources with orders published after a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources with orders published after a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['before'] = array( - 'description' => __( 'Limit response to resources with orders published before a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources with orders published before a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['page'] = array( - 'description' => __( 'Current page of the collection.', 'woocommerce-admin' ), + 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', @@ -357,7 +357,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'minimum' => 1, ); $params['per_page'] = array( - 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce-admin' ), + 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 10, 'minimum' => 1, @@ -366,14 +366,14 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'validate_callback' => 'rest_validate_request_arg', ); $params['order'] = array( - 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce-admin' ), + 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ), 'type' => 'string', 'default' => 'desc', 'enum' => array( 'asc', 'desc' ), 'validate_callback' => 'rest_validate_request_arg', ); $params['orderby'] = array( - 'description' => __( 'Sort collection by object attribute.', 'woocommerce-admin' ), + 'description' => __( 'Sort collection by object attribute.', 'woocommerce' ), 'type' => 'string', 'default' => 'date_registered', 'enum' => array( @@ -392,7 +392,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'validate_callback' => 'rest_validate_request_arg', ); $params['match'] = array( - 'description' => __( 'Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories', 'woocommerce-admin' ), + 'description' => __( 'Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories', 'woocommerce' ), 'type' => 'string', 'default' => 'all', 'enum' => array( @@ -402,7 +402,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'validate_callback' => 'rest_validate_request_arg', ); $params['search'] = array( - 'description' => __( 'Limit response to objects with a customer field containing the search term. Searches the field provided by `searchby`.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with a customer field containing the search term. Searches the field provided by `searchby`.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); @@ -417,59 +417,59 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf ), ); $params['name_includes'] = array( - 'description' => __( 'Limit response to objects with specfic names.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with specfic names.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); $params['name_excludes'] = array( - 'description' => __( 'Limit response to objects excluding specfic names.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects excluding specfic names.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); $params['username_includes'] = array( - 'description' => __( 'Limit response to objects with specfic usernames.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with specfic usernames.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); $params['username_excludes'] = array( - 'description' => __( 'Limit response to objects excluding specfic usernames.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects excluding specfic usernames.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); $params['email_includes'] = array( - 'description' => __( 'Limit response to objects including emails.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects including emails.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); $params['email_excludes'] = array( - 'description' => __( 'Limit response to objects excluding emails.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects excluding emails.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); $params['country_includes'] = array( - 'description' => __( 'Limit response to objects with specfic countries.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with specfic countries.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); $params['country_excludes'] = array( - 'description' => __( 'Limit response to objects excluding specfic countries.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects excluding specfic countries.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); $params['last_active_before'] = array( - 'description' => __( 'Limit response to objects last active before (or at) a given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects last active before (or at) a given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['last_active_after'] = array( - 'description' => __( 'Limit response to objects last active after (or at) a given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects last active after (or at) a given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['last_active_between'] = array( - 'description' => __( 'Limit response to objects last active between two given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects last active between two given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'array', 'validate_callback' => array( '\Automattic\WooCommerce\Admin\API\Reports\TimeInterval', 'rest_validate_between_date_arg' ), 'items' => array( @@ -477,19 +477,19 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf ), ); $params['registered_before'] = array( - 'description' => __( 'Limit response to objects registered before (or at) a given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects registered before (or at) a given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['registered_after'] = array( - 'description' => __( 'Limit response to objects registered after (or at) a given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects registered after (or at) a given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['registered_between'] = array( - 'description' => __( 'Limit response to objects last active between two given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects last active between two given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'array', 'validate_callback' => array( '\Automattic\WooCommerce\Admin\API\Reports\TimeInterval', 'rest_validate_between_date_arg' ), 'items' => array( @@ -497,19 +497,19 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf ), ); $params['orders_count_min'] = array( - 'description' => __( 'Limit response to objects with an order count greater than or equal to given integer.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with an order count greater than or equal to given integer.', 'woocommerce' ), 'type' => 'integer', 'sanitize_callback' => 'absint', 'validate_callback' => 'rest_validate_request_arg', ); $params['orders_count_max'] = array( - 'description' => __( 'Limit response to objects with an order count less than or equal to given integer.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with an order count less than or equal to given integer.', 'woocommerce' ), 'type' => 'integer', 'sanitize_callback' => 'absint', 'validate_callback' => 'rest_validate_request_arg', ); $params['orders_count_between'] = array( - 'description' => __( 'Limit response to objects with an order count between two given integers.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with an order count between two given integers.', 'woocommerce' ), 'type' => 'array', 'validate_callback' => array( '\Automattic\WooCommerce\Admin\API\Reports\TimeInterval', 'rest_validate_between_numeric_arg' ), 'items' => array( @@ -517,17 +517,17 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf ), ); $params['total_spend_min'] = array( - 'description' => __( 'Limit response to objects with a total order spend greater than or equal to given number.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with a total order spend greater than or equal to given number.', 'woocommerce' ), 'type' => 'number', 'validate_callback' => 'rest_validate_request_arg', ); $params['total_spend_max'] = array( - 'description' => __( 'Limit response to objects with a total order spend less than or equal to given number.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with a total order spend less than or equal to given number.', 'woocommerce' ), 'type' => 'number', 'validate_callback' => 'rest_validate_request_arg', ); $params['total_spend_between'] = array( - 'description' => __( 'Limit response to objects with a total order spend between two given numbers.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with a total order spend between two given numbers.', 'woocommerce' ), 'type' => 'array', 'validate_callback' => array( '\Automattic\WooCommerce\Admin\API\Reports\TimeInterval', 'rest_validate_between_numeric_arg' ), 'items' => array( @@ -535,17 +535,17 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf ), ); $params['avg_order_value_min'] = array( - 'description' => __( 'Limit response to objects with an average order spend greater than or equal to given number.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with an average order spend greater than or equal to given number.', 'woocommerce' ), 'type' => 'number', 'validate_callback' => 'rest_validate_request_arg', ); $params['avg_order_value_max'] = array( - 'description' => __( 'Limit response to objects with an average order spend less than or equal to given number.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with an average order spend less than or equal to given number.', 'woocommerce' ), 'type' => 'number', 'validate_callback' => 'rest_validate_request_arg', ); $params['avg_order_value_between'] = array( - 'description' => __( 'Limit response to objects with an average order spend between two given numbers.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with an average order spend between two given numbers.', 'woocommerce' ), 'type' => 'array', 'validate_callback' => array( '\Automattic\WooCommerce\Admin\API\Reports\TimeInterval', 'rest_validate_between_numeric_arg' ), 'items' => array( @@ -553,19 +553,19 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf ), ); $params['last_order_before'] = array( - 'description' => __( 'Limit response to objects with last order before (or at) a given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with last order before (or at) a given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['last_order_after'] = array( - 'description' => __( 'Limit response to objects with last order after (or at) a given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with last order after (or at) a given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['customers'] = array( - 'description' => __( 'Limit result to items with specified customer ids.', 'woocommerce-admin' ), + 'description' => __( 'Limit result to items with specified customer ids.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -584,18 +584,18 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf */ public function get_export_columns() { $export_columns = array( - 'name' => __( 'Name', 'woocommerce-admin' ), - 'username' => __( 'Username', 'woocommerce-admin' ), - 'last_active' => __( 'Last Active', 'woocommerce-admin' ), - 'registered' => __( 'Sign Up', 'woocommerce-admin' ), - 'email' => __( 'Email', 'woocommerce-admin' ), - 'orders_count' => __( 'Orders', 'woocommerce-admin' ), - 'total_spend' => __( 'Total Spend', 'woocommerce-admin' ), - 'avg_order_value' => __( 'AOV', 'woocommerce-admin' ), - 'country' => __( 'Country / Region', 'woocommerce-admin' ), - 'city' => __( 'City', 'woocommerce-admin' ), - 'region' => __( 'Region', 'woocommerce-admin' ), - 'postcode' => __( 'Postal Code', 'woocommerce-admin' ), + 'name' => __( 'Name', 'woocommerce' ), + 'username' => __( 'Username', 'woocommerce' ), + 'last_active' => __( 'Last Active', 'woocommerce' ), + 'registered' => __( 'Sign Up', 'woocommerce' ), + 'email' => __( 'Email', 'woocommerce' ), + 'orders_count' => __( 'Orders', 'woocommerce' ), + 'total_spend' => __( 'Total Spend', 'woocommerce' ), + 'avg_order_value' => __( 'AOV', 'woocommerce' ), + 'country' => __( 'Country / Region', 'woocommerce' ), + 'city' => __( 'City', 'woocommerce' ), + 'region' => __( 'Region', 'woocommerce' ), + 'postcode' => __( 'Postal Code', 'woocommerce' ), ); /** diff --git a/plugins/woocommerce/src/Admin/API/Reports/Customers/Stats/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Customers/Stats/Controller.php index 1ef98093f45..675e118e2e2 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Customers/Stats/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Customers/Stats/Controller.php @@ -129,26 +129,26 @@ class Controller extends \WC_REST_Reports_Controller { // @todo Should any of these be 'indicator's? $totals = array( 'customers_count' => array( - 'description' => __( 'Number of customers.', 'woocommerce-admin' ), + 'description' => __( 'Number of customers.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'avg_orders_count' => array( - 'description' => __( 'Average number of orders.', 'woocommerce-admin' ), + 'description' => __( 'Average number of orders.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'avg_total_spend' => array( - 'description' => __( 'Average total spend per customer.', 'woocommerce-admin' ), + 'description' => __( 'Average total spend per customer.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'format' => 'currency', ), 'avg_avg_order_value' => array( - 'description' => __( 'Average AOV per customer.', 'woocommerce-admin' ), + 'description' => __( 'Average AOV per customer.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -162,7 +162,7 @@ class Controller extends \WC_REST_Reports_Controller { 'type' => 'object', 'properties' => array( 'totals' => array( - 'description' => __( 'Totals data.', 'woocommerce-admin' ), + 'description' => __( 'Totals data.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -183,19 +183,19 @@ class Controller extends \WC_REST_Reports_Controller { $params = array(); $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['registered_before'] = array( - 'description' => __( 'Limit response to objects registered before (or at) a given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects registered before (or at) a given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['registered_after'] = array( - 'description' => __( 'Limit response to objects registered after (or at) a given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects registered after (or at) a given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['match'] = array( - 'description' => __( 'Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories', 'woocommerce-admin' ), + 'description' => __( 'Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories', 'woocommerce' ), 'type' => 'string', 'default' => 'all', 'enum' => array( @@ -205,7 +205,7 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['search'] = array( - 'description' => __( 'Limit response to objects with a customer field containing the search term. Searches the field provided by `searchby`.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with a customer field containing the search term. Searches the field provided by `searchby`.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); @@ -220,59 +220,59 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['name_includes'] = array( - 'description' => __( 'Limit response to objects with specfic names.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with specfic names.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); $params['name_excludes'] = array( - 'description' => __( 'Limit response to objects excluding specfic names.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects excluding specfic names.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); $params['username_includes'] = array( - 'description' => __( 'Limit response to objects with specfic usernames.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with specfic usernames.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); $params['username_excludes'] = array( - 'description' => __( 'Limit response to objects excluding specfic usernames.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects excluding specfic usernames.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); $params['email_includes'] = array( - 'description' => __( 'Limit response to objects including emails.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects including emails.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); $params['email_excludes'] = array( - 'description' => __( 'Limit response to objects excluding emails.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects excluding emails.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); $params['country_includes'] = array( - 'description' => __( 'Limit response to objects with specfic countries.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with specfic countries.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); $params['country_excludes'] = array( - 'description' => __( 'Limit response to objects excluding specfic countries.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects excluding specfic countries.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); $params['last_active_before'] = array( - 'description' => __( 'Limit response to objects last active before (or at) a given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects last active before (or at) a given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['last_active_after'] = array( - 'description' => __( 'Limit response to objects last active after (or at) a given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects last active after (or at) a given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['last_active_between'] = array( - 'description' => __( 'Limit response to objects last active between two given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects last active between two given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'array', 'validate_callback' => array( '\Automattic\WooCommerce\Admin\API\Reports\TimeInterval', 'rest_validate_between_date_arg' ), 'items' => array( @@ -280,19 +280,19 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['registered_before'] = array( - 'description' => __( 'Limit response to objects registered before (or at) a given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects registered before (or at) a given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['registered_after'] = array( - 'description' => __( 'Limit response to objects registered after (or at) a given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects registered after (or at) a given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['registered_between'] = array( - 'description' => __( 'Limit response to objects last active between two given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects last active between two given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'array', 'validate_callback' => array( '\Automattic\WooCommerce\Admin\API\Reports\TimeInterval', 'rest_validate_between_date_arg' ), 'items' => array( @@ -300,19 +300,19 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['orders_count_min'] = array( - 'description' => __( 'Limit response to objects with an order count greater than or equal to given integer.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with an order count greater than or equal to given integer.', 'woocommerce' ), 'type' => 'integer', 'sanitize_callback' => 'absint', 'validate_callback' => 'rest_validate_request_arg', ); $params['orders_count_max'] = array( - 'description' => __( 'Limit response to objects with an order count less than or equal to given integer.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with an order count less than or equal to given integer.', 'woocommerce' ), 'type' => 'integer', 'sanitize_callback' => 'absint', 'validate_callback' => 'rest_validate_request_arg', ); $params['orders_count_between'] = array( - 'description' => __( 'Limit response to objects with an order count between two given integers.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with an order count between two given integers.', 'woocommerce' ), 'type' => 'array', 'validate_callback' => array( '\Automattic\WooCommerce\Admin\API\Reports\TimeInterval', 'rest_validate_between_numeric_arg' ), 'items' => array( @@ -320,17 +320,17 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['total_spend_min'] = array( - 'description' => __( 'Limit response to objects with a total order spend greater than or equal to given number.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with a total order spend greater than or equal to given number.', 'woocommerce' ), 'type' => 'number', 'validate_callback' => 'rest_validate_request_arg', ); $params['total_spend_max'] = array( - 'description' => __( 'Limit response to objects with a total order spend less than or equal to given number.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with a total order spend less than or equal to given number.', 'woocommerce' ), 'type' => 'number', 'validate_callback' => 'rest_validate_request_arg', ); $params['total_spend_between'] = array( - 'description' => __( 'Limit response to objects with a total order spend between two given numbers.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with a total order spend between two given numbers.', 'woocommerce' ), 'type' => 'array', 'validate_callback' => array( '\Automattic\WooCommerce\Admin\API\Reports\TimeInterval', 'rest_validate_between_numeric_arg' ), 'items' => array( @@ -338,17 +338,17 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['avg_order_value_min'] = array( - 'description' => __( 'Limit response to objects with an average order spend greater than or equal to given number.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with an average order spend greater than or equal to given number.', 'woocommerce' ), 'type' => 'number', 'validate_callback' => 'rest_validate_request_arg', ); $params['avg_order_value_max'] = array( - 'description' => __( 'Limit response to objects with an average order spend less than or equal to given number.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with an average order spend less than or equal to given number.', 'woocommerce' ), 'type' => 'number', 'validate_callback' => 'rest_validate_request_arg', ); $params['avg_order_value_between'] = array( - 'description' => __( 'Limit response to objects with an average order spend between two given numbers.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with an average order spend between two given numbers.', 'woocommerce' ), 'type' => 'array', 'validate_callback' => array( '\Automattic\WooCommerce\Admin\API\Reports\TimeInterval', 'rest_validate_between_numeric_arg' ), 'items' => array( @@ -356,19 +356,19 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['last_order_before'] = array( - 'description' => __( 'Limit response to objects with last order before (or at) a given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with last order before (or at) a given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['last_order_after'] = array( - 'description' => __( 'Limit response to objects with last order after (or at) a given ISO8601 compliant datetime.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects with last order after (or at) a given ISO8601 compliant datetime.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['customers'] = array( - 'description' => __( 'Limit result to items with specified customer ids.', 'woocommerce-admin' ), + 'description' => __( 'Limit result to items with specified customer ids.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -377,7 +377,7 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['fields'] = array( - 'description' => __( 'Limit stats fields to the specified items.', 'woocommerce-admin' ), + 'description' => __( 'Limit stats fields to the specified items.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', diff --git a/plugins/woocommerce/src/Admin/API/Reports/Downloads/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Downloads/Controller.php index ba114945505..11286f83ef3 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Downloads/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Downloads/Controller.php @@ -167,22 +167,22 @@ class Controller extends ReportsController implements ExportableInterface { 'type' => 'integer', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'ID.', 'woocommerce-admin' ), + 'description' => __( 'ID.', 'woocommerce' ), ), 'product_id' => array( 'type' => 'integer', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product ID.', 'woocommerce-admin' ), + 'description' => __( 'Product ID.', 'woocommerce' ), ), 'date' => array( - 'description' => __( "The date of the download, in the site's timezone.", 'woocommerce-admin' ), + 'description' => __( "The date of the download, in the site's timezone.", 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_gmt' => array( - 'description' => __( 'The date of the download, as GMT.', 'woocommerce-admin' ), + 'description' => __( 'The date of the download, as GMT.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -191,49 +191,49 @@ class Controller extends ReportsController implements ExportableInterface { 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Download ID.', 'woocommerce-admin' ), + 'description' => __( 'Download ID.', 'woocommerce' ), ), 'file_name' => array( 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'File name.', 'woocommerce-admin' ), + 'description' => __( 'File name.', 'woocommerce' ), ), 'file_path' => array( 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'File URL.', 'woocommerce-admin' ), + 'description' => __( 'File URL.', 'woocommerce' ), ), 'order_id' => array( 'type' => 'integer', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Order ID.', 'woocommerce-admin' ), + 'description' => __( 'Order ID.', 'woocommerce' ), ), 'order_number' => array( 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Order Number.', 'woocommerce-admin' ), + 'description' => __( 'Order Number.', 'woocommerce' ), ), 'user_id' => array( 'type' => 'integer', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'User ID for the downloader.', 'woocommerce-admin' ), + 'description' => __( 'User ID for the downloader.', 'woocommerce' ), ), 'username' => array( 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'User name of the downloader.', 'woocommerce-admin' ), + 'description' => __( 'User name of the downloader.', 'woocommerce' ), ), 'ip_address' => array( 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'IP address for the downloader.', 'woocommerce-admin' ), + 'description' => __( 'IP address for the downloader.', 'woocommerce' ), ), ), ); @@ -250,7 +250,7 @@ class Controller extends ReportsController implements ExportableInterface { $params = array(); $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['page'] = array( - 'description' => __( 'Current page of the collection.', 'woocommerce-admin' ), + 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', @@ -258,7 +258,7 @@ class Controller extends ReportsController implements ExportableInterface { 'minimum' => 1, ); $params['per_page'] = array( - 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce-admin' ), + 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 10, 'minimum' => 1, @@ -267,26 +267,26 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['after'] = array( - 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['before'] = array( - 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['order'] = array( - 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce-admin' ), + 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ), 'type' => 'string', 'default' => 'desc', 'enum' => array( 'asc', 'desc' ), 'validate_callback' => 'rest_validate_request_arg', ); $params['orderby'] = array( - 'description' => __( 'Sort collection by object attribute.', 'woocommerce-admin' ), + 'description' => __( 'Sort collection by object attribute.', 'woocommerce' ), 'type' => 'string', 'default' => 'date', 'enum' => array( @@ -296,7 +296,7 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['match'] = array( - 'description' => __( 'Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: products, orders, username, ip_address.', 'woocommerce-admin' ), + 'description' => __( 'Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: products, orders, username, ip_address.', 'woocommerce' ), 'type' => 'string', 'default' => 'all', 'enum' => array( @@ -306,7 +306,7 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['product_includes'] = array( - 'description' => __( 'Limit result set to items that have the specified product(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that have the specified product(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -316,7 +316,7 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['product_excludes'] = array( - 'description' => __( 'Limit result set to items that don\'t have the specified product(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that don\'t have the specified product(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -326,7 +326,7 @@ class Controller extends ReportsController implements ExportableInterface { 'sanitize_callback' => 'wp_parse_id_list', ); $params['order_includes'] = array( - 'description' => __( 'Limit result set to items that have the specified order ids.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that have the specified order ids.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -335,7 +335,7 @@ class Controller extends ReportsController implements ExportableInterface { ), ); $params['order_excludes'] = array( - 'description' => __( 'Limit result set to items that don\'t have the specified order ids.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that don\'t have the specified order ids.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -344,7 +344,7 @@ class Controller extends ReportsController implements ExportableInterface { ), ); $params['customer_includes'] = array( - 'description' => __( 'Limit response to objects that have the specified user ids.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects that have the specified user ids.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -353,7 +353,7 @@ class Controller extends ReportsController implements ExportableInterface { ), ); $params['customer_excludes'] = array( - 'description' => __( 'Limit response to objects that don\'t have the specified user ids.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects that don\'t have the specified user ids.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -362,7 +362,7 @@ class Controller extends ReportsController implements ExportableInterface { ), ); $params['ip_address_includes'] = array( - 'description' => __( 'Limit response to objects that have a specified ip address.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects that have a specified ip address.', 'woocommerce' ), 'type' => 'array', 'validate_callback' => 'rest_validate_request_arg', 'items' => array( @@ -371,7 +371,7 @@ class Controller extends ReportsController implements ExportableInterface { ); $params['ip_address_excludes'] = array( - 'description' => __( 'Limit response to objects that don\'t have a specified ip address.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects that don\'t have a specified ip address.', 'woocommerce' ), 'type' => 'array', 'validate_callback' => 'rest_validate_request_arg', 'items' => array( @@ -389,12 +389,12 @@ class Controller extends ReportsController implements ExportableInterface { */ public function get_export_columns() { $export_columns = array( - 'date' => __( 'Date', 'woocommerce-admin' ), - 'product' => __( 'Product title', 'woocommerce-admin' ), - 'file_name' => __( 'File name', 'woocommerce-admin' ), - 'order_number' => __( 'Order #', 'woocommerce-admin' ), - 'user_id' => __( 'User Name', 'woocommerce-admin' ), - 'ip_address' => __( 'IP', 'woocommerce-admin' ), + 'date' => __( 'Date', 'woocommerce' ), + 'product' => __( 'Product title', 'woocommerce' ), + 'file_name' => __( 'File name', 'woocommerce' ), + 'order_number' => __( 'Order #', 'woocommerce' ), + 'user_id' => __( 'User Name', 'woocommerce' ), + 'ip_address' => __( 'IP', 'woocommerce' ), ); /** diff --git a/plugins/woocommerce/src/Admin/API/Reports/Downloads/Stats/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Downloads/Stats/Controller.php index 1e3ed662d89..701c9e12581 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Downloads/Stats/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Downloads/Stats/Controller.php @@ -142,8 +142,8 @@ class Controller extends \WC_REST_Reports_Controller { public function get_item_schema() { $totals = array( 'download_count' => array( - 'title' => __( 'Downloads', 'woocommerce-admin' ), - 'description' => __( 'Number of downloads.', 'woocommerce-admin' ), + 'title' => __( 'Downloads', 'woocommerce' ), + 'description' => __( 'Number of downloads.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -157,14 +157,14 @@ class Controller extends \WC_REST_Reports_Controller { 'type' => 'object', 'properties' => array( 'totals' => array( - 'description' => __( 'Totals data.', 'woocommerce-admin' ), + 'description' => __( 'Totals data.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'properties' => $totals, ), 'intervals' => array( - 'description' => __( 'Reports data grouped by intervals.', 'woocommerce-admin' ), + 'description' => __( 'Reports data grouped by intervals.', 'woocommerce' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -172,38 +172,38 @@ class Controller extends \WC_REST_Reports_Controller { 'type' => 'object', 'properties' => array( 'interval' => array( - 'description' => __( 'Type of interval.', 'woocommerce-admin' ), + 'description' => __( 'Type of interval.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'enum' => array( 'day', 'week', 'month', 'year' ), ), 'date_start' => array( - 'description' => __( "The date the report start, in the site's timezone.", 'woocommerce-admin' ), + 'description' => __( "The date the report start, in the site's timezone.", 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_start_gmt' => array( - 'description' => __( 'The date the report start, as GMT.', 'woocommerce-admin' ), + 'description' => __( 'The date the report start, as GMT.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_end' => array( - 'description' => __( "The date the report end, in the site's timezone.", 'woocommerce-admin' ), + 'description' => __( "The date the report end, in the site's timezone.", 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_end_gmt' => array( - 'description' => __( 'The date the report end, as GMT.', 'woocommerce-admin' ), + 'description' => __( 'The date the report end, as GMT.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'subtotals' => array( - 'description' => __( 'Interval subtotals.', 'woocommerce-admin' ), + 'description' => __( 'Interval subtotals.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -227,7 +227,7 @@ class Controller extends \WC_REST_Reports_Controller { $params = array(); $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['page'] = array( - 'description' => __( 'Current page of the collection.', 'woocommerce-admin' ), + 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', @@ -235,7 +235,7 @@ class Controller extends \WC_REST_Reports_Controller { 'minimum' => 1, ); $params['per_page'] = array( - 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce-admin' ), + 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 10, 'minimum' => 1, @@ -244,26 +244,26 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['after'] = array( - 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['before'] = array( - 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['order'] = array( - 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce-admin' ), + 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ), 'type' => 'string', 'default' => 'desc', 'enum' => array( 'asc', 'desc' ), 'validate_callback' => 'rest_validate_request_arg', ); $params['orderby'] = array( - 'description' => __( 'Sort collection by object attribute.', 'woocommerce-admin' ), + 'description' => __( 'Sort collection by object attribute.', 'woocommerce' ), 'type' => 'string', 'default' => 'date', 'enum' => array( @@ -273,7 +273,7 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['interval'] = array( - 'description' => __( 'Time interval to use for buckets in the returned data.', 'woocommerce-admin' ), + 'description' => __( 'Time interval to use for buckets in the returned data.', 'woocommerce' ), 'type' => 'string', 'default' => 'week', 'enum' => array( @@ -287,7 +287,7 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['match'] = array( - 'description' => __( 'Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories', 'woocommerce-admin' ), + 'description' => __( 'Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories', 'woocommerce' ), 'type' => 'string', 'default' => 'all', 'enum' => array( @@ -297,7 +297,7 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['product_includes'] = array( - 'description' => __( 'Limit result set to items that have the specified product(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that have the specified product(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -307,7 +307,7 @@ class Controller extends \WC_REST_Reports_Controller { ); $params['product_excludes'] = array( - 'description' => __( 'Limit result set to items that don\'t have the specified product(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that don\'t have the specified product(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -316,7 +316,7 @@ class Controller extends \WC_REST_Reports_Controller { 'sanitize_callback' => 'wp_parse_id_list', ); $params['order_includes'] = array( - 'description' => __( 'Limit result set to items that have the specified order ids.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that have the specified order ids.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -325,7 +325,7 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['order_excludes'] = array( - 'description' => __( 'Limit result set to items that don\'t have the specified order ids.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that don\'t have the specified order ids.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -334,7 +334,7 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['customer_includes'] = array( - 'description' => __( 'Limit response to objects that have the specified customer ids.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects that have the specified customer ids.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -343,7 +343,7 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['customer_excludes'] = array( - 'description' => __( 'Limit response to objects that don\'t have the specified customer ids.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects that don\'t have the specified customer ids.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -352,7 +352,7 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['ip_address_includes'] = array( - 'description' => __( 'Limit response to objects that have a specified ip address.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects that have a specified ip address.', 'woocommerce' ), 'type' => 'array', 'validate_callback' => 'rest_validate_request_arg', 'items' => array( @@ -361,7 +361,7 @@ class Controller extends \WC_REST_Reports_Controller { ); $params['ip_address_excludes'] = array( - 'description' => __( 'Limit response to objects that don\'t have a specified ip address.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to objects that don\'t have a specified ip address.', 'woocommerce' ), 'type' => 'array', 'validate_callback' => 'rest_validate_request_arg', 'items' => array( @@ -369,7 +369,7 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['fields'] = array( - 'description' => __( 'Limit stats fields to the specified items.', 'woocommerce-admin' ), + 'description' => __( 'Limit stats fields to the specified items.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', diff --git a/plugins/woocommerce/src/Admin/API/Reports/Downloads/Stats/DataStore.php b/plugins/woocommerce/src/Admin/API/Reports/Downloads/Stats/DataStore.php index 668edee4208..fdd4b5a0ee3 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Downloads/Stats/DataStore.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Downloads/Stats/DataStore.php @@ -117,7 +117,7 @@ class DataStore extends DownloadsDataStore implements DataStoreInterface { ARRAY_A ); // phpcs:ignore cache ok, DB call ok, unprepared SQL ok. if ( null === $totals ) { - return new \WP_Error( 'woocommerce_analytics_downloads_stats_result_failed', __( 'Sorry, fetching downloads data failed.', 'woocommerce-admin' ) ); + return new \WP_Error( 'woocommerce_analytics_downloads_stats_result_failed', __( 'Sorry, fetching downloads data failed.', 'woocommerce' ) ); } $this->interval_query->add_sql_clause( 'order_by', $this->get_sql_clause( 'order_by' ) ); @@ -133,7 +133,7 @@ class DataStore extends DownloadsDataStore implements DataStoreInterface { ); // phpcs:ignore cache ok, DB call ok, unprepared SQL ok. if ( null === $intervals ) { - return new \WP_Error( 'woocommerce_analytics_downloads_stats_result_failed', __( 'Sorry, fetching downloads data failed.', 'woocommerce-admin' ) ); + return new \WP_Error( 'woocommerce_analytics_downloads_stats_result_failed', __( 'Sorry, fetching downloads data failed.', 'woocommerce' ) ); } $totals = (object) $this->cast_numbers( $totals[0] ); diff --git a/plugins/woocommerce/src/Admin/API/Reports/Export/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Export/Controller.php index 8d5e5698427..e973308dac5 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Export/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Export/Controller.php @@ -74,12 +74,12 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { protected function get_export_collection_params() { $params = array(); $params['report_args'] = array( - 'description' => __( 'Parameters to pass on to the exported report.', 'woocommerce-admin' ), + 'description' => __( 'Parameters to pass on to the exported report.', 'woocommerce' ), 'type' => 'object', 'validate_callback' => 'rest_validate_request_arg', // @todo: use each controller's schema? ); $params['email'] = array( - 'description' => __( 'When true, email a link to download the export to the requesting user.', 'woocommerce-admin' ), + 'description' => __( 'When true, email a link to download the export to the requesting user.', 'woocommerce' ), 'type' => 'boolean', 'validate_callback' => 'rest_validate_request_arg', ); @@ -98,19 +98,19 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'type' => 'object', 'properties' => array( 'status' => array( - 'description' => __( 'Export status.', 'woocommerce-admin' ), + 'description' => __( 'Export status.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'message' => array( - 'description' => __( 'Export status message.', 'woocommerce-admin' ), + 'description' => __( 'Export status message.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'export_id' => array( - 'description' => __( 'Export ID.', 'woocommerce-admin' ), + 'description' => __( 'Export ID.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -133,13 +133,13 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'type' => 'object', 'properties' => array( 'percent_complete' => array( - 'description' => __( 'Percentage complete.', 'woocommerce-admin' ), + 'description' => __( 'Percentage complete.', 'woocommerce' ), 'type' => 'int', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'download_url' => array( - 'description' => __( 'Export download URL.', 'woocommerce-admin' ), + 'description' => __( 'Export download URL.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -170,7 +170,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { if ( 0 === $total_rows ) { return rest_ensure_response( array( - 'message' => __( 'There is no data to export for the given request.', 'woocommerce-admin' ), + 'message' => __( 'There is no data to export for the given request.', 'woocommerce' ), ) ); } @@ -179,7 +179,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { $response = rest_ensure_response( array( - 'message' => __( 'Your report file is being generated.', 'woocommerce-admin' ), + 'message' => __( 'Your report file is being generated.', 'woocommerce' ), 'export_id' => $export_id, ) ); @@ -212,7 +212,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { if ( false === $percentage ) { return new \WP_Error( 'woocommerce_admin_reports_export_invalid_id', - __( 'Sorry, there is no export with that ID.', 'woocommerce-admin' ), + __( 'Sorry, there is no export with that ID.', 'woocommerce' ), array( 'status' => 404 ) ); } diff --git a/plugins/woocommerce/src/Admin/API/Reports/Import/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Import/Controller.php index 7980595fb99..72622904f65 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Import/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Import/Controller.php @@ -108,7 +108,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { */ public function import_permissions_check( $request ) { if ( ! wc_rest_check_manager_permissions( 'settings', 'edit' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_edit', __( 'Sorry, you cannot edit this resource.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_edit', __( 'Sorry, you cannot edit this resource.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; } @@ -185,14 +185,14 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { public function get_import_collection_params() { $params = array(); $params['days'] = array( - 'description' => __( 'Number of days to import.', 'woocommerce-admin' ), + 'description' => __( 'Number of days to import.', 'woocommerce' ), 'type' => 'integer', 'sanitize_callback' => 'absint', 'validate_callback' => 'rest_validate_request_arg', 'minimum' => 0, ); $params['skip_existing'] = array( - 'description' => __( 'Skip importing existing order data.', 'woocommerce-admin' ), + 'description' => __( 'Skip importing existing order data.', 'woocommerce' ), 'type' => 'boolean', 'default' => false, 'sanitize_callback' => 'wc_string_to_bool', @@ -213,13 +213,13 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'type' => 'object', 'properties' => array( 'status' => array( - 'description' => __( 'Regeneration status.', 'woocommerce-admin' ), + 'description' => __( 'Regeneration status.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'message' => array( - 'description' => __( 'Regenerate data message.', 'woocommerce-admin' ), + 'description' => __( 'Regenerate data message.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -241,7 +241,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { $result = array( 'status' => 'success', - 'message' => __( 'All pending and in-progress import actions have been cancelled.', 'woocommerce-admin' ), + 'message' => __( 'All pending and in-progress import actions have been cancelled.', 'woocommerce' ), ); $response = $this->prepare_item_for_response( $result, $request ); diff --git a/plugins/woocommerce/src/Admin/API/Reports/Orders/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Orders/Controller.php index 1f0edc37760..195436ebf9f 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Orders/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Orders/Controller.php @@ -172,61 +172,61 @@ class Controller extends ReportsController implements ExportableInterface { 'type' => 'object', 'properties' => array( 'order_id' => array( - 'description' => __( 'Order ID.', 'woocommerce-admin' ), + 'description' => __( 'Order ID.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'order_number' => array( - 'description' => __( 'Order Number.', 'woocommerce-admin' ), + 'description' => __( 'Order Number.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_created' => array( - 'description' => __( "Date the order was created, in the site's timezone.", 'woocommerce-admin' ), + 'description' => __( "Date the order was created, in the site's timezone.", 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_created_gmt' => array( - 'description' => __( 'Date the order was created, as GMT.', 'woocommerce-admin' ), + 'description' => __( 'Date the order was created, as GMT.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'status' => array( - 'description' => __( 'Order status.', 'woocommerce-admin' ), + 'description' => __( 'Order status.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'customer_id' => array( - 'description' => __( 'Customer ID.', 'woocommerce-admin' ), + 'description' => __( 'Customer ID.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'num_items_sold' => array( - 'description' => __( 'Number of items sold.', 'woocommerce-admin' ), + 'description' => __( 'Number of items sold.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'net_total' => array( - 'description' => __( 'Net total revenue.', 'woocommerce-admin' ), + 'description' => __( 'Net total revenue.', 'woocommerce' ), 'type' => 'float', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'total_formatted' => array( - 'description' => __( 'Net total revenue (formatted).', 'woocommerce-admin' ), + 'description' => __( 'Net total revenue (formatted).', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'customer_type' => array( - 'description' => __( 'Returning or new customer.', 'woocommerce-admin' ), + 'description' => __( 'Returning or new customer.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -236,19 +236,19 @@ class Controller extends ReportsController implements ExportableInterface { 'type' => 'array', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'List of order product IDs, names, quantities.', 'woocommerce-admin' ), + 'description' => __( 'List of order product IDs, names, quantities.', 'woocommerce' ), ), 'coupons' => array( 'type' => 'array', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'List of order coupons.', 'woocommerce-admin' ), + 'description' => __( 'List of order coupons.', 'woocommerce' ), ), 'customer' => array( 'type' => 'object', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Order customer information.', 'woocommerce-admin' ), + 'description' => __( 'Order customer information.', 'woocommerce' ), ), ), ), @@ -266,7 +266,7 @@ class Controller extends ReportsController implements ExportableInterface { $params = array(); $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['page'] = array( - 'description' => __( 'Current page of the collection.', 'woocommerce-admin' ), + 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', @@ -274,7 +274,7 @@ class Controller extends ReportsController implements ExportableInterface { 'minimum' => 1, ); $params['per_page'] = array( - 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce-admin' ), + 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 10, 'minimum' => 0, @@ -283,26 +283,26 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['after'] = array( - 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['before'] = array( - 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['order'] = array( - 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce-admin' ), + 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ), 'type' => 'string', 'default' => 'desc', 'enum' => array( 'asc', 'desc' ), 'validate_callback' => 'rest_validate_request_arg', ); $params['orderby'] = array( - 'description' => __( 'Sort collection by object attribute.', 'woocommerce-admin' ), + 'description' => __( 'Sort collection by object attribute.', 'woocommerce' ), 'type' => 'string', 'default' => 'date', 'enum' => array( @@ -313,7 +313,7 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['product_includes'] = array( - 'description' => __( 'Limit result set to items that have the specified product(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that have the specified product(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -323,7 +323,7 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['product_excludes'] = array( - 'description' => __( 'Limit result set to items that don\'t have the specified product(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that don\'t have the specified product(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -333,7 +333,7 @@ class Controller extends ReportsController implements ExportableInterface { 'sanitize_callback' => 'wp_parse_id_list', ); $params['variation_includes'] = array( - 'description' => __( 'Limit result set to items that have the specified variation(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that have the specified variation(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -343,7 +343,7 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['variation_excludes'] = array( - 'description' => __( 'Limit result set to items that don\'t have the specified variation(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that don\'t have the specified variation(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -353,7 +353,7 @@ class Controller extends ReportsController implements ExportableInterface { 'sanitize_callback' => 'wp_parse_id_list', ); $params['coupon_includes'] = array( - 'description' => __( 'Limit result set to items that have the specified coupon(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that have the specified coupon(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -363,7 +363,7 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['coupon_excludes'] = array( - 'description' => __( 'Limit result set to items that don\'t have the specified coupon(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that don\'t have the specified coupon(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -373,7 +373,7 @@ class Controller extends ReportsController implements ExportableInterface { 'sanitize_callback' => 'wp_parse_id_list', ); $params['tax_rate_includes'] = array( - 'description' => __( 'Limit result set to items that have the specified tax rate(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that have the specified tax rate(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -383,7 +383,7 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['tax_rate_excludes'] = array( - 'description' => __( 'Limit result set to items that don\'t have the specified tax rate(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that don\'t have the specified tax rate(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -393,7 +393,7 @@ class Controller extends ReportsController implements ExportableInterface { 'sanitize_callback' => 'wp_parse_id_list', ); $params['status_is'] = array( - 'description' => __( 'Limit result set to items that have the specified order status.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that have the specified order status.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', @@ -403,7 +403,7 @@ class Controller extends ReportsController implements ExportableInterface { ), ); $params['status_is_not'] = array( - 'description' => __( 'Limit result set to items that don\'t have the specified order status.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that don\'t have the specified order status.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', @@ -413,7 +413,7 @@ class Controller extends ReportsController implements ExportableInterface { ), ); $params['customer_type'] = array( - 'description' => __( 'Limit result set to returning or new customers.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to returning or new customers.', 'woocommerce' ), 'type' => 'string', 'default' => '', 'enum' => array( @@ -424,7 +424,7 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['refunds'] = array( - 'description' => __( 'Limit result set to specific types of refunds.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to specific types of refunds.', 'woocommerce' ), 'type' => 'string', 'default' => '', 'enum' => array( @@ -437,14 +437,14 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['extended_info'] = array( - 'description' => __( 'Add additional piece of info about each coupon to the report.', 'woocommerce-admin' ), + 'description' => __( 'Add additional piece of info about each coupon to the report.', 'woocommerce' ), 'type' => 'boolean', 'default' => false, 'sanitize_callback' => 'wc_string_to_bool', 'validate_callback' => 'rest_validate_request_arg', ); $params['order_includes'] = array( - 'description' => __( 'Limit result set to items that have the specified order ids.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that have the specified order ids.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -453,7 +453,7 @@ class Controller extends ReportsController implements ExportableInterface { ), ); $params['order_excludes'] = array( - 'description' => __( 'Limit result set to items that don\'t have the specified order ids.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that don\'t have the specified order ids.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -462,7 +462,7 @@ class Controller extends ReportsController implements ExportableInterface { ), ); $params['attribute_is'] = array( - 'description' => __( 'Limit result set to orders that include products with the specified attributes.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to orders that include products with the specified attributes.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'array', @@ -471,7 +471,7 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['attribute_is_not'] = array( - 'description' => __( 'Limit result set to orders that don\'t include products with the specified attributes.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to orders that don\'t include products with the specified attributes.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'array', @@ -505,7 +505,7 @@ class Controller extends ReportsController implements ExportableInterface { foreach ( $products as $product ) { $products_list[] = sprintf( /* translators: 1: numeric product quantity, 2: name of product */ - __( '%1$s× %2$s', 'woocommerce-admin' ), + __( '%1$s× %2$s', 'woocommerce' ), $product['quantity'], $product['name'] ); @@ -531,16 +531,16 @@ class Controller extends ReportsController implements ExportableInterface { */ public function get_export_columns() { $export_columns = array( - 'date_created' => __( 'Date', 'woocommerce-admin' ), - 'order_number' => __( 'Order #', 'woocommerce-admin' ), - 'total_formatted' => __( 'N. Revenue (formatted)', 'woocommerce-admin' ), - 'status' => __( 'Status', 'woocommerce-admin' ), - 'customer_name' => __( 'Customer', 'woocommerce-admin' ), - 'customer_type' => __( 'Customer type', 'woocommerce-admin' ), - 'products' => __( 'Product(s)', 'woocommerce-admin' ), - 'num_items_sold' => __( 'Items sold', 'woocommerce-admin' ), - 'coupons' => __( 'Coupon(s)', 'woocommerce-admin' ), - 'net_total' => __( 'N. Revenue', 'woocommerce-admin' ), + 'date_created' => __( 'Date', 'woocommerce' ), + 'order_number' => __( 'Order #', 'woocommerce' ), + 'total_formatted' => __( 'N. Revenue (formatted)', 'woocommerce' ), + 'status' => __( 'Status', 'woocommerce' ), + 'customer_name' => __( 'Customer', 'woocommerce' ), + 'customer_type' => __( 'Customer type', 'woocommerce' ), + 'products' => __( 'Product(s)', 'woocommerce' ), + 'num_items_sold' => __( 'Items sold', 'woocommerce' ), + 'coupons' => __( 'Coupon(s)', 'woocommerce' ), + 'net_total' => __( 'N. Revenue', 'woocommerce' ), ); /** diff --git a/plugins/woocommerce/src/Admin/API/Reports/Orders/Stats/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Orders/Stats/Controller.php index 23dc0bad815..5f182f4ed8d 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Orders/Stats/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Orders/Stats/Controller.php @@ -161,22 +161,22 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { public function get_item_schema() { $data_values = array( 'net_revenue' => array( - 'description' => __( 'Net sales.', 'woocommerce-admin' ), + 'description' => __( 'Net sales.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'format' => 'currency', ), 'orders_count' => array( - 'title' => __( 'Orders', 'woocommerce-admin' ), - 'description' => __( 'Number of orders', 'woocommerce-admin' ), + 'title' => __( 'Orders', 'woocommerce' ), + 'description' => __( 'Number of orders', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'indicator' => true, ), 'avg_order_value' => array( - 'description' => __( 'Average order value.', 'woocommerce-admin' ), + 'description' => __( 'Average order value.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -184,37 +184,37 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'format' => 'currency', ), 'avg_items_per_order' => array( - 'description' => __( 'Average items per order', 'woocommerce-admin' ), + 'description' => __( 'Average items per order', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'num_items_sold' => array( - 'description' => __( 'Number of items sold', 'woocommerce-admin' ), + 'description' => __( 'Number of items sold', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'coupons' => array( - 'description' => __( 'Amount discounted by coupons.', 'woocommerce-admin' ), + 'description' => __( 'Amount discounted by coupons.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'coupons_count' => array( - 'description' => __( 'Unique coupons count.', 'woocommerce-admin' ), + 'description' => __( 'Unique coupons count.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'total_customers' => array( - 'description' => __( 'Total distinct customers.', 'woocommerce-admin' ), + 'description' => __( 'Total distinct customers.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'products' => array( - 'description' => __( 'Number of distinct products sold.', 'woocommerce-admin' ), + 'description' => __( 'Number of distinct products sold.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -223,7 +223,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { $segments = array( 'segments' => array( - 'description' => __( 'Reports data grouped by segment condition.', 'woocommerce-admin' ), + 'description' => __( 'Reports data grouped by segment condition.', 'woocommerce' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -231,13 +231,13 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'type' => 'object', 'properties' => array( 'segment_id' => array( - 'description' => __( 'Segment identificator.', 'woocommerce-admin' ), + 'description' => __( 'Segment identificator.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'subtotals' => array( - 'description' => __( 'Interval subtotals.', 'woocommerce-admin' ), + 'description' => __( 'Interval subtotals.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -261,14 +261,14 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'type' => 'object', 'properties' => array( 'totals' => array( - 'description' => __( 'Totals data.', 'woocommerce-admin' ), + 'description' => __( 'Totals data.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'properties' => $totals, ), 'intervals' => array( - 'description' => __( 'Reports data grouped by intervals.', 'woocommerce-admin' ), + 'description' => __( 'Reports data grouped by intervals.', 'woocommerce' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -276,38 +276,38 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'type' => 'object', 'properties' => array( 'interval' => array( - 'description' => __( 'Type of interval.', 'woocommerce-admin' ), + 'description' => __( 'Type of interval.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'enum' => array( 'day', 'week', 'month', 'year' ), ), 'date_start' => array( - 'description' => __( "The date the report start, in the site's timezone.", 'woocommerce-admin' ), + 'description' => __( "The date the report start, in the site's timezone.", 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_start_gmt' => array( - 'description' => __( 'The date the report start, as GMT.', 'woocommerce-admin' ), + 'description' => __( 'The date the report start, as GMT.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_end' => array( - 'description' => __( "The date the report end, in the site's timezone.", 'woocommerce-admin' ), + 'description' => __( "The date the report end, in the site's timezone.", 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_end_gmt' => array( - 'description' => __( 'The date the report end, as GMT.', 'woocommerce-admin' ), + 'description' => __( 'The date the report end, as GMT.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'subtotals' => array( - 'description' => __( 'Interval subtotals.', 'woocommerce-admin' ), + 'description' => __( 'Interval subtotals.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -331,7 +331,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { $params = array(); $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['page'] = array( - 'description' => __( 'Current page of the collection.', 'woocommerce-admin' ), + 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', @@ -339,7 +339,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'minimum' => 1, ); $params['per_page'] = array( - 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce-admin' ), + 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 10, 'minimum' => 1, @@ -348,26 +348,26 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['after'] = array( - 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['before'] = array( - 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['order'] = array( - 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce-admin' ), + 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ), 'type' => 'string', 'default' => 'desc', 'enum' => array( 'asc', 'desc' ), 'validate_callback' => 'rest_validate_request_arg', ); $params['orderby'] = array( - 'description' => __( 'Sort collection by object attribute.', 'woocommerce-admin' ), + 'description' => __( 'Sort collection by object attribute.', 'woocommerce' ), 'type' => 'string', 'default' => 'date', 'enum' => array( @@ -379,7 +379,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['interval'] = array( - 'description' => __( 'Time interval to use for buckets in the returned data.', 'woocommerce-admin' ), + 'description' => __( 'Time interval to use for buckets in the returned data.', 'woocommerce' ), 'type' => 'string', 'default' => 'week', 'enum' => array( @@ -393,7 +393,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['match'] = array( - 'description' => __( 'Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories', 'woocommerce-admin' ), + 'description' => __( 'Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories', 'woocommerce' ), 'type' => 'string', 'default' => 'all', 'enum' => array( @@ -403,7 +403,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['status_is'] = array( - 'description' => __( 'Limit result set to items that have the specified order status.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that have the specified order status.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', @@ -414,7 +414,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { ), ); $params['status_is_not'] = array( - 'description' => __( 'Limit result set to items that don\'t have the specified order status.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that don\'t have the specified order status.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', @@ -424,7 +424,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { ), ); $params['product_includes'] = array( - 'description' => __( 'Limit result set to items that have the specified product(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that have the specified product(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -434,7 +434,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { ); $params['product_excludes'] = array( - 'description' => __( 'Limit result set to items that don\'t have the specified product(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that don\'t have the specified product(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -443,7 +443,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'sanitize_callback' => 'wp_parse_id_list', ); $params['variation_includes'] = array( - 'description' => __( 'Limit result set to items that have the specified variation(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that have the specified variation(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -453,7 +453,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['variation_excludes'] = array( - 'description' => __( 'Limit result set to items that don\'t have the specified variation(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that don\'t have the specified variation(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -463,7 +463,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'sanitize_callback' => 'wp_parse_id_list', ); $params['coupon_includes'] = array( - 'description' => __( 'Limit result set to items that have the specified coupon(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that have the specified coupon(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -472,7 +472,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'sanitize_callback' => 'wp_parse_id_list', ); $params['coupon_excludes'] = array( - 'description' => __( 'Limit result set to items that don\'t have the specified coupon(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that don\'t have the specified coupon(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -481,7 +481,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'sanitize_callback' => 'wp_parse_id_list', ); $params['tax_rate_includes'] = array( - 'description' => __( 'Limit result set to items that have the specified tax rate(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that have the specified tax rate(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -491,7 +491,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['tax_rate_excludes'] = array( - 'description' => __( 'Limit result set to items that don\'t have the specified tax rate(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that don\'t have the specified tax rate(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -501,7 +501,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'sanitize_callback' => 'wp_parse_id_list', ); $params['customer'] = array( - 'description' => __( 'Alias for customer_type (deprecated).', 'woocommerce-admin' ), + 'description' => __( 'Alias for customer_type (deprecated).', 'woocommerce' ), 'type' => 'string', 'enum' => array( 'new', @@ -510,7 +510,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['customer_type'] = array( - 'description' => __( 'Limit result set to orders that have the specified customer_type', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to orders that have the specified customer_type', 'woocommerce' ), 'type' => 'string', 'enum' => array( 'new', @@ -519,7 +519,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['refunds'] = array( - 'description' => __( 'Limit result set to specific types of refunds.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to specific types of refunds.', 'woocommerce' ), 'type' => 'string', 'default' => '', 'enum' => array( @@ -532,7 +532,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['attribute_is'] = array( - 'description' => __( 'Limit result set to orders that include products with the specified attributes.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to orders that include products with the specified attributes.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'array', @@ -541,7 +541,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['attribute_is_not'] = array( - 'description' => __( 'Limit result set to orders that don\'t include products with the specified attributes.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to orders that don\'t include products with the specified attributes.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'array', @@ -550,7 +550,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['segmentby'] = array( - 'description' => __( 'Segment the response by additional constraint.', 'woocommerce-admin' ), + 'description' => __( 'Segment the response by additional constraint.', 'woocommerce' ), 'type' => 'string', 'enum' => array( 'product', @@ -562,7 +562,7 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['fields'] = array( - 'description' => __( 'Limit stats fields to the specified items.', 'woocommerce-admin' ), + 'description' => __( 'Limit stats fields to the specified items.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', diff --git a/plugins/woocommerce/src/Admin/API/Reports/Orders/Stats/DataStore.php b/plugins/woocommerce/src/Admin/API/Reports/Orders/Stats/DataStore.php index ec019c9a3e5..232320d2f08 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Orders/Stats/DataStore.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Orders/Stats/DataStore.php @@ -332,7 +332,7 @@ class DataStore extends ReportsDataStore implements DataStoreInterface { ARRAY_A ); // phpcs:ignore cache ok, DB call ok, unprepared SQL ok. if ( null === $totals ) { - return new \WP_Error( 'woocommerce_analytics_revenue_result_failed', __( 'Sorry, fetching revenue data failed.', 'woocommerce-admin' ) ); + return new \WP_Error( 'woocommerce_analytics_revenue_result_failed', __( 'Sorry, fetching revenue data failed.', 'woocommerce' ) ); } // @todo Remove these assignements when refactoring segmenter classes to use query objects. @@ -385,7 +385,7 @@ class DataStore extends ReportsDataStore implements DataStoreInterface { ); // phpcs:ignore cache ok, DB call ok, unprepared SQL ok. if ( null === $intervals ) { - return new \WP_Error( 'woocommerce_analytics_revenue_result_failed', __( 'Sorry, fetching revenue data failed.', 'woocommerce-admin' ) ); + return new \WP_Error( 'woocommerce_analytics_revenue_result_failed', __( 'Sorry, fetching revenue data failed.', 'woocommerce' ) ); } if ( isset( $intervals[0] ) ) { diff --git a/plugins/woocommerce/src/Admin/API/Reports/Orders/Stats/Segmenter.php b/plugins/woocommerce/src/Admin/API/Reports/Orders/Stats/Segmenter.php index 437e4c23e23..32cb253c591 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Orders/Stats/Segmenter.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Orders/Stats/Segmenter.php @@ -375,7 +375,7 @@ class Segmenter extends ReportsSegmenter { $segments = $this->get_product_related_segments( $type, $segmenting_selections, $segmenting_from, $segmenting_where, $segmenting_groupby, $segmenting_dimension_name, $table_name, $query_params, $unique_orders_table ); } elseif ( 'variation' === $this->query_args['segmentby'] ) { if ( ! isset( $this->query_args['product_includes'] ) || count( $this->query_args['product_includes'] ) !== 1 ) { - throw new ParameterException( 'wc_admin_reports_invalid_segmenting_variation', __( 'product_includes parameter need to specify exactly one product when segmenting by variation.', 'woocommerce-admin' ) ); + throw new ParameterException( 'wc_admin_reports_invalid_segmenting_variation', __( 'product_includes parameter need to specify exactly one product when segmenting by variation.', 'woocommerce' ) ); } $product_level_columns = $this->get_segment_selections_product_level( $product_segmenting_table ); diff --git a/plugins/woocommerce/src/Admin/API/Reports/PerformanceIndicators/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/PerformanceIndicators/Controller.php index e6c6cc1cb34..b5d32750257 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/PerformanceIndicators/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/PerformanceIndicators/Controller.php @@ -141,7 +141,7 @@ class Controller extends \WC_REST_Reports_Controller { } if ( 200 !== $response->get_status() ) { - return new \WP_Error( 'woocommerce_analytics_performance_indicators_result_failed', __( 'Sorry, fetching performance indicators failed.', 'woocommerce-admin' ) ); + return new \WP_Error( 'woocommerce_analytics_performance_indicators_result_failed', __( 'Sorry, fetching performance indicators failed.', 'woocommerce' ) ); } $endpoints = $response->get_data(); @@ -223,13 +223,13 @@ class Controller extends \WC_REST_Reports_Controller { 'woocommerce_rest_performance_indicators_jetpack_items', array( 'stats/visitors' => array( - 'label' => __( 'Visitors', 'woocommerce-admin' ), + 'label' => __( 'Visitors', 'woocommerce' ), 'permission' => 'view_stats', 'format' => 'number', 'module' => 'stats', ), 'stats/views' => array( - 'label' => __( 'Views', 'woocommerce-admin' ), + 'label' => __( 'Views', 'woocommerce' ), 'permission' => 'view_stats', 'format' => 'number', 'module' => 'stats', @@ -405,7 +405,7 @@ class Controller extends \WC_REST_Reports_Controller { $query_args = $this->prepare_reports_query( $request ); if ( empty( $query_args['stats'] ) ) { - return new \WP_Error( 'woocommerce_analytics_performance_indicators_empty_query', __( 'A list of stats to query must be provided.', 'woocommerce-admin' ), 400 ); + return new \WP_Error( 'woocommerce_analytics_performance_indicators_empty_query', __( 'A list of stats to query must be provided.', 'woocommerce' ), 400 ); } $stats = array(); @@ -594,33 +594,33 @@ class Controller extends \WC_REST_Reports_Controller { 'type' => 'object', 'properties' => array( 'stat' => array( - 'description' => __( 'Unique identifier for the resource.', 'woocommerce-admin' ), + 'description' => __( 'Unique identifier for the resource.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'enum' => $allowed_stats, ), 'chart' => array( - 'description' => __( 'The specific chart this stat referrers to.', 'woocommerce-admin' ), + 'description' => __( 'The specific chart this stat referrers to.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'label' => array( - 'description' => __( 'Human readable label for the stat.', 'woocommerce-admin' ), + 'description' => __( 'Human readable label for the stat.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'format' => array( - 'description' => __( 'Format of the stat.', 'woocommerce-admin' ), + 'description' => __( 'Format of the stat.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'enum' => array( 'number', 'currency' ), ), 'value' => array( - 'description' => __( 'Value of the stat. Returns null if the stat does not exist or cannot be loaded.', 'woocommerce-admin' ), + 'description' => __( 'Value of the stat. Returns null if the stat does not exist or cannot be loaded.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -651,7 +651,7 @@ class Controller extends \WC_REST_Reports_Controller { public function get_collection_params() { $indicator_data = $this->get_indicator_data(); if ( is_wp_error( $indicator_data ) ) { - $allowed_stats = __( 'There was an issue loading the report endpoints', 'woocommerce-admin' ); + $allowed_stats = __( 'There was an issue loading the report endpoints', 'woocommerce' ); } else { $allowed_stats = implode( ', ', $this->allowed_stats ); } @@ -661,7 +661,7 @@ class Controller extends \WC_REST_Reports_Controller { $params['stats'] = array( 'description' => sprintf( /* translators: Allowed values is a list of stat endpoints. */ - __( 'Limit response to specific report stats. Allowed values: %s.', 'woocommerce-admin' ), + __( 'Limit response to specific report stats. Allowed values: %s.', 'woocommerce' ), $allowed_stats ), 'type' => 'array', @@ -673,13 +673,13 @@ class Controller extends \WC_REST_Reports_Controller { 'default' => $this->allowed_stats, ); $params['after'] = array( - 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['before'] = array( - 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', diff --git a/plugins/woocommerce/src/Admin/API/Reports/Products/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Products/Controller.php index b156c8d9ccf..8e35d8a87fb 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Products/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Products/Controller.php @@ -162,86 +162,86 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'type' => 'integer', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product ID.', 'woocommerce-admin' ), + 'description' => __( 'Product ID.', 'woocommerce' ), ), 'items_sold' => array( 'type' => 'integer', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Number of items sold.', 'woocommerce-admin' ), + 'description' => __( 'Number of items sold.', 'woocommerce' ), ), 'net_revenue' => array( 'type' => 'number', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Total Net sales of all items sold.', 'woocommerce-admin' ), + 'description' => __( 'Total Net sales of all items sold.', 'woocommerce' ), ), 'orders_count' => array( 'type' => 'integer', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Number of orders product appeared in.', 'woocommerce-admin' ), + 'description' => __( 'Number of orders product appeared in.', 'woocommerce' ), ), 'extended_info' => array( 'name' => array( 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product name.', 'woocommerce-admin' ), + 'description' => __( 'Product name.', 'woocommerce' ), ), 'price' => array( 'type' => 'number', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product price.', 'woocommerce-admin' ), + 'description' => __( 'Product price.', 'woocommerce' ), ), 'image' => array( 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product image.', 'woocommerce-admin' ), + 'description' => __( 'Product image.', 'woocommerce' ), ), 'permalink' => array( 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product link.', 'woocommerce-admin' ), + 'description' => __( 'Product link.', 'woocommerce' ), ), 'category_ids' => array( 'type' => 'array', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product category IDs.', 'woocommerce-admin' ), + 'description' => __( 'Product category IDs.', 'woocommerce' ), ), 'stock_status' => array( 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product inventory status.', 'woocommerce-admin' ), + 'description' => __( 'Product inventory status.', 'woocommerce' ), ), 'stock_quantity' => array( 'type' => 'integer', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product inventory quantity.', 'woocommerce-admin' ), + 'description' => __( 'Product inventory quantity.', 'woocommerce' ), ), 'low_stock_amount' => array( 'type' => 'integer', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product inventory threshold for low stock.', 'woocommerce-admin' ), + 'description' => __( 'Product inventory threshold for low stock.', 'woocommerce' ), ), 'variations' => array( 'type' => 'array', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product variations IDs.', 'woocommerce-admin' ), + 'description' => __( 'Product variations IDs.', 'woocommerce' ), ), 'sku' => array( 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product SKU.', 'woocommerce-admin' ), + 'description' => __( 'Product SKU.', 'woocommerce' ), ), ), ), @@ -259,7 +259,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf $params = array(); $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['page'] = array( - 'description' => __( 'Current page of the collection.', 'woocommerce-admin' ), + 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', @@ -267,7 +267,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'minimum' => 1, ); $params['per_page'] = array( - 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce-admin' ), + 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 10, 'minimum' => 1, @@ -276,26 +276,26 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'validate_callback' => 'rest_validate_request_arg', ); $params['after'] = array( - 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['before'] = array( - 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['order'] = array( - 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce-admin' ), + 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ), 'type' => 'string', 'default' => 'desc', 'enum' => array( 'asc', 'desc' ), 'validate_callback' => 'rest_validate_request_arg', ); $params['orderby'] = array( - 'description' => __( 'Sort collection by object attribute.', 'woocommerce-admin' ), + 'description' => __( 'Sort collection by object attribute.', 'woocommerce' ), 'type' => 'string', 'default' => 'date', 'enum' => array( @@ -310,7 +310,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'validate_callback' => 'rest_validate_request_arg', ); $params['categories'] = array( - 'description' => __( 'Limit result to items from the specified categories.', 'woocommerce-admin' ), + 'description' => __( 'Limit result to items from the specified categories.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -319,7 +319,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf ), ); $params['match'] = array( - 'description' => __( 'Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories', 'woocommerce-admin' ), + 'description' => __( 'Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories', 'woocommerce' ), 'type' => 'string', 'default' => 'all', 'enum' => array( @@ -329,7 +329,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'validate_callback' => 'rest_validate_request_arg', ); $params['products'] = array( - 'description' => __( 'Limit result to items with specified product ids.', 'woocommerce-admin' ), + 'description' => __( 'Limit result to items with specified product ids.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -339,7 +339,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf ); $params['extended_info'] = array( - 'description' => __( 'Add additional piece of info about each product to the report.', 'woocommerce-admin' ), + 'description' => __( 'Add additional piece of info about each product to the report.', 'woocommerce' ), 'type' => 'boolean', 'default' => false, 'sanitize_callback' => 'wc_string_to_bool', @@ -386,18 +386,18 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf */ public function get_export_columns() { $export_columns = array( - 'product_name' => __( 'Product title', 'woocommerce-admin' ), - 'sku' => __( 'SKU', 'woocommerce-admin' ), - 'items_sold' => __( 'Items sold', 'woocommerce-admin' ), - 'net_revenue' => __( 'N. Revenue', 'woocommerce-admin' ), - 'orders_count' => __( 'Orders', 'woocommerce-admin' ), - 'product_cat' => __( 'Category', 'woocommerce-admin' ), - 'variations' => __( 'Variations', 'woocommerce-admin' ), + 'product_name' => __( 'Product title', 'woocommerce' ), + 'sku' => __( 'SKU', 'woocommerce' ), + 'items_sold' => __( 'Items sold', 'woocommerce' ), + 'net_revenue' => __( 'N. Revenue', 'woocommerce' ), + 'orders_count' => __( 'Orders', 'woocommerce' ), + 'product_cat' => __( 'Category', 'woocommerce' ), + 'variations' => __( 'Variations', 'woocommerce' ), ); if ( 'yes' === get_option( 'woocommerce_manage_stock' ) ) { - $export_columns['stock_status'] = __( 'Status', 'woocommerce-admin' ); - $export_columns['stock'] = __( 'Stock', 'woocommerce-admin' ); + $export_columns['stock_status'] = __( 'Status', 'woocommerce' ); + $export_columns['stock'] = __( 'Stock', 'woocommerce' ); } /** @@ -434,8 +434,8 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf $export_item['stock_status'] = $this->get_stock_status( $item['extended_info']['stock_status'] ); $export_item['stock'] = $item['extended_info']['stock_quantity']; } else { - $export_item['stock_status'] = __( 'N/A', 'woocommerce-admin' ); - $export_item['stock'] = __( 'N/A', 'woocommerce-admin' ); + $export_item['stock_status'] = __( 'N/A', 'woocommerce' ); + $export_item['stock'] = __( 'N/A', 'woocommerce' ); } } diff --git a/plugins/woocommerce/src/Admin/API/Reports/Products/DataStore.php b/plugins/woocommerce/src/Admin/API/Reports/Products/DataStore.php index 3acaa471bb7..68728bf467e 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Products/DataStore.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Products/DataStore.php @@ -224,7 +224,7 @@ class DataStore extends ReportsDataStore implements DataStoreInterface { } /* translators: %s is product name */ - $products_data[ $key ]['extended_info']['name'] = $product_names[ $product_id ] ? sprintf( __( '%s (Deleted)', 'woocommerce-admin' ), $product_names[ $product_id ] ) : __( '(Deleted)', 'woocommerce-admin' ); + $products_data[ $key ]['extended_info']['name'] = $product_names[ $product_id ] ? sprintf( __( '%s (Deleted)', 'woocommerce' ), $product_names[ $product_id ] ) : __( '(Deleted)', 'woocommerce' ); continue; } diff --git a/plugins/woocommerce/src/Admin/API/Reports/Products/Stats/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Products/Stats/Controller.php index 67f2b55c1b1..c2fa906b1a9 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Products/Stats/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Products/Stats/Controller.php @@ -157,22 +157,22 @@ class Controller extends \WC_REST_Reports_Controller { public function get_item_schema() { $data_values = array( 'items_sold' => array( - 'title' => __( 'Products sold', 'woocommerce-admin' ), - 'description' => __( 'Number of product items sold.', 'woocommerce-admin' ), + 'title' => __( 'Products sold', 'woocommerce' ), + 'description' => __( 'Number of product items sold.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'indicator' => true, ), 'net_revenue' => array( - 'description' => __( 'Net sales.', 'woocommerce-admin' ), + 'description' => __( 'Net sales.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'format' => 'currency', ), 'orders_count' => array( - 'description' => __( 'Number of orders.', 'woocommerce-admin' ), + 'description' => __( 'Number of orders.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -181,7 +181,7 @@ class Controller extends \WC_REST_Reports_Controller { $segments = array( 'segments' => array( - 'description' => __( 'Reports data grouped by segment condition.', 'woocommerce-admin' ), + 'description' => __( 'Reports data grouped by segment condition.', 'woocommerce' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -189,20 +189,20 @@ class Controller extends \WC_REST_Reports_Controller { 'type' => 'object', 'properties' => array( 'segment_id' => array( - 'description' => __( 'Segment identificator.', 'woocommerce-admin' ), + 'description' => __( 'Segment identificator.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'segment_label' => array( - 'description' => __( 'Human readable segment label, either product or variation name.', 'woocommerce-admin' ), + 'description' => __( 'Human readable segment label, either product or variation name.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'enum' => array( 'day', 'week', 'month', 'year' ), ), 'subtotals' => array( - 'description' => __( 'Interval subtotals.', 'woocommerce-admin' ), + 'description' => __( 'Interval subtotals.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -221,14 +221,14 @@ class Controller extends \WC_REST_Reports_Controller { 'type' => 'object', 'properties' => array( 'totals' => array( - 'description' => __( 'Totals data.', 'woocommerce-admin' ), + 'description' => __( 'Totals data.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'properties' => $totals, ), 'intervals' => array( - 'description' => __( 'Reports data grouped by intervals.', 'woocommerce-admin' ), + 'description' => __( 'Reports data grouped by intervals.', 'woocommerce' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -236,38 +236,38 @@ class Controller extends \WC_REST_Reports_Controller { 'type' => 'object', 'properties' => array( 'interval' => array( - 'description' => __( 'Type of interval.', 'woocommerce-admin' ), + 'description' => __( 'Type of interval.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'enum' => array( 'day', 'week', 'month', 'year' ), ), 'date_start' => array( - 'description' => __( "The date the report start, in the site's timezone.", 'woocommerce-admin' ), + 'description' => __( "The date the report start, in the site's timezone.", 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_start_gmt' => array( - 'description' => __( 'The date the report start, as GMT.', 'woocommerce-admin' ), + 'description' => __( 'The date the report start, as GMT.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_end' => array( - 'description' => __( "The date the report end, in the site's timezone.", 'woocommerce-admin' ), + 'description' => __( "The date the report end, in the site's timezone.", 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_end_gmt' => array( - 'description' => __( 'The date the report end, as GMT.', 'woocommerce-admin' ), + 'description' => __( 'The date the report end, as GMT.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'subtotals' => array( - 'description' => __( 'Interval subtotals.', 'woocommerce-admin' ), + 'description' => __( 'Interval subtotals.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -313,7 +313,7 @@ class Controller extends \WC_REST_Reports_Controller { $params = array(); $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['page'] = array( - 'description' => __( 'Current page of the collection.', 'woocommerce-admin' ), + 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', @@ -321,7 +321,7 @@ class Controller extends \WC_REST_Reports_Controller { 'minimum' => 1, ); $params['per_page'] = array( - 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce-admin' ), + 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 10, 'minimum' => 1, @@ -330,26 +330,26 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['after'] = array( - 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['before'] = array( - 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['order'] = array( - 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce-admin' ), + 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ), 'type' => 'string', 'default' => 'desc', 'enum' => array( 'asc', 'desc' ), 'validate_callback' => 'rest_validate_request_arg', ); $params['orderby'] = array( - 'description' => __( 'Sort collection by object attribute.', 'woocommerce-admin' ), + 'description' => __( 'Sort collection by object attribute.', 'woocommerce' ), 'type' => 'string', 'default' => 'date', 'enum' => array( @@ -366,7 +366,7 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['interval'] = array( - 'description' => __( 'Time interval to use for buckets in the returned data.', 'woocommerce-admin' ), + 'description' => __( 'Time interval to use for buckets in the returned data.', 'woocommerce' ), 'type' => 'string', 'default' => 'week', 'enum' => array( @@ -380,7 +380,7 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['categories'] = array( - 'description' => __( 'Limit result to items from the specified categories.', 'woocommerce-admin' ), + 'description' => __( 'Limit result to items from the specified categories.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -389,7 +389,7 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['products'] = array( - 'description' => __( 'Limit result to items with specified product ids.', 'woocommerce-admin' ), + 'description' => __( 'Limit result to items with specified product ids.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -398,7 +398,7 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['variations'] = array( - 'description' => __( 'Limit result to items with specified variation ids.', 'woocommerce-admin' ), + 'description' => __( 'Limit result to items with specified variation ids.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -407,7 +407,7 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['segmentby'] = array( - 'description' => __( 'Segment the response by additional constraint.', 'woocommerce-admin' ), + 'description' => __( 'Segment the response by additional constraint.', 'woocommerce' ), 'type' => 'string', 'enum' => array( 'product', @@ -417,7 +417,7 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['fields'] = array( - 'description' => __( 'Limit stats fields to the specified items.', 'woocommerce-admin' ), + 'description' => __( 'Limit stats fields to the specified items.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', diff --git a/plugins/woocommerce/src/Admin/API/Reports/Products/Stats/DataStore.php b/plugins/woocommerce/src/Admin/API/Reports/Products/Stats/DataStore.php index 776a4f7f8ab..ec3513938fb 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Products/Stats/DataStore.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Products/Stats/DataStore.php @@ -183,7 +183,7 @@ class DataStore extends ProductsDataStore implements DataStoreInterface { $totals[0]['segments'] = $segmenter->get_totals_segments( $totals_query, $table_name ); if ( null === $totals ) { - return new \WP_Error( 'woocommerce_analytics_products_stats_result_failed', __( 'Sorry, fetching revenue data failed.', 'woocommerce-admin' ) ); + return new \WP_Error( 'woocommerce_analytics_products_stats_result_failed', __( 'Sorry, fetching revenue data failed.', 'woocommerce' ) ); } $this->interval_query->add_sql_clause( 'order_by', $this->get_sql_clause( 'order_by' ) ); @@ -199,7 +199,7 @@ class DataStore extends ProductsDataStore implements DataStoreInterface { ); // WPCS: cache ok, DB call ok, unprepared SQL ok. if ( null === $intervals ) { - return new \WP_Error( 'woocommerce_analytics_products_stats_result_failed', __( 'Sorry, fetching revenue data failed.', 'woocommerce-admin' ) ); + return new \WP_Error( 'woocommerce_analytics_products_stats_result_failed', __( 'Sorry, fetching revenue data failed.', 'woocommerce' ) ); } $totals = (object) $this->cast_numbers( $totals[0] ); diff --git a/plugins/woocommerce/src/Admin/API/Reports/Products/Stats/Segmenter.php b/plugins/woocommerce/src/Admin/API/Reports/Products/Stats/Segmenter.php index d99ffa6ec47..a29eea75eca 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Products/Stats/Segmenter.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Products/Stats/Segmenter.php @@ -166,7 +166,7 @@ class Segmenter extends ReportsSegmenter { $segments = $this->get_product_related_segments( $type, $segmenting_selections, $segmenting_from, $segmenting_where, $segmenting_groupby, $segmenting_dimension_name, $table_name, $query_params, $unique_orders_table ); } elseif ( 'variation' === $this->query_args['segmentby'] ) { if ( ! isset( $this->query_args['product_includes'] ) || count( $this->query_args['product_includes'] ) !== 1 ) { - throw new ParameterException( 'wc_admin_reports_invalid_segmenting_variation', __( 'product_includes parameter need to specify exactly one product when segmenting by variation.', 'woocommerce-admin' ) ); + throw new ParameterException( 'wc_admin_reports_invalid_segmenting_variation', __( 'product_includes parameter need to specify exactly one product when segmenting by variation.', 'woocommerce' ) ); } $product_level_columns = $this->get_segment_selections_product_level( $product_segmenting_table ); diff --git a/plugins/woocommerce/src/Admin/API/Reports/Query.php b/plugins/woocommerce/src/Admin/API/Reports/Query.php index 8dec5b500e8..c287159beeb 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Query.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Query.php @@ -19,6 +19,6 @@ abstract class Query extends \WC_Object_Query { */ public function get_data() { /* translators: %s: Method name */ - return new \WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass.", 'woocommerce-admin' ), __METHOD__ ), array( 'status' => 405 ) ); + return new \WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass.", 'woocommerce' ), __METHOD__ ), array( 'status' => 405 ) ); } } diff --git a/plugins/woocommerce/src/Admin/API/Reports/Revenue/Stats/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Revenue/Stats/Controller.php index 3285a1feb7f..998988a3e30 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Revenue/Stats/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Revenue/Stats/Controller.php @@ -165,7 +165,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf public function get_item_schema() { $data_values = array( 'total_sales' => array( - 'description' => __( 'Total sales.', 'woocommerce-admin' ), + 'description' => __( 'Total sales.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -173,7 +173,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'format' => 'currency', ), 'net_revenue' => array( - 'description' => __( 'Net sales.', 'woocommerce-admin' ), + 'description' => __( 'Net sales.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -181,21 +181,21 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'format' => 'currency', ), 'coupons' => array( - 'description' => __( 'Amount discounted by coupons.', 'woocommerce-admin' ), + 'description' => __( 'Amount discounted by coupons.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'coupons_count' => array( - 'description' => __( 'Unique coupons count.', 'woocommerce-admin' ), + 'description' => __( 'Unique coupons count.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'format' => 'currency', ), 'shipping' => array( - 'title' => __( 'Shipping', 'woocommerce-admin' ), - 'description' => __( 'Total of shipping.', 'woocommerce-admin' ), + 'title' => __( 'Shipping', 'woocommerce' ), + 'description' => __( 'Total of shipping.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -203,15 +203,15 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'format' => 'currency', ), 'taxes' => array( - 'description' => __( 'Total of taxes.', 'woocommerce-admin' ), + 'description' => __( 'Total of taxes.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'format' => 'currency', ), 'refunds' => array( - 'title' => __( 'Returns', 'woocommerce-admin' ), - 'description' => __( 'Total of returns.', 'woocommerce-admin' ), + 'title' => __( 'Returns', 'woocommerce' ), + 'description' => __( 'Total of returns.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -219,25 +219,25 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'format' => 'currency', ), 'orders_count' => array( - 'description' => __( 'Number of orders.', 'woocommerce-admin' ), + 'description' => __( 'Number of orders.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'num_items_sold' => array( - 'description' => __( 'Items sold.', 'woocommerce-admin' ), + 'description' => __( 'Items sold.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'products' => array( - 'description' => __( 'Products sold.', 'woocommerce-admin' ), + 'description' => __( 'Products sold.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'gross_sales' => array( - 'description' => __( 'Gross sales.', 'woocommerce-admin' ), + 'description' => __( 'Gross sales.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -248,7 +248,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf $segments = array( 'segments' => array( - 'description' => __( 'Reports data grouped by segment condition.', 'woocommerce-admin' ), + 'description' => __( 'Reports data grouped by segment condition.', 'woocommerce' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -256,13 +256,13 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'type' => 'object', 'properties' => array( 'segment_id' => array( - 'description' => __( 'Segment identificator.', 'woocommerce-admin' ), + 'description' => __( 'Segment identificator.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'subtotals' => array( - 'description' => __( 'Interval subtotals.', 'woocommerce-admin' ), + 'description' => __( 'Interval subtotals.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -286,14 +286,14 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'type' => 'object', 'properties' => array( 'totals' => array( - 'description' => __( 'Totals data.', 'woocommerce-admin' ), + 'description' => __( 'Totals data.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'properties' => $totals, ), 'intervals' => array( - 'description' => __( 'Reports data grouped by intervals.', 'woocommerce-admin' ), + 'description' => __( 'Reports data grouped by intervals.', 'woocommerce' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -301,38 +301,38 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'type' => 'object', 'properties' => array( 'interval' => array( - 'description' => __( 'Type of interval.', 'woocommerce-admin' ), + 'description' => __( 'Type of interval.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'enum' => array( 'day', 'week', 'month', 'year' ), ), 'date_start' => array( - 'description' => __( "The date the report start, in the site's timezone.", 'woocommerce-admin' ), + 'description' => __( "The date the report start, in the site's timezone.", 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_start_gmt' => array( - 'description' => __( 'The date the report start, as GMT.', 'woocommerce-admin' ), + 'description' => __( 'The date the report start, as GMT.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_end' => array( - 'description' => __( "The date the report end, in the site's timezone.", 'woocommerce-admin' ), + 'description' => __( "The date the report end, in the site's timezone.", 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_end_gmt' => array( - 'description' => __( 'The date the report end, as GMT.', 'woocommerce-admin' ), + 'description' => __( 'The date the report end, as GMT.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'subtotals' => array( - 'description' => __( 'Interval subtotals.', 'woocommerce-admin' ), + 'description' => __( 'Interval subtotals.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -356,7 +356,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf $params = array(); $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['page'] = array( - 'description' => __( 'Current page of the collection.', 'woocommerce-admin' ), + 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', @@ -364,7 +364,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'minimum' => 1, ); $params['per_page'] = array( - 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce-admin' ), + 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 10, 'minimum' => 1, @@ -373,26 +373,26 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'validate_callback' => 'rest_validate_request_arg', ); $params['after'] = array( - 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['before'] = array( - 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['order'] = array( - 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce-admin' ), + 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ), 'type' => 'string', 'default' => 'desc', 'enum' => array( 'asc', 'desc' ), 'validate_callback' => 'rest_validate_request_arg', ); $params['orderby'] = array( - 'description' => __( 'Sort collection by object attribute.', 'woocommerce-admin' ), + 'description' => __( 'Sort collection by object attribute.', 'woocommerce' ), 'type' => 'string', 'default' => 'date', 'enum' => array( @@ -410,7 +410,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'validate_callback' => 'rest_validate_request_arg', ); $params['interval'] = array( - 'description' => __( 'Time interval to use for buckets in the returned data.', 'woocommerce-admin' ), + 'description' => __( 'Time interval to use for buckets in the returned data.', 'woocommerce' ), 'type' => 'string', 'default' => 'week', 'enum' => array( @@ -424,7 +424,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'validate_callback' => 'rest_validate_request_arg', ); $params['segmentby'] = array( - 'description' => __( 'Segment the response by additional constraint.', 'woocommerce-admin' ), + 'description' => __( 'Segment the response by additional constraint.', 'woocommerce' ), 'type' => 'string', 'enum' => array( 'product', @@ -446,15 +446,15 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf */ public function get_export_columns() { return array( - 'date' => __( 'Date', 'woocommerce-admin' ), - 'orders_count' => __( 'Orders', 'woocommerce-admin' ), - 'gross_sales' => __( 'Gross sales', 'woocommerce-admin' ), - 'total_sales' => __( 'Total sales', 'woocommerce-admin' ), - 'refunds' => __( 'Returns', 'woocommerce-admin' ), - 'coupons' => __( 'Coupons', 'woocommerce-admin' ), - 'taxes' => __( 'Taxes', 'woocommerce-admin' ), - 'shipping' => __( 'Shipping', 'woocommerce-admin' ), - 'net_revenue' => __( 'Net Revenue', 'woocommerce-admin' ), + 'date' => __( 'Date', 'woocommerce' ), + 'orders_count' => __( 'Orders', 'woocommerce' ), + 'gross_sales' => __( 'Gross sales', 'woocommerce' ), + 'total_sales' => __( 'Total sales', 'woocommerce' ), + 'refunds' => __( 'Returns', 'woocommerce' ), + 'coupons' => __( 'Coupons', 'woocommerce' ), + 'taxes' => __( 'Taxes', 'woocommerce' ), + 'shipping' => __( 'Shipping', 'woocommerce' ), + 'net_revenue' => __( 'Net Revenue', 'woocommerce' ), ); } diff --git a/plugins/woocommerce/src/Admin/API/Reports/Stock/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Stock/Controller.php index 8605b318436..b5020e6ff32 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Stock/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Stock/Controller.php @@ -387,44 +387,44 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'type' => 'object', 'properties' => array( 'id' => array( - 'description' => __( 'Unique identifier for the resource.', 'woocommerce-admin' ), + 'description' => __( 'Unique identifier for the resource.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'parent_id' => array( - 'description' => __( 'Product parent ID.', 'woocommerce-admin' ), + 'description' => __( 'Product parent ID.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'name' => array( - 'description' => __( 'Product name.', 'woocommerce-admin' ), + 'description' => __( 'Product name.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'sku' => array( - 'description' => __( 'Unique identifier.', 'woocommerce-admin' ), + 'description' => __( 'Unique identifier.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'stock_status' => array( - 'description' => __( 'Stock status.', 'woocommerce-admin' ), + 'description' => __( 'Stock status.', 'woocommerce' ), 'type' => 'string', 'enum' => array_keys( wc_get_product_stock_status_options() ), 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'stock_quantity' => array( - 'description' => __( 'Stock quantity.', 'woocommerce-admin' ), + 'description' => __( 'Stock quantity.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'manage_stock' => array( - 'description' => __( 'Manage stock.', 'woocommerce-admin' ), + 'description' => __( 'Manage stock.', 'woocommerce' ), 'type' => 'boolean', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -444,7 +444,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf $params = array(); $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['page'] = array( - 'description' => __( 'Current page of the collection.', 'woocommerce-admin' ), + 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', @@ -452,7 +452,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'minimum' => 1, ); $params['per_page'] = array( - 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce-admin' ), + 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 10, 'minimum' => 1, @@ -461,7 +461,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'validate_callback' => 'rest_validate_request_arg', ); $params['exclude'] = array( - 'description' => __( 'Ensure result set excludes specific IDs.', 'woocommerce-admin' ), + 'description' => __( 'Ensure result set excludes specific IDs.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -470,7 +470,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'sanitize_callback' => 'wp_parse_id_list', ); $params['include'] = array( - 'description' => __( 'Limit result set to specific ids.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to specific ids.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -479,20 +479,20 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'sanitize_callback' => 'wp_parse_id_list', ); $params['offset'] = array( - 'description' => __( 'Offset the result set by a specific number of items.', 'woocommerce-admin' ), + 'description' => __( 'Offset the result set by a specific number of items.', 'woocommerce' ), 'type' => 'integer', 'sanitize_callback' => 'absint', 'validate_callback' => 'rest_validate_request_arg', ); $params['order'] = array( - 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce-admin' ), + 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ), 'type' => 'string', 'default' => 'asc', 'enum' => array( 'asc', 'desc' ), 'validate_callback' => 'rest_validate_request_arg', ); $params['orderby'] = array( - 'description' => __( 'Sort collection by object attribute.', 'woocommerce-admin' ), + 'description' => __( 'Sort collection by object attribute.', 'woocommerce' ), 'type' => 'string', 'default' => 'stock_status', 'enum' => array( @@ -507,7 +507,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'validate_callback' => 'rest_validate_request_arg', ); $params['parent'] = array( - 'description' => __( 'Limit result set to those of particular parent IDs.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to those of particular parent IDs.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -516,7 +516,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'default' => array(), ); $params['parent_exclude'] = array( - 'description' => __( 'Limit result set to all items except those of a particular parent ID.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to all items except those of a particular parent ID.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -525,7 +525,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'default' => array(), ); $params['type'] = array( - 'description' => __( 'Limit result set to items assigned a stock report type.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items assigned a stock report type.', 'woocommerce' ), 'type' => 'string', 'default' => 'all', 'enum' => array_merge( array( 'all', 'lowstock' ), array_keys( wc_get_product_stock_status_options() ) ), @@ -541,10 +541,10 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf */ public function get_export_columns() { $export_columns = array( - 'title' => __( 'Product / Variation', 'woocommerce-admin' ), - 'sku' => __( 'SKU', 'woocommerce-admin' ), - 'stock_status' => __( 'Status', 'woocommerce-admin' ), - 'stock_quantity' => __( 'Stock', 'woocommerce-admin' ), + 'title' => __( 'Product / Variation', 'woocommerce' ), + 'sku' => __( 'SKU', 'woocommerce' ), + 'stock_status' => __( 'Status', 'woocommerce' ), + 'stock_quantity' => __( 'Stock', 'woocommerce' ), ); /** diff --git a/plugins/woocommerce/src/Admin/API/Reports/Stock/Stats/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Stock/Stats/Controller.php index fb8009138d1..5660318dba9 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Stock/Stats/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Stock/Stats/Controller.php @@ -83,13 +83,13 @@ class Controller extends \WC_REST_Reports_Controller { public function get_item_schema() { $totals = array( 'products' => array( - 'description' => __( 'Number of products.', 'woocommerce-admin' ), + 'description' => __( 'Number of products.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'lowstock' => array( - 'description' => __( 'Number of low stock products.', 'woocommerce-admin' ), + 'description' => __( 'Number of low stock products.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -100,7 +100,7 @@ class Controller extends \WC_REST_Reports_Controller { foreach ( $status_options as $status => $label ) { $totals[ $status ] = array( /* translators: Stock status. Example: "Number of low stock products */ - 'description' => sprintf( __( 'Number of %s products.', 'woocommerce-admin' ), $label ), + 'description' => sprintf( __( 'Number of %s products.', 'woocommerce' ), $label ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -113,7 +113,7 @@ class Controller extends \WC_REST_Reports_Controller { 'type' => 'object', 'properties' => array( 'totals' => array( - 'description' => __( 'Totals data.', 'woocommerce-admin' ), + 'description' => __( 'Totals data.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, diff --git a/plugins/woocommerce/src/Admin/API/Reports/Taxes/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Taxes/Controller.php index 2bafa9de76e..49ec393bdb2 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Taxes/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Taxes/Controller.php @@ -155,61 +155,61 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'type' => 'object', 'properties' => array( 'tax_rate_id' => array( - 'description' => __( 'Tax rate ID.', 'woocommerce-admin' ), + 'description' => __( 'Tax rate ID.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'name' => array( - 'description' => __( 'Tax rate name.', 'woocommerce-admin' ), + 'description' => __( 'Tax rate name.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'tax_rate' => array( - 'description' => __( 'Tax rate.', 'woocommerce-admin' ), + 'description' => __( 'Tax rate.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'country' => array( - 'description' => __( 'Country / Region.', 'woocommerce-admin' ), + 'description' => __( 'Country / Region.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'state' => array( - 'description' => __( 'State.', 'woocommerce-admin' ), + 'description' => __( 'State.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'priority' => array( - 'description' => __( 'Priority.', 'woocommerce-admin' ), + 'description' => __( 'Priority.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'total_tax' => array( - 'description' => __( 'Total tax.', 'woocommerce-admin' ), + 'description' => __( 'Total tax.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'order_tax' => array( - 'description' => __( 'Order tax.', 'woocommerce-admin' ), + 'description' => __( 'Order tax.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'shipping_tax' => array( - 'description' => __( 'Shipping tax.', 'woocommerce-admin' ), + 'description' => __( 'Shipping tax.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'orders_count' => array( - 'description' => __( 'Number of orders.', 'woocommerce-admin' ), + 'description' => __( 'Number of orders.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -229,7 +229,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf $params = array(); $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['page'] = array( - 'description' => __( 'Current page of the collection.', 'woocommerce-admin' ), + 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', @@ -237,7 +237,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'minimum' => 1, ); $params['per_page'] = array( - 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce-admin' ), + 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 10, 'minimum' => 1, @@ -246,26 +246,26 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'validate_callback' => 'rest_validate_request_arg', ); $params['after'] = array( - 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['before'] = array( - 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['order'] = array( - 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce-admin' ), + 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ), 'type' => 'string', 'default' => 'desc', 'enum' => array( 'asc', 'desc' ), 'validate_callback' => 'rest_validate_request_arg', ); $params['orderby'] = array( - 'description' => __( 'Sort collection by object attribute.', 'woocommerce-admin' ), + 'description' => __( 'Sort collection by object attribute.', 'woocommerce' ), 'type' => 'string', 'default' => 'tax_rate_id', 'enum' => array( @@ -281,7 +281,7 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf 'validate_callback' => 'rest_validate_request_arg', ); $params['taxes'] = array( - 'description' => __( 'Limit result set to items assigned one or more tax rates.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items assigned one or more tax rates.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -300,12 +300,12 @@ class Controller extends \WC_REST_Reports_Controller implements ExportableInterf */ public function get_export_columns() { return array( - 'tax_code' => __( 'Tax code', 'woocommerce-admin' ), - 'rate' => __( 'Rate', 'woocommerce-admin' ), - 'total_tax' => __( 'Total tax', 'woocommerce-admin' ), - 'order_tax' => __( 'Order tax', 'woocommerce-admin' ), - 'shipping_tax' => __( 'Shipping tax', 'woocommerce-admin' ), - 'orders_count' => __( 'Orders', 'woocommerce-admin' ), + 'tax_code' => __( 'Tax code', 'woocommerce' ), + 'rate' => __( 'Rate', 'woocommerce' ), + 'total_tax' => __( 'Total tax', 'woocommerce' ), + 'order_tax' => __( 'Order tax', 'woocommerce' ), + 'shipping_tax' => __( 'Shipping tax', 'woocommerce' ), + 'orders_count' => __( 'Orders', 'woocommerce' ), ); } diff --git a/plugins/woocommerce/src/Admin/API/Reports/Taxes/Stats/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Taxes/Stats/Controller.php index eae0eabff62..781f7ccdac7 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Taxes/Stats/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Taxes/Stats/Controller.php @@ -166,7 +166,7 @@ class Controller extends \WC_REST_Reports_Controller { public function get_item_schema() { $data_values = array( 'total_tax' => array( - 'description' => __( 'Total tax.', 'woocommerce-admin' ), + 'description' => __( 'Total tax.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -174,7 +174,7 @@ class Controller extends \WC_REST_Reports_Controller { 'format' => 'currency', ), 'order_tax' => array( - 'description' => __( 'Order tax.', 'woocommerce-admin' ), + 'description' => __( 'Order tax.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -182,7 +182,7 @@ class Controller extends \WC_REST_Reports_Controller { 'format' => 'currency', ), 'shipping_tax' => array( - 'description' => __( 'Shipping tax.', 'woocommerce-admin' ), + 'description' => __( 'Shipping tax.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -190,13 +190,13 @@ class Controller extends \WC_REST_Reports_Controller { 'format' => 'currency', ), 'orders_count' => array( - 'description' => __( 'Number of orders.', 'woocommerce-admin' ), + 'description' => __( 'Number of orders.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'tax_codes' => array( - 'description' => __( 'Amount of tax codes.', 'woocommerce-admin' ), + 'description' => __( 'Amount of tax codes.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -205,7 +205,7 @@ class Controller extends \WC_REST_Reports_Controller { $segments = array( 'segments' => array( - 'description' => __( 'Reports data grouped by segment condition.', 'woocommerce-admin' ), + 'description' => __( 'Reports data grouped by segment condition.', 'woocommerce' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -213,13 +213,13 @@ class Controller extends \WC_REST_Reports_Controller { 'type' => 'object', 'properties' => array( 'segment_id' => array( - 'description' => __( 'Segment identificator.', 'woocommerce-admin' ), + 'description' => __( 'Segment identificator.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'subtotals' => array( - 'description' => __( 'Interval subtotals.', 'woocommerce-admin' ), + 'description' => __( 'Interval subtotals.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -238,14 +238,14 @@ class Controller extends \WC_REST_Reports_Controller { 'type' => 'object', 'properties' => array( 'totals' => array( - 'description' => __( 'Totals data.', 'woocommerce-admin' ), + 'description' => __( 'Totals data.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'properties' => $totals, ), 'intervals' => array( - 'description' => __( 'Reports data grouped by intervals.', 'woocommerce-admin' ), + 'description' => __( 'Reports data grouped by intervals.', 'woocommerce' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -253,38 +253,38 @@ class Controller extends \WC_REST_Reports_Controller { 'type' => 'object', 'properties' => array( 'interval' => array( - 'description' => __( 'Type of interval.', 'woocommerce-admin' ), + 'description' => __( 'Type of interval.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'enum' => array( 'day', 'week', 'month', 'year' ), ), 'date_start' => array( - 'description' => __( "The date the report start, in the site's timezone.", 'woocommerce-admin' ), + 'description' => __( "The date the report start, in the site's timezone.", 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_start_gmt' => array( - 'description' => __( 'The date the report start, as GMT.', 'woocommerce-admin' ), + 'description' => __( 'The date the report start, as GMT.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_end' => array( - 'description' => __( "The date the report end, in the site's timezone.", 'woocommerce-admin' ), + 'description' => __( "The date the report end, in the site's timezone.", 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_end_gmt' => array( - 'description' => __( 'The date the report end, as GMT.', 'woocommerce-admin' ), + 'description' => __( 'The date the report end, as GMT.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'subtotals' => array( - 'description' => __( 'Interval subtotals.', 'woocommerce-admin' ), + 'description' => __( 'Interval subtotals.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -308,7 +308,7 @@ class Controller extends \WC_REST_Reports_Controller { $params = array(); $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['page'] = array( - 'description' => __( 'Current page of the collection.', 'woocommerce-admin' ), + 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', @@ -316,7 +316,7 @@ class Controller extends \WC_REST_Reports_Controller { 'minimum' => 1, ); $params['per_page'] = array( - 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce-admin' ), + 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 10, 'minimum' => 1, @@ -325,26 +325,26 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['after'] = array( - 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['before'] = array( - 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['order'] = array( - 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce-admin' ), + 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ), 'type' => 'string', 'default' => 'desc', 'enum' => array( 'asc', 'desc' ), 'validate_callback' => 'rest_validate_request_arg', ); $params['orderby'] = array( - 'description' => __( 'Sort collection by object attribute.', 'woocommerce-admin' ), + 'description' => __( 'Sort collection by object attribute.', 'woocommerce' ), 'type' => 'string', 'default' => 'date', 'enum' => array( @@ -357,7 +357,7 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['interval'] = array( - 'description' => __( 'Time interval to use for buckets in the returned data.', 'woocommerce-admin' ), + 'description' => __( 'Time interval to use for buckets in the returned data.', 'woocommerce' ), 'type' => 'string', 'default' => 'week', 'enum' => array( @@ -371,7 +371,7 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['taxes'] = array( - 'description' => __( 'Limit result set to all items that have the specified term assigned in the taxes taxonomy.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to all items that have the specified term assigned in the taxes taxonomy.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -380,7 +380,7 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['segmentby'] = array( - 'description' => __( 'Segment the response by additional constraint.', 'woocommerce-admin' ), + 'description' => __( 'Segment the response by additional constraint.', 'woocommerce' ), 'type' => 'string', 'enum' => array( 'tax_rate_id', @@ -388,7 +388,7 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['fields'] = array( - 'description' => __( 'Limit stats fields to the specified items.', 'woocommerce-admin' ), + 'description' => __( 'Limit stats fields to the specified items.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', diff --git a/plugins/woocommerce/src/Admin/API/Reports/Taxes/Stats/DataStore.php b/plugins/woocommerce/src/Admin/API/Reports/Taxes/Stats/DataStore.php index 01fd16f3fbd..48dfeec3420 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Taxes/Stats/DataStore.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Taxes/Stats/DataStore.php @@ -192,7 +192,7 @@ class DataStore extends ReportsDataStore implements DataStoreInterface { ); // WPCS: cache ok, DB call ok, unprepared SQL ok. if ( null === $totals ) { - return new \WP_Error( 'woocommerce_analytics_taxes_stats_result_failed', __( 'Sorry, fetching revenue data failed.', 'woocommerce-admin' ) ); + return new \WP_Error( 'woocommerce_analytics_taxes_stats_result_failed', __( 'Sorry, fetching revenue data failed.', 'woocommerce' ) ); } // @todo remove these assignements when refactoring segmenter classes to use query objects. @@ -226,7 +226,7 @@ class DataStore extends ReportsDataStore implements DataStoreInterface { ); // WPCS: cache ok, DB call ok, unprepared SQL ok. if ( null === $intervals ) { - return new \WP_Error( 'woocommerce_analytics_taxes_stats_result_failed', __( 'Sorry, fetching tax data failed.', 'woocommerce-admin' ) ); + return new \WP_Error( 'woocommerce_analytics_taxes_stats_result_failed', __( 'Sorry, fetching tax data failed.', 'woocommerce' ) ); } $totals = (object) $this->cast_numbers( $totals[0] ); diff --git a/plugins/woocommerce/src/Admin/API/Reports/TimeInterval.php b/plugins/woocommerce/src/Admin/API/Reports/TimeInterval.php index e327747bde7..31d74ae458b 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/TimeInterval.php +++ b/plugins/woocommerce/src/Admin/API/Reports/TimeInterval.php @@ -573,7 +573,7 @@ class TimeInterval { return new \WP_Error( 'rest_invalid_param', /* translators: 1: parameter name */ - sprintf( __( '%1$s is not a numerically indexed array.', 'woocommerce-admin' ), $param ) + sprintf( __( '%1$s is not a numerically indexed array.', 'woocommerce' ), $param ) ); } @@ -585,7 +585,7 @@ class TimeInterval { return new \WP_Error( 'rest_invalid_param', /* translators: %s: parameter name */ - sprintf( __( '%s must contain 2 numbers.', 'woocommerce-admin' ), $param ) + sprintf( __( '%s must contain 2 numbers.', 'woocommerce' ), $param ) ); } @@ -605,7 +605,7 @@ class TimeInterval { return new \WP_Error( 'rest_invalid_param', /* translators: 1: parameter name */ - sprintf( __( '%1$s is not a numerically indexed array.', 'woocommerce-admin' ), $param ) + sprintf( __( '%1$s is not a numerically indexed array.', 'woocommerce' ), $param ) ); } @@ -617,7 +617,7 @@ class TimeInterval { return new \WP_Error( 'rest_invalid_param', /* translators: %s: parameter name */ - sprintf( __( '%s must contain 2 valid dates.', 'woocommerce-admin' ), $param ) + sprintf( __( '%s must contain 2 valid dates.', 'woocommerce' ), $param ) ); } diff --git a/plugins/woocommerce/src/Admin/API/Reports/Variations/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Variations/Controller.php index 8e61c767dea..cca51d4c5e6 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Variations/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Variations/Controller.php @@ -177,80 +177,80 @@ class Controller extends ReportsController implements ExportableInterface { 'type' => 'integer', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product ID.', 'woocommerce-admin' ), + 'description' => __( 'Product ID.', 'woocommerce' ), ), 'variation_id' => array( 'type' => 'integer', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product ID.', 'woocommerce-admin' ), + 'description' => __( 'Product ID.', 'woocommerce' ), ), 'items_sold' => array( 'type' => 'integer', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Number of items sold.', 'woocommerce-admin' ), + 'description' => __( 'Number of items sold.', 'woocommerce' ), ), 'net_revenue' => array( 'type' => 'number', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Total Net sales of all items sold.', 'woocommerce-admin' ), + 'description' => __( 'Total Net sales of all items sold.', 'woocommerce' ), ), 'orders_count' => array( 'type' => 'integer', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Number of orders product appeared in.', 'woocommerce-admin' ), + 'description' => __( 'Number of orders product appeared in.', 'woocommerce' ), ), 'extended_info' => array( 'name' => array( 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product name.', 'woocommerce-admin' ), + 'description' => __( 'Product name.', 'woocommerce' ), ), 'price' => array( 'type' => 'number', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product price.', 'woocommerce-admin' ), + 'description' => __( 'Product price.', 'woocommerce' ), ), 'image' => array( 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product image.', 'woocommerce-admin' ), + 'description' => __( 'Product image.', 'woocommerce' ), ), 'permalink' => array( 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product link.', 'woocommerce-admin' ), + 'description' => __( 'Product link.', 'woocommerce' ), ), 'attributes' => array( 'type' => 'array', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product attributes.', 'woocommerce-admin' ), + 'description' => __( 'Product attributes.', 'woocommerce' ), ), 'stock_status' => array( 'type' => 'string', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product inventory status.', 'woocommerce-admin' ), + 'description' => __( 'Product inventory status.', 'woocommerce' ), ), 'stock_quantity' => array( 'type' => 'integer', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product inventory quantity.', 'woocommerce-admin' ), + 'description' => __( 'Product inventory quantity.', 'woocommerce' ), ), 'low_stock_amount' => array( 'type' => 'integer', 'readonly' => true, 'context' => array( 'view', 'edit' ), - 'description' => __( 'Product inventory threshold for low stock.', 'woocommerce-admin' ), + 'description' => __( 'Product inventory threshold for low stock.', 'woocommerce' ), ), ), ), @@ -268,7 +268,7 @@ class Controller extends ReportsController implements ExportableInterface { $params = array(); $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['page'] = array( - 'description' => __( 'Current page of the collection.', 'woocommerce-admin' ), + 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', @@ -276,7 +276,7 @@ class Controller extends ReportsController implements ExportableInterface { 'minimum' => 1, ); $params['per_page'] = array( - 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce-admin' ), + 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 10, 'minimum' => 1, @@ -285,19 +285,19 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['after'] = array( - 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['before'] = array( - 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['match'] = array( - 'description' => __( 'Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories', 'woocommerce-admin' ), + 'description' => __( 'Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories', 'woocommerce' ), 'type' => 'string', 'default' => 'all', 'enum' => array( @@ -307,14 +307,14 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['order'] = array( - 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce-admin' ), + 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ), 'type' => 'string', 'default' => 'desc', 'enum' => array( 'asc', 'desc' ), 'validate_callback' => 'rest_validate_request_arg', ); $params['orderby'] = array( - 'description' => __( 'Sort collection by object attribute.', 'woocommerce-admin' ), + 'description' => __( 'Sort collection by object attribute.', 'woocommerce' ), 'type' => 'string', 'default' => 'date', 'enum' => array( @@ -327,7 +327,7 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['product_includes'] = array( - 'description' => __( 'Limit result set to items that have the specified parent product(s).', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that have the specified parent product(s).', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -337,7 +337,7 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['product_excludes'] = array( - 'description' => __( 'Limit result set to items that don\'t have the specified parent product(s).', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that don\'t have the specified parent product(s).', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -347,7 +347,7 @@ class Controller extends ReportsController implements ExportableInterface { 'sanitize_callback' => 'wp_parse_id_list', ); $params['variations'] = array( - 'description' => __( 'Limit result to items with specified variation ids.', 'woocommerce-admin' ), + 'description' => __( 'Limit result to items with specified variation ids.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -356,14 +356,14 @@ class Controller extends ReportsController implements ExportableInterface { ), ); $params['extended_info'] = array( - 'description' => __( 'Add additional piece of info about each variation to the report.', 'woocommerce-admin' ), + 'description' => __( 'Add additional piece of info about each variation to the report.', 'woocommerce' ), 'type' => 'boolean', 'default' => false, 'sanitize_callback' => 'wc_string_to_bool', 'validate_callback' => 'rest_validate_request_arg', ); $params['attribute_is'] = array( - 'description' => __( 'Limit result set to variations that include the specified attributes.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to variations that include the specified attributes.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'array', @@ -372,7 +372,7 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['attribute_is_not'] = array( - 'description' => __( 'Limit result set to variations that don\'t include the specified attributes.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to variations that don\'t include the specified attributes.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'array', @@ -381,7 +381,7 @@ class Controller extends ReportsController implements ExportableInterface { 'validate_callback' => 'rest_validate_request_arg', ); $params['category_includes'] = array( - 'description' => __( 'Limit result set to variations in the specified categories.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to variations in the specified categories.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -390,7 +390,7 @@ class Controller extends ReportsController implements ExportableInterface { ), ); $params['category_excludes'] = array( - 'description' => __( 'Limit result set to variations not in the specified categories.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to variations not in the specified categories.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -421,16 +421,16 @@ class Controller extends ReportsController implements ExportableInterface { */ public function get_export_columns() { $export_columns = array( - 'product_name' => __( 'Product / Variation title', 'woocommerce-admin' ), - 'sku' => __( 'SKU', 'woocommerce-admin' ), - 'items_sold' => __( 'Items sold', 'woocommerce-admin' ), - 'net_revenue' => __( 'N. Revenue', 'woocommerce-admin' ), - 'orders_count' => __( 'Orders', 'woocommerce-admin' ), + 'product_name' => __( 'Product / Variation title', 'woocommerce' ), + 'sku' => __( 'SKU', 'woocommerce' ), + 'items_sold' => __( 'Items sold', 'woocommerce' ), + 'net_revenue' => __( 'N. Revenue', 'woocommerce' ), + 'orders_count' => __( 'Orders', 'woocommerce' ), ); if ( 'yes' === get_option( 'woocommerce_manage_stock' ) ) { - $export_columns['stock_status'] = __( 'Status', 'woocommerce-admin' ); - $export_columns['stock'] = __( 'Stock', 'woocommerce-admin' ); + $export_columns['stock_status'] = __( 'Status', 'woocommerce' ); + $export_columns['stock'] = __( 'Stock', 'woocommerce' ); } return $export_columns; diff --git a/plugins/woocommerce/src/Admin/API/Reports/Variations/Stats/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Variations/Stats/Controller.php index 6e79ea184ce..5abfd3a0a71 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Variations/Stats/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Variations/Stats/Controller.php @@ -161,22 +161,22 @@ class Controller extends \WC_REST_Reports_Controller { public function get_item_schema() { $data_values = array( 'items_sold' => array( - 'title' => __( 'Variations Sold', 'woocommerce-admin' ), - 'description' => __( 'Number of variation items sold.', 'woocommerce-admin' ), + 'title' => __( 'Variations Sold', 'woocommerce' ), + 'description' => __( 'Number of variation items sold.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'indicator' => true, ), 'net_revenue' => array( - 'description' => __( 'Net sales.', 'woocommerce-admin' ), + 'description' => __( 'Net sales.', 'woocommerce' ), 'type' => 'number', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'format' => 'currency', ), 'orders_count' => array( - 'description' => __( 'Number of orders.', 'woocommerce-admin' ), + 'description' => __( 'Number of orders.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -185,7 +185,7 @@ class Controller extends \WC_REST_Reports_Controller { $segments = array( 'segments' => array( - 'description' => __( 'Reports data grouped by segment condition.', 'woocommerce-admin' ), + 'description' => __( 'Reports data grouped by segment condition.', 'woocommerce' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -193,20 +193,20 @@ class Controller extends \WC_REST_Reports_Controller { 'type' => 'object', 'properties' => array( 'segment_id' => array( - 'description' => __( 'Segment identificator.', 'woocommerce-admin' ), + 'description' => __( 'Segment identificator.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'segment_label' => array( - 'description' => __( 'Human readable segment label, either product or variation name.', 'woocommerce-admin' ), + 'description' => __( 'Human readable segment label, either product or variation name.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'enum' => array( 'day', 'week', 'month', 'year' ), ), 'subtotals' => array( - 'description' => __( 'Interval subtotals.', 'woocommerce-admin' ), + 'description' => __( 'Interval subtotals.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -225,14 +225,14 @@ class Controller extends \WC_REST_Reports_Controller { 'type' => 'object', 'properties' => array( 'totals' => array( - 'description' => __( 'Totals data.', 'woocommerce-admin' ), + 'description' => __( 'Totals data.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'properties' => $totals, ), 'intervals' => array( - 'description' => __( 'Reports data grouped by intervals.', 'woocommerce-admin' ), + 'description' => __( 'Reports data grouped by intervals.', 'woocommerce' ), 'type' => 'array', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -240,38 +240,38 @@ class Controller extends \WC_REST_Reports_Controller { 'type' => 'object', 'properties' => array( 'interval' => array( - 'description' => __( 'Type of interval.', 'woocommerce-admin' ), + 'description' => __( 'Type of interval.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'enum' => array( 'day', 'week', 'month', 'year' ), ), 'date_start' => array( - 'description' => __( "The date the report start, in the site's timezone.", 'woocommerce-admin' ), + 'description' => __( "The date the report start, in the site's timezone.", 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_start_gmt' => array( - 'description' => __( 'The date the report start, as GMT.', 'woocommerce-admin' ), + 'description' => __( 'The date the report start, as GMT.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_end' => array( - 'description' => __( "The date the report end, in the site's timezone.", 'woocommerce-admin' ), + 'description' => __( "The date the report end, in the site's timezone.", 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'date_end_gmt' => array( - 'description' => __( 'The date the report end, as GMT.', 'woocommerce-admin' ), + 'description' => __( 'The date the report end, as GMT.', 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'subtotals' => array( - 'description' => __( 'Interval subtotals.', 'woocommerce-admin' ), + 'description' => __( 'Interval subtotals.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -316,7 +316,7 @@ class Controller extends \WC_REST_Reports_Controller { $params = array(); $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['page'] = array( - 'description' => __( 'Current page of the collection.', 'woocommerce-admin' ), + 'description' => __( 'Current page of the collection.', 'woocommerce' ), 'type' => 'integer', 'default' => 1, 'sanitize_callback' => 'absint', @@ -324,7 +324,7 @@ class Controller extends \WC_REST_Reports_Controller { 'minimum' => 1, ); $params['per_page'] = array( - 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce-admin' ), + 'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ), 'type' => 'integer', 'default' => 10, 'minimum' => 1, @@ -333,19 +333,19 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['after'] = array( - 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['before'] = array( - 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce-admin' ), + 'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg', ); $params['match'] = array( - 'description' => __( 'Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories', 'woocommerce-admin' ), + 'description' => __( 'Indicates whether all the conditions should be true for the resulting set, or if any one of them is sufficient. Match affects the following parameters: status_is, status_is_not, product_includes, product_excludes, coupon_includes, coupon_excludes, customer, categories', 'woocommerce' ), 'type' => 'string', 'default' => 'all', 'enum' => array( @@ -355,14 +355,14 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['order'] = array( - 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce-admin' ), + 'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ), 'type' => 'string', 'default' => 'desc', 'enum' => array( 'asc', 'desc' ), 'validate_callback' => 'rest_validate_request_arg', ); $params['orderby'] = array( - 'description' => __( 'Sort collection by object attribute.', 'woocommerce-admin' ), + 'description' => __( 'Sort collection by object attribute.', 'woocommerce' ), 'type' => 'string', 'default' => 'date', 'enum' => array( @@ -379,7 +379,7 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['interval'] = array( - 'description' => __( 'Time interval to use for buckets in the returned data.', 'woocommerce-admin' ), + 'description' => __( 'Time interval to use for buckets in the returned data.', 'woocommerce' ), 'type' => 'string', 'default' => 'week', 'enum' => array( @@ -393,7 +393,7 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['category_includes'] = array( - 'description' => __( 'Limit result to items from the specified categories.', 'woocommerce-admin' ), + 'description' => __( 'Limit result to items from the specified categories.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -402,7 +402,7 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['category_excludes'] = array( - 'description' => __( 'Limit result set to variations not in the specified categories.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to variations not in the specified categories.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -411,7 +411,7 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['product_includes'] = array( - 'description' => __( 'Limit result set to items that have the specified parent product(s).', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that have the specified parent product(s).', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -421,7 +421,7 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['product_excludes'] = array( - 'description' => __( 'Limit result set to items that don\'t have the specified parent product(s).', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that don\'t have the specified parent product(s).', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', @@ -431,7 +431,7 @@ class Controller extends \WC_REST_Reports_Controller { 'sanitize_callback' => 'wp_parse_id_list', ); $params['variations'] = array( - 'description' => __( 'Limit result to items with specified variation ids.', 'woocommerce-admin' ), + 'description' => __( 'Limit result to items with specified variation ids.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', @@ -440,7 +440,7 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['segmentby'] = array( - 'description' => __( 'Segment the response by additional constraint.', 'woocommerce-admin' ), + 'description' => __( 'Segment the response by additional constraint.', 'woocommerce' ), 'type' => 'string', 'enum' => array( 'product', @@ -450,7 +450,7 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['fields'] = array( - 'description' => __( 'Limit stats fields to the specified items.', 'woocommerce-admin' ), + 'description' => __( 'Limit stats fields to the specified items.', 'woocommerce' ), 'type' => 'array', 'sanitize_callback' => 'wp_parse_slug_list', 'validate_callback' => 'rest_validate_request_arg', @@ -459,7 +459,7 @@ class Controller extends \WC_REST_Reports_Controller { ), ); $params['attribute_is'] = array( - 'description' => __( 'Limit result set to orders that include products with the specified attributes.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to orders that include products with the specified attributes.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'array', @@ -468,7 +468,7 @@ class Controller extends \WC_REST_Reports_Controller { 'validate_callback' => 'rest_validate_request_arg', ); $params['attribute_is_not'] = array( - 'description' => __( 'Limit result set to orders that don\'t include products with the specified attributes.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to orders that don\'t include products with the specified attributes.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'array', diff --git a/plugins/woocommerce/src/Admin/API/Reports/Variations/Stats/DataStore.php b/plugins/woocommerce/src/Admin/API/Reports/Variations/Stats/DataStore.php index 397bb43f391..5ea01ef6cd8 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Variations/Stats/DataStore.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Variations/Stats/DataStore.php @@ -221,7 +221,7 @@ class DataStore extends VariationsDataStore implements DataStoreInterface { $totals[0]['segments'] = $segmenter->get_totals_segments( $totals_query, $table_name ); if ( null === $totals ) { - return new \WP_Error( 'woocommerce_analytics_variations_stats_result_failed', __( 'Sorry, fetching revenue data failed.', 'woocommerce-admin' ) ); + return new \WP_Error( 'woocommerce_analytics_variations_stats_result_failed', __( 'Sorry, fetching revenue data failed.', 'woocommerce' ) ); } $this->interval_query->add_sql_clause( 'order_by', $this->get_sql_clause( 'order_by' ) ); @@ -239,7 +239,7 @@ class DataStore extends VariationsDataStore implements DataStoreInterface { /* phpcs:enable */ if ( null === $intervals ) { - return new \WP_Error( 'woocommerce_analytics_variations_stats_result_failed', __( 'Sorry, fetching revenue data failed.', 'woocommerce-admin' ) ); + return new \WP_Error( 'woocommerce_analytics_variations_stats_result_failed', __( 'Sorry, fetching revenue data failed.', 'woocommerce' ) ); } $totals = (object) $this->cast_numbers( $totals[0] ); diff --git a/plugins/woocommerce/src/Admin/API/Taxes.php b/plugins/woocommerce/src/Admin/API/Taxes.php index 542386e99f6..756f239b0d4 100644 --- a/plugins/woocommerce/src/Admin/API/Taxes.php +++ b/plugins/woocommerce/src/Admin/API/Taxes.php @@ -32,12 +32,12 @@ class Taxes extends \WC_REST_Taxes_Controller { public function get_collection_params() { $params = parent::get_collection_params(); $params['search'] = array( - 'description' => __( 'Search by similar tax code.', 'woocommerce-admin' ), + 'description' => __( 'Search by similar tax code.', 'woocommerce' ), 'type' => 'string', 'validate_callback' => 'rest_validate_request_arg', ); $params['include'] = array( - 'description' => __( 'Limit result set to items that have the specified rate ID(s) assigned.', 'woocommerce-admin' ), + 'description' => __( 'Limit result set to items that have the specified rate ID(s) assigned.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'integer', diff --git a/plugins/woocommerce/src/Admin/API/Themes.php b/plugins/woocommerce/src/Admin/API/Themes.php index 5afb0e2785a..63b44637162 100644 --- a/plugins/woocommerce/src/Admin/API/Themes.php +++ b/plugins/woocommerce/src/Admin/API/Themes.php @@ -60,7 +60,7 @@ class Themes extends \WC_REST_Data_Controller { */ public function upload_theme_permissions_check( $request ) { if ( ! current_user_can( 'upload_themes' ) ) { - return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you are not allowed to install themes on this site.', 'woocommerce-admin' ), array( 'status' => rest_authorization_required_code() ) ); + return new \WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you are not allowed to install themes on this site.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) ); } return true; @@ -75,7 +75,7 @@ class Themes extends \WC_REST_Data_Controller { public function upload_theme( $request ) { if ( ! isset( $_FILES['pluginzip'] ) || ! isset( $_FILES['pluginzip']['tmp_name'] ) || ! is_uploaded_file( $_FILES['pluginzip']['tmp_name'] ) || ! is_file( $_FILES['pluginzip']['tmp_name'] ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized - return new \WP_Error( 'woocommerce_rest_invalid_file', __( 'Specified file failed upload test.', 'woocommerce-admin' ) ); + return new \WP_Error( 'woocommerce_rest_invalid_file', __( 'Specified file failed upload test.', 'woocommerce' ) ); } include_once ABSPATH . 'wp-admin/includes/file.php'; @@ -163,19 +163,19 @@ class Themes extends \WC_REST_Data_Controller { 'type' => 'object', 'properties' => array( 'status' => array( - 'description' => __( 'Theme installation status.', 'woocommerce-admin' ), + 'description' => __( 'Theme installation status.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'message' => array( - 'description' => __( 'Theme installation message.', 'woocommerce-admin' ), + 'description' => __( 'Theme installation message.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'theme' => array( - 'description' => __( 'Uploaded theme.', 'woocommerce-admin' ), + 'description' => __( 'Uploaded theme.', 'woocommerce' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'readonly' => true, @@ -194,7 +194,7 @@ class Themes extends \WC_REST_Data_Controller { public function get_collection_params() { $params['context'] = $this->get_context_param( array( 'default' => 'view' ) ); $params['pluginzip'] = array( - 'description' => __( 'A zip file of the theme to be uploaded.', 'woocommerce-admin' ), + 'description' => __( 'A zip file of the theme to be uploaded.', 'woocommerce' ), 'type' => 'file', 'validate_callback' => 'rest_validate_request_arg', ); diff --git a/plugins/woocommerce/src/Admin/Features/Features.php b/plugins/woocommerce/src/Admin/Features/Features.php index 4fabbaf2e22..826604176fa 100644 --- a/plugins/woocommerce/src/Admin/Features/Features.php +++ b/plugins/woocommerce/src/Admin/Features/Features.php @@ -261,7 +261,7 @@ class Features { return $sections; } - $sections['features'] = __( 'Features', 'woocommerce-admin' ); + $sections['features'] = __( 'Features', 'woocommerce' ); return $sections; } @@ -288,8 +288,8 @@ class Features { return $settings; } - $desc = __( 'Start using new features that are being progressively rolled out to improve the store management experience.', 'woocommerce-admin' ); - $disabled_desc = __( 'WooCommerce features have been disabled.', 'woocommerce-admin' ); + $desc = __( 'Start using new features that are being progressively rolled out to improve the store management experience.', 'woocommerce' ); + $disabled_desc = __( 'WooCommerce features have been disabled.', 'woocommerce' ); if ( $features_disabled ) { $GLOBALS['hide_save_button'] = true; @@ -298,7 +298,7 @@ class Features { return array_merge( array( array( - 'title' => __( 'Features', 'woocommerce-admin' ), + 'title' => __( 'Features', 'woocommerce' ), 'type' => 'title', 'desc' => $features_disabled ? $disabled_desc : $desc, 'id' => 'features_options', diff --git a/plugins/woocommerce/src/Admin/Features/Navigation/CoreMenu.php b/plugins/woocommerce/src/Admin/Features/Navigation/CoreMenu.php index c40f0be5889..3a82e7e1a05 100644 --- a/plugins/woocommerce/src/Admin/Features/Navigation/CoreMenu.php +++ b/plugins/woocommerce/src/Admin/Features/Navigation/CoreMenu.php @@ -92,43 +92,43 @@ class CoreMenu { $analytics_enabled = Features::is_enabled( 'analytics' ); return array( array( - 'title' => __( 'Orders', 'woocommerce-admin' ), + 'title' => __( 'Orders', 'woocommerce' ), 'id' => 'woocommerce-orders', 'badge' => self::get_shop_order_count(), 'order' => 10, ), array( - 'title' => __( 'Products', 'woocommerce-admin' ), + 'title' => __( 'Products', 'woocommerce' ), 'id' => 'woocommerce-products', 'order' => 20, ), $analytics_enabled ? array( - 'title' => __( 'Analytics', 'woocommerce-admin' ), + 'title' => __( 'Analytics', 'woocommerce' ), 'id' => 'woocommerce-analytics', 'order' => 30, ) : null, $analytics_enabled ? array( - 'title' => __( 'Reports', 'woocommerce-admin' ), + 'title' => __( 'Reports', 'woocommerce' ), 'id' => 'woocommerce-reports', 'parent' => 'woocommerce-analytics', 'order' => 200, ) : null, array( - 'title' => __( 'Marketing', 'woocommerce-admin' ), + 'title' => __( 'Marketing', 'woocommerce' ), 'id' => 'woocommerce-marketing', 'order' => 40, ), array( - 'title' => __( 'Settings', 'woocommerce-admin' ), + 'title' => __( 'Settings', 'woocommerce' ), 'id' => 'woocommerce-settings', 'menuId' => 'secondary', 'order' => 20, 'url' => 'admin.php?page=wc-settings', ), array( - 'title' => __( 'Tools', 'woocommerce-admin' ), + 'title' => __( 'Tools', 'woocommerce' ), 'id' => 'woocommerce-tools', 'menuId' => 'secondary', 'order' => 30, @@ -192,7 +192,7 @@ class CoreMenu { if ( defined( '\Automattic\WooCommerce\Internal\Admin\Homescreen::MENU_SLUG' ) ) { $home_item = array( 'id' => 'woocommerce-home', - 'title' => __( 'Home', 'woocommerce-admin' ), + 'title' => __( 'Home', 'woocommerce' ), 'url' => \Automattic\WooCommerce\Internal\Admin\Homescreen::MENU_SLUG, 'order' => 0, 'matchExpression' => 'page=wc-admin((?!path=).)*$', @@ -203,7 +203,7 @@ class CoreMenu { if ( Features::is_enabled( 'analytics' ) ) { $customers_item = array( 'id' => 'woocommerce-analytics-customers', - 'title' => __( 'Customers', 'woocommerce-admin' ), + 'title' => __( 'Customers', 'woocommerce' ), 'url' => 'wc-admin&path=/customers', 'order' => 50, ); @@ -220,7 +220,7 @@ class CoreMenu { $product_tag_items['default'], array( 'id' => 'woocommerce-product-attributes', - 'title' => __( 'Attributes', 'woocommerce-admin' ), + 'title' => __( 'Attributes', 'woocommerce' ), 'url' => 'edit.php?post_type=product&page=product_attributes', 'capability' => 'manage_product_terms', 'order' => 40, @@ -231,7 +231,7 @@ class CoreMenu { $coupon_items['default'], // Marketplace category. array( - 'title' => __( 'Marketplace', 'woocommerce-admin' ), + 'title' => __( 'Marketplace', 'woocommerce' ), 'capability' => 'manage_woocommerce', 'id' => 'woocommerce-marketplace', 'url' => 'wc-addons', @@ -257,9 +257,9 @@ class CoreMenu { */ public static function get_tool_items() { $tabs = array( - 'status' => __( 'System status', 'woocommerce-admin' ), - 'tools' => __( 'Utilities', 'woocommerce-admin' ), - 'logs' => __( 'Logs', 'woocommerce-admin' ), + 'status' => __( 'System status', 'woocommerce' ), + 'tools' => __( 'Utilities', 'woocommerce' ), + 'logs' => __( 'Logs', 'woocommerce' ), ); $tabs = apply_filters( 'woocommerce_admin_status_tabs', $tabs ); @@ -267,7 +267,7 @@ class CoreMenu { $items = array( array( 'parent' => 'woocommerce-tools', - 'title' => __( 'Import / Export', 'woocommerce-admin' ), + 'title' => __( 'Import / Export', 'woocommerce' ), 'capability' => 'import', 'id' => 'tools-import-export', 'url' => 'import.php', diff --git a/plugins/woocommerce/src/Admin/Features/Navigation/Favorites.php b/plugins/woocommerce/src/Admin/Features/Navigation/Favorites.php index 8be319c964e..8a362099c79 100644 --- a/plugins/woocommerce/src/Admin/Features/Navigation/Favorites.php +++ b/plugins/woocommerce/src/Admin/Features/Navigation/Favorites.php @@ -55,7 +55,7 @@ class Favorites { if ( in_array( $item_id, $all_favorites, true ) ) { return new \WP_Error( 'woocommerce_favorites_already_exists', - __( 'Favorite already exists', 'woocommerce-admin' ) + __( 'Favorite already exists', 'woocommerce' ) ); } @@ -79,7 +79,7 @@ class Favorites { if ( ! in_array( $item_id, $all_favorites, true ) ) { return new \WP_Error( 'woocommerce_favorites_does_not_exist', - __( 'Favorite item not found', 'woocommerce-admin' ) + __( 'Favorite item not found', 'woocommerce' ) ); } diff --git a/plugins/woocommerce/src/Admin/Features/Navigation/Init.php b/plugins/woocommerce/src/Admin/Features/Navigation/Init.php index c152ddbd215..f46a0031676 100644 --- a/plugins/woocommerce/src/Admin/Features/Navigation/Init.php +++ b/plugins/woocommerce/src/Admin/Features/Navigation/Init.php @@ -47,14 +47,14 @@ class Init { public static function add_feature_toggle( $features ) { $description = __( 'Adds the new WooCommerce navigation experience to the dashboard', - 'woocommerce-admin' + 'woocommerce' ); $update_text = ''; $needs_update = version_compare( get_bloginfo( 'version' ), '5.6', '<' ); if ( $needs_update && current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) { $update_text = sprintf( /* translators: 1: line break tag, 2: open link to WordPress update link, 3: close link tag. */ - __( '%1$s %2$sUpdate WordPress to enable the new navigation%3$s', 'woocommerce-admin' ), + __( '%1$s %2$sUpdate WordPress to enable the new navigation%3$s', 'woocommerce' ), '
', '', '' @@ -62,7 +62,7 @@ class Init { } $features[] = array( - 'title' => __( 'Navigation', 'woocommerce-admin' ), + 'title' => __( 'Navigation', 'woocommerce' ), 'desc' => $description . $update_text, 'id' => self::TOGGLE_OPTION_NAME, 'type' => 'checkbox', diff --git a/plugins/woocommerce/src/Admin/Features/Navigation/Menu.php b/plugins/woocommerce/src/Admin/Features/Navigation/Menu.php index cf2a1df06f0..35ef7c80b9d 100644 --- a/plugins/woocommerce/src/Admin/Features/Navigation/Menu.php +++ b/plugins/woocommerce/src/Admin/Features/Navigation/Menu.php @@ -188,7 +188,7 @@ class Menu { $menu_item['parent'] = 'woocommerce'; $menu_item['backButtonLabel'] = __( 'WooCommerce Home', - 'woocommerce-admin' + 'woocommerce' ); } @@ -226,7 +226,7 @@ class Menu { error_log( // phpcs:ignore sprintf( /* translators: 1: Duplicate menu item path. */ - esc_html__( 'You have attempted to register a duplicate item with WooCommerce Navigation: %1$s', 'woocommerce-admin' ), + esc_html__( 'You have attempted to register a duplicate item with WooCommerce Navigation: %1$s', 'woocommerce' ), '`' . $args['id'] . '`' ) ); @@ -371,7 +371,7 @@ class Menu { error_log( // phpcs:ignore sprintf( /* translators: 1: Duplicate menu item path. */ - esc_html__( 'The item ID %1$s attempted to register using an invalid option. The arguments `menuId` and `parent` are not allowed for add_setting_item()', 'woocommerce-admin' ), + esc_html__( 'The item ID %1$s attempted to register using an invalid option. The arguments `menuId` and `parent` are not allowed for add_setting_item()', 'woocommerce' ), '`' . $args['id'] . '`' ) ); diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Task.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Task.php index 09792c07076..f6300aa5ea1 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Task.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Task.php @@ -190,7 +190,7 @@ abstract class Task { * @return string */ public function get_action_label() { - return __( "Let's go", 'woocommerce-admin' ); + return __( "Let's go", 'woocommerce' ); } /** diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php index f2cf197a77d..ddfa282d70e 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php @@ -236,7 +236,7 @@ class TaskList { if ( ! is_subclass_of( $task, 'Automattic\WooCommerce\Admin\Features\OnboardingTasks\Task' ) ) { return new \WP_Error( 'woocommerce_task_list_invalid_task', - __( 'Task is not a subclass of `Task`', 'woocommerce-admin' ) + __( 'Task is not a subclass of `Task`', 'woocommerce' ) ); } if ( array_search( $task, $this->tasks, true ) ) { diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php index fcd4a8ebd6b..436adcff3ff 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php @@ -79,7 +79,7 @@ class TaskLists { self::add_list( array( 'id' => 'setup', - 'title' => __( 'Get ready to start selling', 'woocommerce-admin' ), + 'title' => __( 'Get ready to start selling', 'woocommerce' ), 'tasks' => array( 'StoreDetails', 'Purchase', @@ -100,7 +100,7 @@ class TaskLists { array( 'id' => 'setup_experiment_1', 'hidden_id' => 'setup', - 'title' => __( 'Get ready to start selling', 'woocommerce-admin' ), + 'title' => __( 'Get ready to start selling', 'woocommerce' ), 'tasks' => array( 'StoreDetails', 'Products', @@ -123,7 +123,7 @@ class TaskLists { self::add_list( array( 'id' => 'extended', - 'title' => __( 'Things to do next', 'woocommerce-admin' ), + 'title' => __( 'Things to do next', 'woocommerce' ), 'sort_by' => array( array( 'key' => 'is_complete', @@ -143,7 +143,7 @@ class TaskLists { array( 'id' => 'setup_two_column', 'hidden_id' => 'setup', - 'title' => __( 'Get ready to start selling', 'woocommerce-admin' ), + 'title' => __( 'Get ready to start selling', 'woocommerce' ), 'tasks' => array( 'Products', 'WooCommercePayments', @@ -160,7 +160,7 @@ class TaskLists { array( 'id' => 'extended_two_column', 'hidden_id' => 'extended', - 'title' => __( 'Things to do next', 'woocommerce-admin' ), + 'title' => __( 'Things to do next', 'woocommerce' ), 'sort_by' => array( array( 'key' => 'is_complete', @@ -227,7 +227,7 @@ class TaskLists { if ( isset( self::$lists[ $args['id'] ] ) ) { return new \WP_Error( 'woocommerce_task_list_exists', - __( 'Task list ID already exists', 'woocommerce-admin' ) + __( 'Task list ID already exists', 'woocommerce' ) ); } @@ -246,7 +246,7 @@ class TaskLists { if ( ! isset( self::$lists[ $list_id ] ) ) { return new \WP_Error( 'woocommerce_task_list_invalid_list', - __( 'Task list ID does not exist', 'woocommerce-admin' ) + __( 'Task list ID does not exist', 'woocommerce' ) ); } diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/AdditionalPayments.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/AdditionalPayments.php index 9ca3e1bf365..6277a0acd55 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/AdditionalPayments.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/AdditionalPayments.php @@ -27,7 +27,7 @@ class AdditionalPayments extends Payments { * @return string */ public function get_title() { - return __( 'Set up additional payment providers', 'woocommerce-admin' ); + return __( 'Set up additional payment providers', 'woocommerce' ); } /** @@ -38,7 +38,7 @@ class AdditionalPayments extends Payments { public function get_content() { return __( 'Choose payment providers and enable payment methods at checkout.', - 'woocommerce-admin' + 'woocommerce' ); } @@ -48,7 +48,7 @@ class AdditionalPayments extends Payments { * @return string */ public function get_time() { - return __( '2 minutes', 'woocommerce-admin' ); + return __( '2 minutes', 'woocommerce' ); } /** diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Appearance.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Appearance.php index 5e4b4dee962..21db5d4aa30 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Appearance.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Appearance.php @@ -41,11 +41,11 @@ class Appearance extends Task { public function get_title() { if ( true === $this->get_parent_option( 'use_completed_title' ) ) { if ( $this->is_complete() ) { - return __( 'You personalized your store', 'woocommerce-admin' ); + return __( 'You personalized your store', 'woocommerce' ); } - return __( 'Personalize your store', 'woocommerce-admin' ); + return __( 'Personalize your store', 'woocommerce' ); } - return __( 'Personalize my store', 'woocommerce-admin' ); + return __( 'Personalize my store', 'woocommerce' ); } /** @@ -56,7 +56,7 @@ class Appearance extends Task { public function get_content() { return __( 'Add your logo, create a homepage, and start designing your store.', - 'woocommerce-admin' + 'woocommerce' ); } @@ -66,7 +66,7 @@ class Appearance extends Task { * @return string */ public function get_time() { - return __( '2 minutes', 'woocommerce-admin' ); + return __( '2 minutes', 'woocommerce' ); } /** diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Marketing.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Marketing.php index ce1708d4b87..59dc41f51c0 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Marketing.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Marketing.php @@ -27,11 +27,11 @@ class Marketing extends Task { public function get_title() { if ( true === $this->get_parent_option( 'use_completed_title' ) ) { if ( $this->is_complete() ) { - return __( 'You added sales channels', 'woocommerce-admin' ); + return __( 'You added sales channels', 'woocommerce' ); } - return __( 'Get more sales', 'woocommerce-admin' ); + return __( 'Get more sales', 'woocommerce' ); } - return __( 'Set up marketing tools', 'woocommerce-admin' ); + return __( 'Set up marketing tools', 'woocommerce' ); } /** @@ -42,7 +42,7 @@ class Marketing extends Task { public function get_content() { return __( 'Add recommended marketing tools to reach new customers and grow your business', - 'woocommerce-admin' + 'woocommerce' ); } @@ -52,7 +52,7 @@ class Marketing extends Task { * @return string */ public function get_time() { - return __( '1 minute', 'woocommerce-admin' ); + return __( '1 minute', 'woocommerce' ); } /** diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Payments.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Payments.php index 3c0591185ae..9d7029f74f0 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Payments.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Payments.php @@ -27,11 +27,11 @@ class Payments extends Task { public function get_title() { if ( true === $this->get_parent_option( 'use_completed_title' ) ) { if ( $this->is_complete() ) { - return __( 'You set up payments', 'woocommerce-admin' ); + return __( 'You set up payments', 'woocommerce' ); } - return __( 'Set up payments', 'woocommerce-admin' ); + return __( 'Set up payments', 'woocommerce' ); } - return __( 'Set up payments', 'woocommerce-admin' ); + return __( 'Set up payments', 'woocommerce' ); } /** @@ -42,7 +42,7 @@ class Payments extends Task { public function get_content() { return __( 'Choose payment providers and enable payment methods at checkout.', - 'woocommerce-admin' + 'woocommerce' ); } @@ -52,7 +52,7 @@ class Payments extends Task { * @return string */ public function get_time() { - return __( '2 minutes', 'woocommerce-admin' ); + return __( '2 minutes', 'woocommerce' ); } /** diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Products.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Products.php index a3d39d8e44c..f632fa01ce0 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Products.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Products.php @@ -38,11 +38,11 @@ class Products extends Task { public function get_title() { if ( true === $this->get_parent_option( 'use_completed_title' ) ) { if ( $this->is_complete() ) { - return __( 'You added products', 'woocommerce-admin' ); + return __( 'You added products', 'woocommerce' ); } - return __( 'Add products', 'woocommerce-admin' ); + return __( 'Add products', 'woocommerce' ); } - return __( 'Add my products', 'woocommerce-admin' ); + return __( 'Add my products', 'woocommerce' ); } /** @@ -53,7 +53,7 @@ class Products extends Task { public function get_content() { return __( 'Start by adding the first product to your store. You can add your products manually, via CSV, or import them from another service.', - 'woocommerce-admin' + 'woocommerce' ); } @@ -63,7 +63,7 @@ class Products extends Task { * @return string */ public function get_time() { - return __( '1 minute per product', 'woocommerce-admin' ); + return __( '1 minute per product', 'woocommerce' ); } /** diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Purchase.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Purchase.php index 479bc75d2a9..76cec6142dd 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Purchase.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Purchase.php @@ -61,13 +61,13 @@ class Purchase extends Task { /* translators: %1$s: list of product names comma separated, %2%s the last product name */ __( 'Add %s to my store', - 'woocommerce-admin' + 'woocommerce' ), $products['remaining'][0] ) : __( 'Add paid extensions to my store', - 'woocommerce-admin' + 'woocommerce' ); } @@ -86,7 +86,7 @@ class Purchase extends Task { /* translators: %1$s: list of product names comma separated, %2%s the last product name */ __( 'Good choice! You chose to add %1$s and %2$s to your store.', - 'woocommerce-admin' + 'woocommerce' ), implode( ', ', array_slice( $products['remaining'], 0, -1 ) ) . ( count( $products['remaining'] ) > 2 ? ',' : '' ), end( $products['remaining'] ) @@ -99,7 +99,7 @@ class Purchase extends Task { * @return string */ public function get_action_label() { - return __( 'Purchase & install now', 'woocommerce-admin' ); + return __( 'Purchase & install now', 'woocommerce' ); } @@ -109,7 +109,7 @@ class Purchase extends Task { * @return string */ public function get_time() { - return __( '2 minutes', 'woocommerce-admin' ); + return __( '2 minutes', 'woocommerce' ); } /** diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Shipping.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Shipping.php index 19a7230e66a..1a3adb553a6 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Shipping.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Shipping.php @@ -26,11 +26,11 @@ class Shipping extends Task { public function get_title() { if ( true === $this->get_parent_option( 'use_completed_title' ) ) { if ( $this->is_complete() ) { - return __( 'You added shipping costs', 'woocommerce-admin' ); + return __( 'You added shipping costs', 'woocommerce' ); } - return __( 'Add shipping costs', 'woocommerce-admin' ); + return __( 'Add shipping costs', 'woocommerce' ); } - return __( 'Set up shipping', 'woocommerce-admin' ); + return __( 'Set up shipping', 'woocommerce' ); } /** @@ -41,7 +41,7 @@ class Shipping extends Task { public function get_content() { return __( "Set your store location and where you'll ship to.", - 'woocommerce-admin' + 'woocommerce' ); } @@ -51,7 +51,7 @@ class Shipping extends Task { * @return string */ public function get_time() { - return __( '1 minute', 'woocommerce-admin' ); + return __( '1 minute', 'woocommerce' ); } /** diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/StoreDetails.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/StoreDetails.php index 8d73fc1d51e..8c3b8a162d9 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/StoreDetails.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/StoreDetails.php @@ -26,11 +26,11 @@ class StoreDetails extends Task { public function get_title() { if ( true === $this->get_parent_option( 'use_completed_title' ) ) { if ( $this->is_complete() ) { - return __( 'You added store details', 'woocommerce-admin' ); + return __( 'You added store details', 'woocommerce' ); } - return __( 'Add store details', 'woocommerce-admin' ); + return __( 'Add store details', 'woocommerce' ); } - return __( 'Store details', 'woocommerce-admin' ); + return __( 'Store details', 'woocommerce' ); } /** @@ -41,7 +41,7 @@ class StoreDetails extends Task { public function get_content() { return __( 'Your store address is required to set the origin country for shipping, currencies, and payment options.', - 'woocommerce-admin' + 'woocommerce' ); } @@ -51,7 +51,7 @@ class StoreDetails extends Task { * @return string */ public function get_time() { - return __( '4 minutes', 'woocommerce-admin' ); + return __( '4 minutes', 'woocommerce' ); } /** diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Tax.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Tax.php index 8a2e7dd8de5..2f23894023f 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Tax.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Tax.php @@ -67,11 +67,11 @@ class Tax extends Task { public function get_title() { if ( true === $this->get_parent_option( 'use_completed_title' ) ) { if ( $this->is_complete() ) { - return __( 'You added tax rates', 'woocommerce-admin' ); + return __( 'You added tax rates', 'woocommerce' ); } - return __( 'Add tax rates', 'woocommerce-admin' ); + return __( 'Add tax rates', 'woocommerce' ); } - return __( 'Set up tax', 'woocommerce-admin' ); + return __( 'Set up tax', 'woocommerce' ); } /** @@ -83,11 +83,11 @@ class Tax extends Task { return self::can_use_automated_taxes() ? __( 'Good news! WooCommerce Services and Jetpack can automate your sales tax calculations for you.', - 'woocommerce-admin' + 'woocommerce' ) : __( 'Set your store location and configure tax rate settings.', - 'woocommerce-admin' + 'woocommerce' ); } @@ -97,7 +97,7 @@ class Tax extends Task { * @return string */ public function get_time() { - return __( '1 minute', 'woocommerce-admin' ); + return __( '1 minute', 'woocommerce' ); } /** @@ -107,8 +107,8 @@ class Tax extends Task { */ public function get_action_label() { return self::can_use_automated_taxes() - ? __( 'Yes please', 'woocommerce-admin' ) - : __( "Let's go", 'woocommerce-admin' ); + ? __( 'Yes please', 'woocommerce' ) + : __( "Let's go", 'woocommerce' ); } /** diff --git a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/WooCommercePayments.php b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/WooCommercePayments.php index b17aba2afe3..55b30784880 100644 --- a/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/WooCommercePayments.php +++ b/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/WooCommercePayments.php @@ -34,7 +34,7 @@ class WooCommercePayments extends Task { * @return string */ public function get_title() { - return __( 'Get paid with WooCommerce Payments', 'woocommerce-admin' ); + return __( 'Get paid with WooCommerce Payments', 'woocommerce' ); } /** @@ -45,7 +45,7 @@ class WooCommercePayments extends Task { public function get_content() { return __( "You're only one step away from getting paid. Verify your business details to start managing transactions with WooCommerce Payments.", - 'woocommerce-admin' + 'woocommerce' ); } @@ -55,7 +55,7 @@ class WooCommercePayments extends Task { * @return string */ public function get_time() { - return __( '2 minutes', 'woocommerce-admin' ); + return __( '2 minutes', 'woocommerce' ); } /** @@ -64,7 +64,7 @@ class WooCommercePayments extends Task { * @return string */ public function get_action_label() { - return __( 'Finish setup', 'woocommerce-admin' ); + return __( 'Finish setup', 'woocommerce' ); } /** @@ -75,7 +75,7 @@ class WooCommercePayments extends Task { public function get_additional_info() { return __( 'By setting up, you are agreeing to the Terms of Service', - 'woocommerce-admin' + 'woocommerce' ); } diff --git a/plugins/woocommerce/src/Admin/Features/PaymentGatewaySuggestions/DefaultPaymentGateways.php b/plugins/woocommerce/src/Admin/Features/PaymentGatewaySuggestions/DefaultPaymentGateways.php index b0ebf5dab29..1b1a76e74e2 100644 --- a/plugins/woocommerce/src/Admin/Features/PaymentGatewaySuggestions/DefaultPaymentGateways.php +++ b/plugins/woocommerce/src/Admin/Features/PaymentGatewaySuggestions/DefaultPaymentGateways.php @@ -23,8 +23,8 @@ class DefaultPaymentGateways { return array( array( 'id' => 'payfast', - 'title' => __( 'PayFast', 'woocommerce-admin' ), - 'content' => __( 'The PayFast extension for WooCommerce enables you to accept payments by Credit Card and EFT via one of South Africa’s most popular payment gateways. No setup fees or monthly subscription costs. Selecting this extension will configure your store to use South African rands as the selected currency.', 'woocommerce-admin' ), + 'title' => __( 'PayFast', 'woocommerce' ), + 'content' => __( 'The PayFast extension for WooCommerce enables you to accept payments by Credit Card and EFT via one of South Africa’s most popular payment gateways. No setup fees or monthly subscription costs. Selecting this extension will configure your store to use South African rands as the selected currency.', 'woocommerce' ), 'image' => WC()->plugin_url() . '/assets/images/payfast.png', 'plugins' => array( 'woocommerce-payfast-gateway' ), 'is_visible' => array( @@ -38,8 +38,8 @@ class DefaultPaymentGateways { ), array( 'id' => 'stripe', - 'title' => __( ' Stripe', 'woocommerce-admin' ), - 'content' => __( 'Accept debit and credit cards in 135+ currencies, methods such as Alipay, and one-touch checkout with Apple Pay.', 'woocommerce-admin' ), + 'title' => __( ' Stripe', 'woocommerce' ), + 'content' => __( 'Accept debit and credit cards in 135+ currencies, methods such as Alipay, and one-touch checkout with Apple Pay.', 'woocommerce' ), 'image' => WC()->plugin_url() . '/assets/images/stripe.png', 'plugins' => array( 'woocommerce-gateway-stripe' ), 'is_visible' => array( @@ -94,8 +94,8 @@ class DefaultPaymentGateways { ), array( 'id' => 'paystack', - 'title' => __( 'Paystack', 'woocommerce-admin' ), - 'content' => __( 'Paystack helps African merchants accept one-time and recurring payments online with a modern, safe, and secure payment gateway.', 'woocommerce-admin' ), + 'title' => __( 'Paystack', 'woocommerce' ), + 'content' => __( 'Paystack helps African merchants accept one-time and recurring payments online with a modern, safe, and secure payment gateway.', 'woocommerce' ), 'image' => WC_ADMIN_IMAGES_FOLDER_URL . '/onboarding/paystack.png', 'plugins' => array( 'woo-paystack' ), 'is_visible' => array( @@ -105,8 +105,8 @@ class DefaultPaymentGateways { ), array( 'id' => 'kco', - 'title' => __( 'Klarna Checkout', 'woocommerce-admin' ), - 'content' => __( 'Choose the payment that you want, pay now, pay later or slice it. No credit card numbers, no passwords, no worries.', 'woocommerce-admin' ), + 'title' => __( 'Klarna Checkout', 'woocommerce' ), + 'content' => __( 'Choose the payment that you want, pay now, pay later or slice it. No credit card numbers, no passwords, no worries.', 'woocommerce' ), 'image' => WC()->plugin_url() . '/assets/images/klarna-black.png', 'plugins' => array( 'klarna-checkout-for-woocommerce' ), 'is_visible' => array( @@ -116,8 +116,8 @@ class DefaultPaymentGateways { ), array( 'id' => 'klarna_payments', - 'title' => __( 'Klarna Payments', 'woocommerce-admin' ), - 'content' => __( 'Choose the payment that you want, pay now, pay later or slice it. No credit card numbers, no passwords, no worries.', 'woocommerce-admin' ), + 'title' => __( 'Klarna Payments', 'woocommerce' ), + 'content' => __( 'Choose the payment that you want, pay now, pay later or slice it. No credit card numbers, no passwords, no worries.', 'woocommerce' ), 'image' => WC()->plugin_url() . '/assets/images/klarna-black.png', 'plugins' => array( 'klarna-payments-for-woocommerce' ), 'is_visible' => array( @@ -141,8 +141,8 @@ class DefaultPaymentGateways { ), array( 'id' => 'mollie_wc_gateway_banktransfer', - 'title' => __( 'Mollie', 'woocommerce-admin' ), - 'content' => __( 'Effortless payments by Mollie: Offer global and local payment methods, get onboarded in minutes, and supported in your language.', 'woocommerce-admin' ), + 'title' => __( 'Mollie', 'woocommerce' ), + 'content' => __( 'Effortless payments by Mollie: Offer global and local payment methods, get onboarded in minutes, and supported in your language.', 'woocommerce' ), 'image' => WC_ADMIN_IMAGES_FOLDER_URL . '/onboarding/mollie.svg', 'plugins' => array( 'mollie-payments-for-woocommerce' ), 'is_visible' => array( @@ -165,8 +165,8 @@ class DefaultPaymentGateways { ), array( 'id' => 'woo-mercado-pago-custom', - 'title' => __( 'Mercado Pago Checkout Pro & Custom', 'woocommerce-admin' ), - 'content' => __( 'Accept credit and debit cards, offline (cash or bank transfer) and logged-in payments with money in Mercado Pago. Safe and secure payments with the leading payment processor in LATAM.', 'woocommerce-admin' ), + 'title' => __( 'Mercado Pago Checkout Pro & Custom', 'woocommerce' ), + 'content' => __( 'Accept credit and debit cards, offline (cash or bank transfer) and logged-in payments with money in Mercado Pago. Safe and secure payments with the leading payment processor in LATAM.', 'woocommerce' ), 'image' => WC_ADMIN_IMAGES_FOLDER_URL . '/onboarding/mercadopago.png', 'plugins' => array( 'woocommerce-mercadopago' ), 'is_visible' => array( @@ -177,8 +177,8 @@ class DefaultPaymentGateways { ), array( 'id' => 'ppcp-gateway', - 'title' => __( 'PayPal Payments', 'woocommerce-admin' ), - 'content' => __( "Safe and secure payments using credit cards or your customer's PayPal account.", 'woocommerce-admin' ), + 'title' => __( 'PayPal Payments', 'woocommerce' ), + 'content' => __( "Safe and secure payments using credit cards or your customer's PayPal account.", 'woocommerce' ), 'image' => WC()->plugin_url() . '/assets/images/paypal.png', 'plugins' => array( 'woocommerce-paypal-payments' ), 'is_visible' => array( @@ -192,8 +192,8 @@ class DefaultPaymentGateways { ), array( 'id' => 'cod', - 'title' => __( 'Cash on delivery', 'woocommerce-admin' ), - 'content' => __( 'Take payments in cash upon delivery.', 'woocommerce-admin' ), + 'title' => __( 'Cash on delivery', 'woocommerce' ), + 'content' => __( 'Take payments in cash upon delivery.', 'woocommerce' ), 'image' => WC_ADMIN_IMAGES_FOLDER_URL . '/onboarding/cod.svg', 'is_visible' => array( self::get_rules_for_cbd( false ), @@ -201,8 +201,8 @@ class DefaultPaymentGateways { ), array( 'id' => 'bacs', - 'title' => __( 'Direct bank transfer', 'woocommerce-admin' ), - 'content' => __( 'Take payments via bank transfer.', 'woocommerce-admin' ), + 'title' => __( 'Direct bank transfer', 'woocommerce' ), + 'content' => __( 'Take payments via bank transfer.', 'woocommerce' ), 'image' => WC_ADMIN_IMAGES_FOLDER_URL . '/onboarding/bacs.svg', 'is_visible' => array( self::get_rules_for_cbd( false ), @@ -210,10 +210,10 @@ class DefaultPaymentGateways { ), array( 'id' => 'woocommerce_payments', - 'title' => __( 'WooCommerce Payments', 'woocommerce-admin' ), + 'title' => __( 'WooCommerce Payments', 'woocommerce' ), 'content' => __( 'Manage transactions without leaving your WordPress Dashboard. Only with WooCommerce Payments.', - 'woocommerce-admin' + 'woocommerce' ), 'image' => WC_ADMIN_IMAGES_FOLDER_URL . '/onboarding/wcpay.svg', 'plugins' => array( 'woocommerce-payments' ), @@ -252,10 +252,10 @@ class DefaultPaymentGateways { ), array( 'id' => 'woocommerce_payments:non-us', - 'title' => __( 'WooCommerce Payments', 'woocommerce-admin' ), + 'title' => __( 'WooCommerce Payments', 'woocommerce' ), 'content' => __( 'Manage transactions without leaving your WordPress Dashboard. Only with WooCommerce Payments.', - 'woocommerce-admin' + 'woocommerce' ), 'image' => WC_ADMIN_IMAGES_FOLDER_URL . '/onboarding/wcpay.svg', 'plugins' => array( 'woocommerce-payments' ), @@ -286,10 +286,10 @@ class DefaultPaymentGateways { ), array( 'id' => 'woocommerce_payments:us', - 'title' => __( 'WooCommerce Payments', 'woocommerce-admin' ), + 'title' => __( 'WooCommerce Payments', 'woocommerce' ), 'content' => __( 'Manage transactions without leaving your WordPress Dashboard. Only with WooCommerce Payments.', - 'woocommerce-admin' + 'woocommerce' ), 'image' => WC_ADMIN_IMAGES_FOLDER_URL . '/onboarding/wcpay.svg', 'plugins' => array( 'woocommerce-payments' ), @@ -320,8 +320,8 @@ class DefaultPaymentGateways { ), array( 'id' => 'razorpay', - 'title' => __( 'Razorpay', 'woocommerce-admin' ), - 'content' => __( 'The official Razorpay extension for WooCommerce allows you to accept credit cards, debit cards, netbanking, wallet, and UPI payments.', 'woocommerce-admin' ), + 'title' => __( 'Razorpay', 'woocommerce' ), + 'content' => __( 'The official Razorpay extension for WooCommerce allows you to accept credit cards, debit cards, netbanking, wallet, and UPI payments.', 'woocommerce' ), 'image' => WC_ADMIN_IMAGES_FOLDER_URL . '/onboarding/razorpay.svg', 'plugins' => array( 'woo-razorpay' ), 'is_visible' => array( @@ -335,8 +335,8 @@ class DefaultPaymentGateways { ), array( 'id' => 'payubiz', - 'title' => __( 'PayU for WooCommerce', 'woocommerce-admin' ), - 'content' => __( 'Enable PayU’s exclusive plugin for WooCommerce to start accepting payments in 100+ payment methods available in India including credit cards, debit cards, UPI, & more!', 'woocommerce-admin' ), + 'title' => __( 'PayU for WooCommerce', 'woocommerce' ), + 'content' => __( 'Enable PayU’s exclusive plugin for WooCommerce to start accepting payments in 100+ payment methods available in India including credit cards, debit cards, UPI, & more!', 'woocommerce' ), 'image' => WC_ADMIN_IMAGES_FOLDER_URL . '/onboarding/payu.svg', 'plugins' => array( 'payu-india' ), 'is_visible' => array( @@ -350,8 +350,8 @@ class DefaultPaymentGateways { ), array( 'id' => 'eway', - 'title' => __( 'Eway', 'woocommerce-admin' ), - 'content' => __( 'The Eway extension for WooCommerce allows you to take credit card payments directly on your store without redirecting your customers to a third party site to make payment.', 'woocommerce-admin' ), + 'title' => __( 'Eway', 'woocommerce' ), + 'content' => __( 'The Eway extension for WooCommerce allows you to take credit card payments directly on your store without redirecting your customers to a third party site to make payment.', 'woocommerce' ), 'image' => WC_ADMIN_IMAGES_FOLDER_URL . '/onboarding/eway.png', 'plugins' => array( 'woocommerce-gateway-eway' ), 'is_visible' => array( @@ -361,8 +361,8 @@ class DefaultPaymentGateways { ), array( 'id' => 'square_credit_card', - 'title' => __( 'Square', 'woocommerce-admin' ), - 'content' => __( 'Securely accept credit and debit cards with one low rate, no surprise fees (custom rates available). Sell online and in store and track sales and inventory in one place.', 'woocommerce-admin' ), + 'title' => __( 'Square', 'woocommerce' ), + 'content' => __( 'Securely accept credit and debit cards with one low rate, no surprise fees (custom rates available). Sell online and in store and track sales and inventory in one place.', 'woocommerce' ), 'image' => WC()->plugin_url() . '/assets/images/square-black.png', 'plugins' => array( 'woocommerce-square' ), 'is_visible' => array( diff --git a/plugins/woocommerce/src/Admin/Features/PaymentGatewaySuggestions/PaymentGatewaysController.php b/plugins/woocommerce/src/Admin/Features/PaymentGatewaySuggestions/PaymentGatewaysController.php index 25a91a55074..6dedede0469 100644 --- a/plugins/woocommerce/src/Admin/Features/PaymentGatewaySuggestions/PaymentGatewaysController.php +++ b/plugins/woocommerce/src/Admin/Features/PaymentGatewaySuggestions/PaymentGatewaysController.php @@ -130,7 +130,7 @@ class PaymentGatewaysController { 'status' => 'success', 'content' => sprintf( /* translators: the title of the payment gateway */ - __( '%s connected successfully', 'woocommerce-admin' ), + __( '%s connected successfully', 'woocommerce' ), $payment_gateway->method_title ), ) diff --git a/plugins/woocommerce/src/Admin/Notes/DataStore.php b/plugins/woocommerce/src/Admin/Notes/DataStore.php index 60311bf71cb..0a7abdf954b 100644 --- a/plugins/woocommerce/src/Admin/Notes/DataStore.php +++ b/plugins/woocommerce/src/Admin/Notes/DataStore.php @@ -121,7 +121,7 @@ class DataStore extends \WC_Data_Store_WP implements \WC_Object_Data_Store_Inter */ do_action( 'woocommerce_note_loaded', $note ); } else { - throw new \Exception( __( 'Invalid admin note', 'woocommerce-admin' ) ); + throw new \Exception( __( 'Invalid admin note', 'woocommerce' ) ); } } diff --git a/plugins/woocommerce/src/Admin/Notes/Note.php b/plugins/woocommerce/src/Admin/Notes/Note.php index a6c19679c13..2d70bf2cb4b 100644 --- a/plugins/woocommerce/src/Admin/Notes/Note.php +++ b/plugins/woocommerce/src/Admin/Notes/Note.php @@ -374,7 +374,7 @@ class Note extends \WC_Data { public function set_name( $name ) { // Don't allow empty names. if ( empty( $name ) ) { - $this->error( 'admin_note_invalid_data', __( 'The admin note name prop cannot be empty.', 'woocommerce-admin' ) ); + $this->error( 'admin_note_invalid_data', __( 'The admin note name prop cannot be empty.', 'woocommerce' ) ); } $this->set_prop( 'name', $name ); @@ -387,7 +387,7 @@ class Note extends \WC_Data { */ public function set_type( $type ) { if ( empty( $type ) ) { - $this->error( 'admin_note_invalid_data', __( 'The admin note type prop cannot be empty.', 'woocommerce-admin' ) ); + $this->error( 'admin_note_invalid_data', __( 'The admin note type prop cannot be empty.', 'woocommerce' ) ); } if ( ! in_array( $type, self::get_allowed_types(), true ) ) { @@ -395,7 +395,7 @@ class Note extends \WC_Data { 'admin_note_invalid_data', sprintf( /* translators: %s: admin note type. */ - __( 'The admin note type prop (%s) is not one of the supported types.', 'woocommerce-admin' ), + __( 'The admin note type prop (%s) is not one of the supported types.', 'woocommerce' ), $type ) ); @@ -411,7 +411,7 @@ class Note extends \WC_Data { */ public function set_locale( $locale ) { if ( empty( $locale ) ) { - $this->error( 'admin_note_invalid_data', __( 'The admin note locale prop cannot be empty.', 'woocommerce-admin' ) ); + $this->error( 'admin_note_invalid_data', __( 'The admin note locale prop cannot be empty.', 'woocommerce' ) ); } $this->set_prop( 'locale', $locale ); @@ -424,7 +424,7 @@ class Note extends \WC_Data { */ public function set_title( $title ) { if ( empty( $title ) ) { - $this->error( 'admin_note_invalid_data', __( 'The admin note title prop cannot be empty.', 'woocommerce-admin' ) ); + $this->error( 'admin_note_invalid_data', __( 'The admin note title prop cannot be empty.', 'woocommerce' ) ); } $this->set_prop( 'title', $title ); @@ -464,7 +464,7 @@ class Note extends \WC_Data { $content = wp_kses( $content, $allowed_html ); if ( empty( $content ) ) { - $this->error( 'admin_note_invalid_data', __( 'The admin note content prop cannot be empty.', 'woocommerce-admin' ) ); + $this->error( 'admin_note_invalid_data', __( 'The admin note content prop cannot be empty.', 'woocommerce' ) ); } $this->set_prop( 'content', $content ); @@ -481,7 +481,7 @@ class Note extends \WC_Data { // Make sure $content_data is stdClass Object or an array. if ( ! ( $content_data instanceof \stdClass ) ) { - $this->error( 'admin_note_invalid_data', __( 'The admin note content_data prop must be an instance of stdClass.', 'woocommerce-admin' ) ); + $this->error( 'admin_note_invalid_data', __( 'The admin note content_data prop must be an instance of stdClass.', 'woocommerce' ) ); } $this->set_prop( 'content_data', $content_data ); @@ -494,7 +494,7 @@ class Note extends \WC_Data { */ public function set_status( $status ) { if ( empty( $status ) ) { - $this->error( 'admin_note_invalid_data', __( 'The admin note status prop cannot be empty.', 'woocommerce-admin' ) ); + $this->error( 'admin_note_invalid_data', __( 'The admin note status prop cannot be empty.', 'woocommerce' ) ); } if ( ! in_array( $status, self::get_allowed_statuses(), true ) ) { @@ -502,7 +502,7 @@ class Note extends \WC_Data { 'admin_note_invalid_data', sprintf( /* translators: %s: admin note status property. */ - __( 'The admin note status prop (%s) is not one of the supported statuses.', 'woocommerce-admin' ), + __( 'The admin note status prop (%s) is not one of the supported statuses.', 'woocommerce' ), $status ) ); @@ -518,7 +518,7 @@ class Note extends \WC_Data { */ public function set_source( $source ) { if ( empty( $source ) ) { - $this->error( 'admin_note_invalid_data', __( 'The admin note source prop cannot be empty.', 'woocommerce-admin' ) ); + $this->error( 'admin_note_invalid_data', __( 'The admin note source prop cannot be empty.', 'woocommerce' ) ); } $this->set_prop( 'source', $source ); @@ -531,7 +531,7 @@ class Note extends \WC_Data { */ public function set_date_created( $date ) { if ( empty( $date ) ) { - $this->error( 'admin_note_invalid_data', __( 'The admin note date prop cannot be empty.', 'woocommerce-admin' ) ); + $this->error( 'admin_note_invalid_data', __( 'The admin note date prop cannot be empty.', 'woocommerce' ) ); } if ( is_string( $date ) ) { @@ -582,7 +582,7 @@ class Note extends \WC_Data { if ( in_array( $layout, $valid_layouts, true ) ) { $this->set_prop( 'layout', $layout ); } else { - $this->error( 'admin_note_invalid_data', __( 'The admin note layout has a wrong prop value.', 'woocommerce-admin' ) ); + $this->error( 'admin_note_invalid_data', __( 'The admin note layout has a wrong prop value.', 'woocommerce' ) ); } } @@ -638,11 +638,11 @@ class Note extends \WC_Data { $actioned_text = wc_clean( $actioned_text ); if ( empty( $name ) ) { - $this->error( 'admin_note_invalid_data', __( 'The admin note action name prop cannot be empty.', 'woocommerce-admin' ) ); + $this->error( 'admin_note_invalid_data', __( 'The admin note action name prop cannot be empty.', 'woocommerce' ) ); } if ( empty( $label ) ) { - $this->error( 'admin_note_invalid_data', __( 'The admin note action label prop cannot be empty.', 'woocommerce-admin' ) ); + $this->error( 'admin_note_invalid_data', __( 'The admin note action label prop cannot be empty.', 'woocommerce' ) ); } $action = array( diff --git a/plugins/woocommerce/src/Admin/Notes/Notes.php b/plugins/woocommerce/src/Admin/Notes/Notes.php index 0eff83ab624..8a4b2101f6e 100644 --- a/plugins/woocommerce/src/Admin/Notes/Notes.php +++ b/plugins/woocommerce/src/Admin/Notes/Notes.php @@ -465,7 +465,7 @@ class Notes { } catch ( \Exception $e ) { throw new NotesUnavailableException( 'woocommerce_admin_notes_unavailable', - __( 'Notes are unavailable because the "admin-note" data store cannot be loaded.', 'woocommerce-admin' ) + __( 'Notes are unavailable because the "admin-note" data store cannot be loaded.', 'woocommerce' ) ); } } diff --git a/plugins/woocommerce/src/Admin/PageController.php b/plugins/woocommerce/src/Admin/PageController.php index fd9d5a21302..29315574320 100644 --- a/plugins/woocommerce/src/Admin/PageController.php +++ b/plugins/woocommerce/src/Admin/PageController.php @@ -198,7 +198,7 @@ class PageController { } } - $woocommerce_breadcrumb = array( 'admin.php?page=' . self::PAGE_ROOT, __( 'WooCommerce', 'woocommerce-admin' ) ); + $woocommerce_breadcrumb = array( 'admin.php?page=' . self::PAGE_ROOT, __( 'WooCommerce', 'woocommerce' ) ); array_unshift( $breadcrumbs, $woocommerce_breadcrumb ); @@ -220,7 +220,7 @@ class PageController { // If 'current_screen' hasn't fired yet, the current page calculation // will fail which causes `false` to be returned for all subsquent calls. if ( ! did_action( 'current_screen' ) ) { - _doing_it_wrong( __FUNCTION__, esc_html__( 'Current page retrieval should be called on or after the `current_screen` hook.', 'woocommerce-admin' ), '0.16.0' ); + _doing_it_wrong( __FUNCTION__, esc_html__( 'Current page retrieval should be called on or after the `current_screen` hook.', 'woocommerce' ), '0.16.0' ); } if ( is_null( $this->current_page ) ) { @@ -507,7 +507,7 @@ class PageController { public function register_store_details_page() { wc_admin_register_page( array( - 'title' => __( 'Setup Wizard', 'woocommerce-admin' ), + 'title' => __( 'Setup Wizard', 'woocommerce' ), 'parent' => '', 'path' => '/setup-wizard', ) diff --git a/plugins/woocommerce/src/Admin/PluginsHelper.php b/plugins/woocommerce/src/Admin/PluginsHelper.php index 8c44e8959b2..29e22927262 100644 --- a/plugins/woocommerce/src/Admin/PluginsHelper.php +++ b/plugins/woocommerce/src/Admin/PluginsHelper.php @@ -154,7 +154,7 @@ class PluginsHelper { $plugins = apply_filters( 'woocommerce_admin_plugins_pre_install', $plugins ); if ( empty( $plugins ) || ! is_array( $plugins ) ) { - return new \WP_Error( 'woocommerce_plugins_invalid_plugins', __( 'Plugins must be a non-empty array.', 'woocommerce-admin' ) ); + return new \WP_Error( 'woocommerce_plugins_invalid_plugins', __( 'Plugins must be a non-empty array.', 'woocommerce' ) ); } require_once ABSPATH . 'wp-admin/includes/plugin.php'; @@ -193,7 +193,7 @@ class PluginsHelper { if ( is_wp_error( $api ) ) { $properties = array( /* translators: %s: plugin slug (example: woocommerce-services) */ - 'error_message' => __( 'The requested plugin `%s` could not be installed. Plugin API call failed.', 'woocommerce-admin' ), + 'error_message' => __( 'The requested plugin `%s` could not be installed. Plugin API call failed.', 'woocommerce' ), 'api' => $api, 'slug' => $slug, ); @@ -205,7 +205,7 @@ class PluginsHelper { $plugin, sprintf( /* translators: %s: plugin slug (example: woocommerce-services) */ - __( 'The requested plugin `%s` could not be installed. Plugin API call failed.', 'woocommerce-admin' ), + __( 'The requested plugin `%s` could not be installed. Plugin API call failed.', 'woocommerce' ), $slug ) ); @@ -221,7 +221,7 @@ class PluginsHelper { if ( is_wp_error( $result ) || is_null( $result ) ) { $properties = array( /* translators: %s: plugin slug (example: woocommerce-services) */ - 'error_message' => __( 'The requested plugin `%s` could not be installed.', 'woocommerce-admin' ), + 'error_message' => __( 'The requested plugin `%s` could not be installed.', 'woocommerce' ), 'slug' => $slug, 'api' => $api, 'upgrader' => $upgrader, @@ -235,7 +235,7 @@ class PluginsHelper { $plugin, sprintf( /* translators: %s: plugin slug (example: woocommerce-services) */ - __( 'The requested plugin `%s` could not be installed. Upgrader install failed.', 'woocommerce-admin' ), + __( 'The requested plugin `%s` could not be installed. Upgrader install failed.', 'woocommerce' ), $slug ) ); @@ -263,7 +263,7 @@ class PluginsHelper { */ public static function schedule_install_plugins( $plugins ) { if ( empty( $plugins ) || ! is_array( $plugins ) ) { - return new \WP_Error( 'woocommerce_plugins_invalid_plugins', __( 'Plugins must be a non-empty array.', 'woocommerce-admin' ), 404 ); + return new \WP_Error( 'woocommerce_plugins_invalid_plugins', __( 'Plugins must be a non-empty array.', 'woocommerce' ), 404 ); } $job_id = uniqid(); @@ -280,7 +280,7 @@ class PluginsHelper { */ public static function activate_plugins( $plugins ) { if ( empty( $plugins ) || ! is_array( $plugins ) ) { - return new \WP_Error( 'woocommerce_plugins_invalid_plugins', __( 'Plugins must be a non-empty array.', 'woocommerce-admin' ), 404 ); + return new \WP_Error( 'woocommerce_plugins_invalid_plugins', __( 'Plugins must be a non-empty array.', 'woocommerce' ), 404 ); } require_once ABSPATH . 'wp-admin/includes/plugin.php'; @@ -307,7 +307,7 @@ class PluginsHelper { $errors->add( $plugin, /* translators: %s: plugin slug (example: woocommerce-services) */ - sprintf( __( 'The requested plugin `%s`. is not yet installed.', 'woocommerce-admin' ), $slug ) + sprintf( __( 'The requested plugin `%s`. is not yet installed.', 'woocommerce' ), $slug ) ); continue; } @@ -319,7 +319,7 @@ class PluginsHelper { $errors->add( $plugin, /* translators: %s: plugin slug (example: woocommerce-services) */ - sprintf( __( 'The requested plugin `%s` could not be activated.', 'woocommerce-admin' ), $slug ) + sprintf( __( 'The requested plugin `%s` could not be activated.', 'woocommerce' ), $slug ) ); continue; } @@ -344,7 +344,7 @@ class PluginsHelper { */ public static function schedule_activate_plugins( $plugins ) { if ( empty( $plugins ) || ! is_array( $plugins ) ) { - return new \WP_Error( 'woocommerce_plugins_invalid_plugins', __( 'Plugins must be a non-empty array.', 'woocommerce-admin' ), 404 ); + return new \WP_Error( 'woocommerce_plugins_invalid_plugins', __( 'Plugins must be a non-empty array.', 'woocommerce' ), 404 ); } $job_id = uniqid(); diff --git a/plugins/woocommerce/src/Admin/ReportCSVEmail.php b/plugins/woocommerce/src/Admin/ReportCSVEmail.php index 0a06cffc9a1..40b9657301c 100644 --- a/plugins/woocommerce/src/Admin/ReportCSVEmail.php +++ b/plugins/woocommerce/src/Admin/ReportCSVEmail.php @@ -29,16 +29,16 @@ class ReportCSVEmail extends \WC_Email { $this->template_html = 'html-admin-report-export-download.php'; $this->template_plain = 'plain-admin-report-export-download.php'; $this->report_labels = array( - 'categories' => __( 'Categories', 'woocommerce-admin' ), - 'coupons' => __( 'Coupons', 'woocommerce-admin' ), - 'customers' => __( 'Customers', 'woocommerce-admin' ), - 'downloads' => __( 'Downloads', 'woocommerce-admin' ), - 'orders' => __( 'Orders', 'woocommerce-admin' ), - 'products' => __( 'Products', 'woocommerce-admin' ), - 'revenue' => __( 'Revenue', 'woocommerce-admin' ), - 'stock' => __( 'Stock', 'woocommerce-admin' ), - 'taxes' => __( 'Taxes', 'woocommerce-admin' ), - 'variations' => __( 'Variations', 'woocommerce-admin' ), + 'categories' => __( 'Categories', 'woocommerce' ), + 'coupons' => __( 'Coupons', 'woocommerce' ), + 'customers' => __( 'Customers', 'woocommerce' ), + 'downloads' => __( 'Downloads', 'woocommerce' ), + 'orders' => __( 'Orders', 'woocommerce' ), + 'products' => __( 'Products', 'woocommerce' ), + 'revenue' => __( 'Revenue', 'woocommerce' ), + 'stock' => __( 'Stock', 'woocommerce' ), + 'taxes' => __( 'Taxes', 'woocommerce' ), + 'variations' => __( 'Variations', 'woocommerce' ), ); // Call parent constructor. @@ -70,7 +70,7 @@ class ReportCSVEmail extends \WC_Email { * @return string */ public function get_default_heading() { - return __( 'Your Report Download', 'woocommerce-admin' ); + return __( 'Your Report Download', 'woocommerce' ); } /** @@ -79,7 +79,7 @@ class ReportCSVEmail extends \WC_Email { * @return string */ public function get_default_subject() { - return __( '[{site_title}]: Your {report_name} Report download is ready', 'woocommerce-admin' ); + return __( '[{site_title}]: Your {report_name} Report download is ready', 'woocommerce' ); } /** diff --git a/plugins/woocommerce/src/Admin/ReportsSync.php b/plugins/woocommerce/src/Admin/ReportsSync.php index d0911221eaf..8ab314d7f61 100644 --- a/plugins/woocommerce/src/Admin/ReportsSync.php +++ b/plugins/woocommerce/src/Admin/ReportsSync.php @@ -46,7 +46,7 @@ class ReportsSync { foreach ( $schedulers as $scheduler ) { if ( ! is_subclass_of( $scheduler, 'Automattic\WooCommerce\Internal\Admin\Schedulers\ImportScheduler' ) ) { - throw new \Exception( __( 'Report sync schedulers should be derived from the Automattic\WooCommerce\Internal\Admin\Schedulers\ImportScheduler class.', 'woocommerce-admin' ) ); + throw new \Exception( __( 'Report sync schedulers should be derived from the Automattic\WooCommerce\Internal\Admin\Schedulers\ImportScheduler class.', 'woocommerce' ) ); } } @@ -76,7 +76,7 @@ class ReportsSync { */ public static function regenerate_report_data( $days, $skip_existing ) { if ( self::is_importing() ) { - return new \WP_Error( 'wc_admin_import_in_progress', __( 'An import is already in progress. Please allow the previous import to complete before beginning a new one.', 'woocommerce-admin' ) ); + return new \WP_Error( 'wc_admin_import_in_progress', __( 'An import is already in progress. Please allow the previous import to complete before beginning a new one.', 'woocommerce' ) ); } self::reset_import_stats( $days, $skip_existing ); @@ -92,7 +92,7 @@ class ReportsSync { */ do_action( 'woocommerce_analytics_regenerate_init', $days, $skip_existing ); - return __( 'Report table data is being rebuilt. Please allow some time for data to fully populate.', 'woocommerce-admin' ); + return __( 'Report table data is being rebuilt. Please allow some time for data to fully populate.', 'woocommerce' ); } /** @@ -176,7 +176,7 @@ class ReportsSync { // Delete import options. delete_option( ImportScheduler::IMPORT_STATS_OPTION ); - return __( 'Report table data is being deleted.', 'woocommerce-admin' ); + return __( 'Report table data is being deleted.', 'woocommerce' ); } /** diff --git a/plugins/woocommerce/src/Internal/Admin/Analytics.php b/plugins/woocommerce/src/Internal/Admin/Analytics.php index 4d5e268c4f9..ac21c078c1b 100644 --- a/plugins/woocommerce/src/Internal/Admin/Analytics.php +++ b/plugins/woocommerce/src/Internal/Admin/Analytics.php @@ -65,11 +65,11 @@ class Analytics { public static function add_feature_toggle( $features ) { $description = __( 'Enables WooCommerce Analytics', - 'woocommerce-admin' + 'woocommerce' ); $features[] = array( - 'title' => __( 'Analytics', 'woocommerce-admin' ), + 'title' => __( 'Analytics', 'woocommerce' ), 'desc' => $description, 'id' => self::TOGGLE_OPTION_NAME, 'type' => 'checkbox', @@ -151,11 +151,11 @@ class Analytics { ); $debug_tools[ self::CACHE_TOOL_ID ] = array( - 'name' => __( 'Clear analytics cache', 'woocommerce-admin' ), - 'button' => __( 'Clear', 'woocommerce-admin' ), + 'name' => __( 'Clear analytics cache', 'woocommerce' ), + 'button' => __( 'Clear', 'woocommerce' ), 'desc' => sprintf( /* translators: 1: opening link tag, 2: closing tag */ - __( 'This tool will reset the cached values used in WooCommerce Analytics. If numbers still look off, try %1$sReimporting Historical Data%2$s.', 'woocommerce-admin' ), + __( 'This tool will reset the cached values used in WooCommerce Analytics. If numbers still look off, try %1$sReimporting Historical Data%2$s.', 'woocommerce' ), '', '' ), @@ -183,7 +183,7 @@ class Analytics { public static function get_report_pages() { $overview_page = array( 'id' => 'woocommerce-analytics', - 'title' => __( 'Analytics', 'woocommerce-admin' ), + 'title' => __( 'Analytics', 'woocommerce' ), 'path' => '/analytics/overview', 'icon' => 'dashicons-chart-bar', 'position' => 57, // After WooCommerce & Product menu items. @@ -193,7 +193,7 @@ class Analytics { $overview_page, array( 'id' => 'woocommerce-analytics-overview', - 'title' => __( 'Overview', 'woocommerce-admin' ), + 'title' => __( 'Overview', 'woocommerce' ), 'parent' => 'woocommerce-analytics', 'path' => '/analytics/overview', 'nav_args' => array( @@ -203,7 +203,7 @@ class Analytics { ), array( 'id' => 'woocommerce-analytics-products', - 'title' => __( 'Products', 'woocommerce-admin' ), + 'title' => __( 'Products', 'woocommerce' ), 'parent' => 'woocommerce-analytics', 'path' => '/analytics/products', 'nav_args' => array( @@ -213,7 +213,7 @@ class Analytics { ), array( 'id' => 'woocommerce-analytics-revenue', - 'title' => __( 'Revenue', 'woocommerce-admin' ), + 'title' => __( 'Revenue', 'woocommerce' ), 'parent' => 'woocommerce-analytics', 'path' => '/analytics/revenue', 'nav_args' => array( @@ -223,7 +223,7 @@ class Analytics { ), array( 'id' => 'woocommerce-analytics-orders', - 'title' => __( 'Orders', 'woocommerce-admin' ), + 'title' => __( 'Orders', 'woocommerce' ), 'parent' => 'woocommerce-analytics', 'path' => '/analytics/orders', 'nav_args' => array( @@ -233,7 +233,7 @@ class Analytics { ), array( 'id' => 'woocommerce-analytics-variations', - 'title' => __( 'Variations', 'woocommerce-admin' ), + 'title' => __( 'Variations', 'woocommerce' ), 'parent' => 'woocommerce-analytics', 'path' => '/analytics/variations', 'nav_args' => array( @@ -243,7 +243,7 @@ class Analytics { ), array( 'id' => 'woocommerce-analytics-categories', - 'title' => __( 'Categories', 'woocommerce-admin' ), + 'title' => __( 'Categories', 'woocommerce' ), 'parent' => 'woocommerce-analytics', 'path' => '/analytics/categories', 'nav_args' => array( @@ -253,7 +253,7 @@ class Analytics { ), array( 'id' => 'woocommerce-analytics-coupons', - 'title' => __( 'Coupons', 'woocommerce-admin' ), + 'title' => __( 'Coupons', 'woocommerce' ), 'parent' => 'woocommerce-analytics', 'path' => '/analytics/coupons', 'nav_args' => array( @@ -263,7 +263,7 @@ class Analytics { ), array( 'id' => 'woocommerce-analytics-taxes', - 'title' => __( 'Taxes', 'woocommerce-admin' ), + 'title' => __( 'Taxes', 'woocommerce' ), 'parent' => 'woocommerce-analytics', 'path' => '/analytics/taxes', 'nav_args' => array( @@ -273,7 +273,7 @@ class Analytics { ), array( 'id' => 'woocommerce-analytics-downloads', - 'title' => __( 'Downloads', 'woocommerce-admin' ), + 'title' => __( 'Downloads', 'woocommerce' ), 'parent' => 'woocommerce-analytics', 'path' => '/analytics/downloads', 'nav_args' => array( @@ -283,7 +283,7 @@ class Analytics { ), 'yes' === get_option( 'woocommerce_manage_stock' ) ? array( 'id' => 'woocommerce-analytics-stock', - 'title' => __( 'Stock', 'woocommerce-admin' ), + 'title' => __( 'Stock', 'woocommerce' ), 'parent' => 'woocommerce-analytics', 'path' => '/analytics/stock', 'nav_args' => array( @@ -293,17 +293,17 @@ class Analytics { ) : null, array( 'id' => 'woocommerce-analytics-customers', - 'title' => __( 'Customers', 'woocommerce-admin' ), + 'title' => __( 'Customers', 'woocommerce' ), 'parent' => 'woocommerce', 'path' => '/customers', ), array( 'id' => 'woocommerce-analytics-settings', - 'title' => __( 'Settings', 'woocommerce-admin' ), + 'title' => __( 'Settings', 'woocommerce' ), 'parent' => 'woocommerce-analytics', 'path' => '/analytics/settings', 'nav_args' => array( - 'title' => __( 'Analytics', 'woocommerce-admin' ), + 'title' => __( 'Analytics', 'woocommerce' ), 'parent' => 'woocommerce-settings', ), ), @@ -318,6 +318,6 @@ class Analytics { public function run_clear_cache_tool() { Cache::invalidate(); - return __( 'Analytics cache cleared.', 'woocommerce-admin' ); + return __( 'Analytics cache cleared.', 'woocommerce' ); } } diff --git a/plugins/woocommerce/src/Internal/Admin/Coupons.php b/plugins/woocommerce/src/Internal/Admin/Coupons.php index f1009cb1f22..955832374c0 100644 --- a/plugins/woocommerce/src/Internal/Admin/Coupons.php +++ b/plugins/woocommerce/src/Internal/Admin/Coupons.php @@ -71,8 +71,8 @@ class Coupons { add_submenu_page( 'woocommerce', - __( 'Coupons', 'woocommerce-admin' ), - __( 'Coupons', 'woocommerce-admin' ), + __( 'Coupons', 'woocommerce' ), + __( 'Coupons', 'woocommerce' ), 'manage_options', 'coupons-moved', [ $this, 'coupon_menu_moved' ] diff --git a/plugins/woocommerce/src/Internal/Admin/CustomerEffortScoreTracks.php b/plugins/woocommerce/src/Internal/Admin/CustomerEffortScoreTracks.php index 9baafdb99c4..ab99e1a5c71 100644 --- a/plugins/woocommerce/src/Internal/Admin/CustomerEffortScoreTracks.php +++ b/plugins/woocommerce/src/Internal/Admin/CustomerEffortScoreTracks.php @@ -129,7 +129,7 @@ class CustomerEffortScoreTracks { 3 ); } - $this->onsubmit_label = __( 'Thank you for your feedback!', 'woocommerce-admin' ); + $this->onsubmit_label = __( 'Thank you for your feedback!', 'woocommerce' ); } /** @@ -273,7 +273,7 @@ class CustomerEffortScoreTracks { 'action' => self::SEARCH_ACTION_NAME, 'label' => __( 'How easy was it to use search?', - 'woocommerce-admin' + 'woocommerce' ), 'onsubmit_label' => $this->onsubmit_label, 'pagenow' => $page_now, @@ -339,7 +339,7 @@ class CustomerEffortScoreTracks { 'action' => self::PRODUCT_ADD_PUBLISH_ACTION_NAME, 'label' => __( 'How easy was it to add a product?', - 'woocommerce-admin' + 'woocommerce' ), 'onsubmit_label' => $this->onsubmit_label, 'pagenow' => 'product', @@ -364,7 +364,7 @@ class CustomerEffortScoreTracks { 'action' => self::PRODUCT_UPDATE_ACTION_NAME, 'label' => __( 'How easy was it to edit your product?', - 'woocommerce-admin' + 'woocommerce' ), 'onsubmit_label' => $this->onsubmit_label, 'pagenow' => 'product', @@ -389,7 +389,7 @@ class CustomerEffortScoreTracks { 'action' => self::SHOP_ORDER_UPDATE_ACTION_NAME, 'label' => __( 'How easy was it to update an order?', - 'woocommerce-admin' + 'woocommerce' ), 'onsubmit_label' => $this->onsubmit_label, 'pagenow' => 'shop_order', @@ -447,7 +447,7 @@ class CustomerEffortScoreTracks { wc_enqueue_js( $this->get_script_track_edit_php( self::ADD_PRODUCT_CATEGORIES_ACTION_NAME, - __( 'How easy was it to add product category?', 'woocommerce-admin' ) + __( 'How easy was it to add product category?', 'woocommerce' ) ) ); } @@ -463,7 +463,7 @@ class CustomerEffortScoreTracks { wc_enqueue_js( $this->get_script_track_edit_php( self::ADD_PRODUCT_TAGS_ACTION_NAME, - __( 'How easy was it to add a product tag?', 'woocommerce-admin' ) + __( 'How easy was it to add a product tag?', 'woocommerce' ) ) ); } @@ -486,7 +486,7 @@ class CustomerEffortScoreTracks { 'action' => self::IMPORT_PRODUCTS_ACTION_NAME, 'label' => __( 'How easy was it to import products?', - 'woocommerce-admin' + 'woocommerce' ), 'onsubmit_label' => $this->onsubmit_label, 'pagenow' => 'product_page_product_importer', @@ -521,7 +521,7 @@ class CustomerEffortScoreTracks { 'action' => self::SETTINGS_CHANGE_ACTION_NAME, 'label' => __( 'How easy was it to update your settings?', - 'woocommerce-admin' + 'woocommerce' ), 'onsubmit_label' => $this->onsubmit_label, 'pagenow' => 'woocommerce_page_wc-settings', @@ -544,7 +544,7 @@ class CustomerEffortScoreTracks { 'action' => self::ADD_PRODUCT_ATTRIBUTES_ACTION_NAME, 'label' => __( 'How easy was it to add a product attribute?', - 'woocommerce-admin' + 'woocommerce' ), 'onsubmit_label' => $this->onsubmit_label, 'pagenow' => 'product_page_product_attributes', diff --git a/plugins/woocommerce/src/Internal/Admin/FeaturePlugin.php b/plugins/woocommerce/src/Internal/Admin/FeaturePlugin.php index f854f6f1d80..66d8195a41d 100644 --- a/plugins/woocommerce/src/Internal/Admin/FeaturePlugin.php +++ b/plugins/woocommerce/src/Internal/Admin/FeaturePlugin.php @@ -245,7 +245,7 @@ class FeaturePlugin { if ( ! $woocommerce_minimum_met ) { $errors[] = sprintf( /* translators: 1: URL of WooCommerce plugin, 2: The minimum WooCommerce version number */ - __( 'The WooCommerce Admin feature plugin requires WooCommerce %2$s or greater to be installed and active.', 'woocommerce-admin' ), + __( 'The WooCommerce Admin feature plugin requires WooCommerce %2$s or greater to be installed and active.', 'woocommerce' ), 'https://wordpress.org/plugins/woocommerce/', $minimum_woocommerce_version ); @@ -254,7 +254,7 @@ class FeaturePlugin { if ( ! $wordpress_minimum_met ) { $errors[] = sprintf( /* translators: 1: URL of WordPress.org, 2: The minimum WordPress version number */ - __( 'The WooCommerce Admin feature plugin requires WordPress %2$s or greater to be installed and active.', 'woocommerce-admin' ), + __( 'The WooCommerce Admin feature plugin requires WordPress %2$s or greater to be installed and active.', 'woocommerce' ), 'https://wordpress.org/', $minimum_wordpress_version ); diff --git a/plugins/woocommerce/src/Internal/Admin/Homescreen.php b/plugins/woocommerce/src/Internal/Admin/Homescreen.php index 63cd353ecce..4f0d537f6a7 100644 --- a/plugins/woocommerce/src/Internal/Admin/Homescreen.php +++ b/plugins/woocommerce/src/Internal/Admin/Homescreen.php @@ -81,7 +81,7 @@ class Homescreen { wc_admin_register_page( array( 'id' => 'woocommerce-home', - 'title' => __( 'WooCommerce', 'woocommerce-admin' ), + 'title' => __( 'WooCommerce', 'woocommerce' ), 'path' => self::MENU_SLUG, 'capability' => 'read', ) @@ -92,7 +92,7 @@ class Homescreen { wc_admin_register_page( array( 'id' => 'woocommerce-home', - 'title' => __( 'Home', 'woocommerce-admin' ), + 'title' => __( 'Home', 'woocommerce' ), 'parent' => 'woocommerce', 'path' => self::MENU_SLUG, 'order' => 0, diff --git a/plugins/woocommerce/src/Internal/Admin/Loader.php b/plugins/woocommerce/src/Internal/Admin/Loader.php index ef54abe1695..6de085b75e2 100644 --- a/plugins/woocommerce/src/Internal/Admin/Loader.php +++ b/plugins/woocommerce/src/Internal/Admin/Loader.php @@ -101,7 +101,7 @@ class Loader { echo '

'; printf( /* translators: %s: is referring to the plugin's name. */ - esc_html__( 'You have the %s plugin activated but it is not being used.', 'woocommerce-admin' ), + esc_html__( 'You have the %s plugin activated but it is not being used.', 'woocommerce' ), 'WooCommerce Admin' ); echo '

'; @@ -274,7 +274,7 @@ class Loader { $title = implode( ' ‹ ', $pieces ); /* translators: %1$s: updated title, %2$s: blog info name */ - return sprintf( __( '%1$s ‹ %2$s', 'woocommerce-admin' ), $title, get_bloginfo( 'name' ) ); + return sprintf( __( '%1$s ‹ %2$s', 'woocommerce' ), $title, get_bloginfo( 'name' ) ); } /** @@ -376,7 +376,7 @@ class Loader { // Plugins that depend on changing the translation work on the server but not the client - // WooCommerce Branding is an example of this - so pass through the translation of // 'WooCommerce' to wcSettings. - $settings['woocommerceTranslation'] = __( 'WooCommerce', 'woocommerce-admin' ); + $settings['woocommerceTranslation'] = __( 'WooCommerce', 'woocommerce' ); // We may have synced orders with a now-unregistered status. // E.g An extension that added statuses is now inactive or removed. $settings['unregisteredOrderStatuses'] = self::get_unregistered_order_statuses(); @@ -447,8 +447,8 @@ class Loader { public static function add_settings_group( $groups ) { $groups[] = array( 'id' => 'wc_admin', - 'label' => __( 'WooCommerce Admin', 'woocommerce-admin' ), - 'description' => __( 'Settings for WooCommerce admin reporting.', 'woocommerce-admin' ), + 'label' => __( 'WooCommerce Admin', 'woocommerce' ), + 'description' => __( 'Settings for WooCommerce admin reporting.', 'woocommerce' ), ); return $groups; } @@ -467,8 +467,8 @@ class Loader { $settings[] = array( 'id' => 'woocommerce_excluded_report_order_statuses', 'option_key' => 'woocommerce_excluded_report_order_statuses', - 'label' => __( 'Excluded report order statuses', 'woocommerce-admin' ), - 'description' => __( 'Statuses that should not be included when calculating report totals.', 'woocommerce-admin' ), + 'label' => __( 'Excluded report order statuses', 'woocommerce' ), + 'description' => __( 'Statuses that should not be included when calculating report totals.', 'woocommerce' ), 'default' => array( 'pending', 'cancelled', 'failed' ), 'type' => 'multiselect', 'options' => $all_statuses, @@ -476,8 +476,8 @@ class Loader { $settings[] = array( 'id' => 'woocommerce_actionable_order_statuses', 'option_key' => 'woocommerce_actionable_order_statuses', - 'label' => __( 'Actionable order statuses', 'woocommerce-admin' ), - 'description' => __( 'Statuses that require extra action on behalf of the store admin.', 'woocommerce-admin' ), + 'label' => __( 'Actionable order statuses', 'woocommerce' ), + 'description' => __( 'Statuses that require extra action on behalf of the store admin.', 'woocommerce' ), 'default' => array( 'processing', 'on-hold' ), 'type' => 'multiselect', 'options' => $all_statuses, @@ -485,8 +485,8 @@ class Loader { $settings[] = array( 'id' => 'woocommerce_default_date_range', 'option_key' => 'woocommerce_default_date_range', - 'label' => __( 'Default Date Range', 'woocommerce-admin' ), - 'description' => __( 'Default Date Range', 'woocommerce-admin' ), + 'label' => __( 'Default Date Range', 'woocommerce' ), + 'description' => __( 'Default Date Range', 'woocommerce' ), 'default' => 'period=month&compare=previous_year', 'type' => 'text', ); diff --git a/plugins/woocommerce/src/Internal/Admin/Marketing.php b/plugins/woocommerce/src/Internal/Admin/Marketing.php index 6db48ee9004..5c294a37659 100644 --- a/plugins/woocommerce/src/Internal/Admin/Marketing.php +++ b/plugins/woocommerce/src/Internal/Admin/Marketing.php @@ -72,8 +72,8 @@ class Marketing { public function add_parent_menu_item() { if ( ! Features::is_enabled( 'navigation' ) ) { add_menu_page( - __( 'Marketing', 'woocommerce-admin' ), - __( 'Marketing', 'woocommerce-admin' ), + __( 'Marketing', 'woocommerce' ), + __( 'Marketing', 'woocommerce' ), 'manage_woocommerce', 'woocommerce-marketing', null, @@ -134,7 +134,7 @@ class Marketing { PageController::get_instance()->register_page( [ 'id' => 'woocommerce-marketing-overview', - 'title' => __( 'Overview', 'woocommerce-admin' ), + 'title' => __( 'Overview', 'woocommerce' ), 'path' => 'wc-admin&path=/marketing', 'parent' => 'woocommerce-marketing', 'nav_args' => array( diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/AddFirstProduct.php b/plugins/woocommerce/src/Internal/Admin/Notes/AddFirstProduct.php index ad113f808c9..5e1f1a8469f 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/AddFirstProduct.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/AddFirstProduct.php @@ -64,10 +64,10 @@ class AddFirstProduct { $content_lines = array( '{greetings}

', /* translators: %s: line break */ - sprintf( __( 'Nice one; you\'ve created a WooCommerce store! Now it\'s time to add your first product and get ready to start selling.%s', 'woocommerce-admin' ), '

' ), - __( 'There are three ways to add your products: you can create products manually, import them at once via CSV file, or migrate them from another service.

', 'woocommerce-admin' ), + sprintf( __( 'Nice one; you\'ve created a WooCommerce store! Now it\'s time to add your first product and get ready to start selling.%s', 'woocommerce' ), '

' ), + __( 'There are three ways to add your products: you can create products manually, import them at once via CSV file, or migrate them from another service.

', 'woocommerce' ), /* translators: %1$s is an open anchor tag () and %2$s is a close link tag (). */ - sprintf( __( '%1$1sExplore our docs%2$2s for more information, or just get started!', 'woocommerce-admin' ), '', '' ), + sprintf( __( '%1$1sExplore our docs%2$2s for more information, or just get started!', 'woocommerce' ), '', '' ), ); $additional_data = array( @@ -75,7 +75,7 @@ class AddFirstProduct { ); $note = new Note(); - $note->set_title( __( 'Add your first product', 'woocommerce-admin' ) ); + $note->set_title( __( 'Add your first product', 'woocommerce' ) ); $note->set_content( implode( '', $content_lines ) ); $note->set_content_data( (object) $additional_data ); $note->set_image( @@ -87,7 +87,7 @@ class AddFirstProduct { $note->set_type( Note::E_WC_ADMIN_NOTE_EMAIL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); - $note->add_action( 'add-first-product', __( 'Add a product', 'woocommerce-admin' ), admin_url( 'admin.php?page=wc-admin&task=products' ) ); + $note->add_action( 'add-first-product', __( 'Add a product', 'woocommerce' ), admin_url( 'admin.php?page=wc-admin&task=products' ) ); return $note; } } diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/AddingAndManangingProducts.php b/plugins/woocommerce/src/Internal/Admin/Notes/AddingAndManangingProducts.php index 2e3bd8b5d34..6dba24c73d8 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/AddingAndManangingProducts.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/AddingAndManangingProducts.php @@ -58,11 +58,11 @@ class AddingAndManangingProducts { } $note = new Note(); - $note->set_title( __( 'Adding and Managing Products', 'woocommerce-admin' ) ); + $note->set_title( __( 'Adding and Managing Products', 'woocommerce' ) ); $note->set_content( __( 'Learn more about how to set up products in WooCommerce through our useful documentation about adding and managing products.', - 'woocommerce-admin' + 'woocommerce' ) ); $note->set_content_data( (object) array() ); @@ -71,7 +71,7 @@ class AddingAndManangingProducts { $note->set_source( 'woocommerce-admin' ); $note->add_action( 'learn-more', - __( 'Learn more', 'woocommerce-admin' ), + __( 'Learn more', 'woocommerce' ), 'https://woocommerce.com/document/managing-products/?utm_source=inbox&utm_medium=product' ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/ChoosingTheme.php b/plugins/woocommerce/src/Internal/Admin/Notes/ChoosingTheme.php index 9ed4a74f252..22c083f4275 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/ChoosingTheme.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/ChoosingTheme.php @@ -39,15 +39,15 @@ class ChoosingTheme { // Otherwise, create our new note. $note = new Note(); - $note->set_title( __( 'Choosing a theme?', 'woocommerce-admin' ) ); - $note->set_content( __( 'Check out the themes that are compatible with WooCommerce and choose one aligned with your brand and business needs.', 'woocommerce-admin' ) ); + $note->set_title( __( 'Choosing a theme?', 'woocommerce' ) ); + $note->set_content( __( 'Check out the themes that are compatible with WooCommerce and choose one aligned with your brand and business needs.', 'woocommerce' ) ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_MARKETING ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'visit-the-theme-marketplace', - __( 'Visit the theme marketplace', 'woocommerce-admin' ), + __( 'Visit the theme marketplace', 'woocommerce' ), 'https://woocommerce.com/product-category/themes/?utm_source=inbox&utm_medium=product' ); return $note; diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/CompleteStoreDetails.php b/plugins/woocommerce/src/Internal/Admin/Notes/CompleteStoreDetails.php index 16489a96f14..35e6c365a97 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/CompleteStoreDetails.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/CompleteStoreDetails.php @@ -48,15 +48,15 @@ class CompleteStoreDetails { } $note = new Note(); - $note->set_title( __( 'Add your store details to complete store setup', 'woocommerce-admin' ) ); - $note->set_content( __( 'Complete your store details with important information for setup such as your store’s base address', 'woocommerce-admin' ) ); + $note->set_title( __( 'Add your store details to complete store setup', 'woocommerce' ) ); + $note->set_content( __( 'Complete your store details with important information for setup such as your store’s base address', 'woocommerce' ) ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_content_data( (object) array() ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'add-store-details', - __( 'Add store details', 'woocommerce-admin' ), + __( 'Add store details', 'woocommerce' ), wc_admin_url( '&path=/setup-wizard' ) ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/CouponPageMoved.php b/plugins/woocommerce/src/Internal/Admin/Notes/CouponPageMoved.php index 2b2760b49a7..778b74968f3 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/CouponPageMoved.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/CouponPageMoved.php @@ -73,15 +73,15 @@ class CouponPageMoved { */ public static function get_note() { $note = new Note(); - $note->set_title( __( 'Coupon management has moved!', 'woocommerce-admin' ) ); - $note->set_content( __( 'Coupons can now be managed from Marketing > Coupons. Click the button below to remove the legacy WooCommerce > Coupons menu item.', 'woocommerce-admin' ) ); + $note->set_title( __( 'Coupon management has moved!', 'woocommerce' ) ); + $note->set_content( __( 'Coupons can now be managed from Marketing > Coupons. Click the button below to remove the legacy WooCommerce > Coupons menu item.', 'woocommerce' ) ); $note->set_type( Note::E_WC_ADMIN_NOTE_UPDATE ); $note->set_name( self::NOTE_NAME ); $note->set_content_data( new stdClass() ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'remove-legacy-coupon-menu', - __( 'Remove legacy coupon menu', 'woocommerce-admin' ), + __( 'Remove legacy coupon menu', 'woocommerce' ), wc_admin_url( '&action=remove-coupon-menu' ), Note::E_WC_ADMIN_NOTE_ACTIONED ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/CustomizeStoreWithBlocks.php b/plugins/woocommerce/src/Internal/Admin/Notes/CustomizeStoreWithBlocks.php index 3d95f8abfb7..b47502170a4 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/CustomizeStoreWithBlocks.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/CustomizeStoreWithBlocks.php @@ -69,15 +69,15 @@ class CustomizeStoreWithBlocks { } $note = new Note(); - $note->set_title( __( 'Customize your online store with WooCommerce blocks', 'woocommerce-admin' ) ); - $note->set_content( __( 'With our blocks, you can select and display products, categories, filters, and more virtually anywhere on your site — no need to use shortcodes or edit lines of code. Learn more about how to use each one of them.', 'woocommerce-admin' ) ); + $note->set_title( __( 'Customize your online store with WooCommerce blocks', 'woocommerce' ) ); + $note->set_content( __( 'With our blocks, you can select and display products, categories, filters, and more virtually anywhere on your site — no need to use shortcodes or edit lines of code. Learn more about how to use each one of them.', 'woocommerce' ) ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_content_data( (object) array() ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'customize-store-with-blocks', - __( 'Learn more', 'woocommerce-admin' ), + __( 'Learn more', 'woocommerce' ), 'https://woocommerce.com/posts/how-to-customize-your-online-store-with-woocommerce-blocks/?utm_source=inbox&utm_medium=product', Note::E_WC_ADMIN_NOTE_ACTIONED ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/CustomizingProductCatalog.php b/plugins/woocommerce/src/Internal/Admin/Notes/CustomizingProductCatalog.php index 5ae1074fbe4..b893d0f5188 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/CustomizingProductCatalog.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/CustomizingProductCatalog.php @@ -66,15 +66,15 @@ class CustomizingProductCatalog { } $note = new Note(); - $note->set_title( __( 'How to customize your product catalog', 'woocommerce-admin' ) ); - $note->set_content( __( 'You want your product catalog and images to look great and align with your brand. This guide will give you all the tips you need to get your products looking great in your store.', 'woocommerce-admin' ) ); + $note->set_title( __( 'How to customize your product catalog', 'woocommerce' ) ); + $note->set_content( __( 'You want your product catalog and images to look great and align with your brand. This guide will give you all the tips you need to get your products looking great in your store.', 'woocommerce' ) ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_content_data( (object) array() ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'day-after-first-product', - __( 'Learn more', 'woocommerce-admin' ), + __( 'Learn more', 'woocommerce' ), 'https://woocommerce.com/document/woocommerce-customizer/?utm_source=inbox&utm_medium=product' ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/DeactivatePlugin.php b/plugins/woocommerce/src/Internal/Admin/Notes/DeactivatePlugin.php index 4b1b69c8948..cbd8663e70a 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/DeactivatePlugin.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/DeactivatePlugin.php @@ -41,15 +41,15 @@ class DeactivatePlugin { */ public static function get_note() { $note = new Note(); - $note->set_title( __( 'Deactivate old WooCommerce Admin version', 'woocommerce-admin' ) ); - $note->set_content( __( 'Your current version of WooCommerce Admin is outdated and a newer version is included with WooCommerce. We recommend deactivating the plugin and using the stable version included with WooCommerce.', 'woocommerce-admin' ) ); + $note->set_title( __( 'Deactivate old WooCommerce Admin version', 'woocommerce' ) ); + $note->set_content( __( 'Your current version of WooCommerce Admin is outdated and a newer version is included with WooCommerce. We recommend deactivating the plugin and using the stable version included with WooCommerce.', 'woocommerce' ) ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_content_data( (object) array() ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'deactivate-feature-plugin', - __( 'Deactivate', 'woocommerce-admin' ), + __( 'Deactivate', 'woocommerce' ), wc_admin_url( '&action=deactivate-feature-plugin' ), Note::E_WC_ADMIN_NOTE_UNACTIONED ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/EUVATNumber.php b/plugins/woocommerce/src/Internal/Admin/Notes/EUVATNumber.php index 96da86d67a7..fcefdea344e 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/EUVATNumber.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/EUVATNumber.php @@ -42,10 +42,10 @@ class EUVATNumber { return; } - $content = __( "If your store is based in the EU, we recommend using the EU VAT Number extension in addition to automated taxes. It provides your checkout with a field to collect and validate a customer's EU VAT number, if they have one.", 'woocommerce-admin' ); + $content = __( "If your store is based in the EU, we recommend using the EU VAT Number extension in addition to automated taxes. It provides your checkout with a field to collect and validate a customer's EU VAT number, if they have one.", 'woocommerce' ); $note = new Note(); - $note->set_title( __( 'Collect and validate EU VAT numbers at checkout', 'woocommerce-admin' ) ); + $note->set_title( __( 'Collect and validate EU VAT numbers at checkout', 'woocommerce' ) ); $note->set_content( $content ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_MARKETING ); @@ -53,7 +53,7 @@ class EUVATNumber { $note->set_source( 'woocommerce-admin' ); $note->add_action( 'learn-more', - __( 'Learn more', 'woocommerce-admin' ), + __( 'Learn more', 'woocommerce' ), 'https://woocommerce.com/products/eu-vat-number/?utm_medium=product', Note::E_WC_ADMIN_NOTE_ACTIONED ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/EditProductsOnTheMove.php b/plugins/woocommerce/src/Internal/Admin/Notes/EditProductsOnTheMove.php index fe62b624e11..c9d77026a94 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/EditProductsOnTheMove.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/EditProductsOnTheMove.php @@ -54,15 +54,15 @@ class EditProductsOnTheMove { $note = new Note(); - $note->set_title( __( 'Edit products on the move', 'woocommerce-admin' ) ); - $note->set_content( __( 'Edit and create new products from your mobile devices with the Woo app', 'woocommerce-admin' ) ); + $note->set_title( __( 'Edit products on the move', 'woocommerce' ) ); + $note->set_content( __( 'Edit and create new products from your mobile devices with the Woo app', 'woocommerce' ) ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'learn-more', - __( 'Learn more', 'woocommerce-admin' ), + __( 'Learn more', 'woocommerce' ), 'https://woocommerce.com/mobile/?utm_source=inbox&utm_medium=product' ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/EmailNotification.php b/plugins/woocommerce/src/Internal/Admin/Notes/EmailNotification.php index 16375648241..3dcf40ec550 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/EmailNotification.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/EmailNotification.php @@ -32,7 +32,7 @@ class EmailNotification extends \WC_Email { $this->id = 'merchant_notification'; $this->template_base = WC_ADMIN_ABSPATH . 'includes/react-admin/emails/'; $this->placeholders = array( - '{greetings}' => __( 'Hi there,', 'woocommerce-admin' ), + '{greetings}' => __( 'Hi there,', 'woocommerce' ), ); // Call parent constructor. @@ -206,7 +206,7 @@ class EmailNotification extends \WC_Email { if ( $user_name ) { /* translators: %s = merchant name */ - $this->placeholders['{greetings}'] = sprintf( __( 'Hi %s,', 'woocommerce-admin' ), $user_name ); + $this->placeholders['{greetings}'] = sprintf( __( 'Hi %s,', 'woocommerce' ), $user_name ); } $this->send( diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/FirstDownlaodableProduct.php b/plugins/woocommerce/src/Internal/Admin/Notes/FirstDownlaodableProduct.php index f7722ed01f3..4e7fa864528 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/FirstDownlaodableProduct.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/FirstDownlaodableProduct.php @@ -49,11 +49,11 @@ class FirstDownlaodableProduct { } $note = new Note(); - $note->set_title( __( 'Learn more about digital/downloadable products', 'woocommerce-admin' ) ); + $note->set_title( __( 'Learn more about digital/downloadable products', 'woocommerce' ) ); $note->set_content( __( 'Congrats on adding your first digital product! You can learn more about how to handle digital or downloadable products in our documentation.', - 'woocommerce-admin' + 'woocommerce' ) ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); @@ -62,7 +62,7 @@ class FirstDownlaodableProduct { $note->set_source( 'woocommerce-admin' ); $note->add_action( 'first-downloadable-product-handling', - __( 'Learn more', 'woocommerce-admin' ), + __( 'Learn more', 'woocommerce' ), 'https://woocommerce.com/document/digital-downloadable-product-handling/?utm_source=inbox&utm_medium=product' ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/FirstProduct.php b/plugins/woocommerce/src/Internal/Admin/Notes/FirstProduct.php index aacd7d78bdb..b16c454e4f0 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/FirstProduct.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/FirstProduct.php @@ -69,15 +69,15 @@ class FirstProduct { } $note = new Note(); - $note->set_title( __( 'Do you need help with adding your first product?', 'woocommerce-admin' ) ); - $note->set_content( __( 'This video tutorial will help you go through the process of adding your first product in WooCommerce.', 'woocommerce-admin' ) ); + $note->set_title( __( 'Do you need help with adding your first product?', 'woocommerce' ) ); + $note->set_content( __( 'This video tutorial will help you go through the process of adding your first product in WooCommerce.', 'woocommerce' ) ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_content_data( (object) array() ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'first-product-watch-tutorial', - __( 'Watch tutorial', 'woocommerce-admin' ), + __( 'Watch tutorial', 'woocommerce' ), 'https://www.youtube.com/watch?v=sFtXa00Jf_o&list=PLHdG8zvZd0E575Ia8Mu3w1h750YLXNfsC&index=24' ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/GivingFeedbackNotes.php b/plugins/woocommerce/src/Internal/Admin/Notes/GivingFeedbackNotes.php index 765881639c9..86411141359 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/GivingFeedbackNotes.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/GivingFeedbackNotes.php @@ -39,15 +39,15 @@ class GivingFeedbackNotes { // Otherwise, create our new note. $note = new Note(); - $note->set_title( __( 'You\'re invited to share your experience', 'woocommerce-admin' ) ); - $note->set_content( __( 'Now that you’ve chosen us as a partner, our goal is to make sure we\'re providing the right tools to meet your needs. We\'re looking forward to having your feedback on the store setup experience so we can improve it in the future.', 'woocommerce-admin' ) ); + $note->set_title( __( 'You\'re invited to share your experience', 'woocommerce' ) ); + $note->set_content( __( 'Now that you’ve chosen us as a partner, our goal is to make sure we\'re providing the right tools to meet your needs. We\'re looking forward to having your feedback on the store setup experience so we can improve it in the future.', 'woocommerce' ) ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'share-feedback', - __( 'Share feedback', 'woocommerce-admin' ), + __( 'Share feedback', 'woocommerce' ), Survey::get_url( '/store-setup-survey' ) ); return $note; diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/InsightFirstProductAndPayment.php b/plugins/woocommerce/src/Internal/Admin/Notes/InsightFirstProductAndPayment.php index 4b1aacb2d6e..8d78705ac2f 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/InsightFirstProductAndPayment.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/InsightFirstProductAndPayment.php @@ -40,28 +40,28 @@ class InsightFirstProductAndPayment { } $note = new Note(); - $note->set_title( __( 'Insight', 'woocommerce-admin' ) ); - $note->set_content( __( 'More than 80% of new merchants add the first product and have at least one payment method set up during the first week.

Do you find this type of insight useful?', 'woocommerce-admin' ) ); + $note->set_title( __( 'Insight', 'woocommerce' ) ); + $note->set_content( __( 'More than 80% of new merchants add the first product and have at least one payment method set up during the first week.

Do you find this type of insight useful?', 'woocommerce' ) ); $note->set_type( Note::E_WC_ADMIN_NOTE_SURVEY ); $note->set_name( self::NOTE_NAME ); $note->set_content_data( (object) array() ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'affirm-insight-first-product-and-payment', - __( 'Yes', 'woocommerce-admin' ), + __( 'Yes', 'woocommerce' ), false, Note::E_WC_ADMIN_NOTE_ACTIONED, false, - __( 'Thanks for your feedback', 'woocommerce-admin' ) + __( 'Thanks for your feedback', 'woocommerce' ) ); $note->add_action( 'affirm-insight-first-product-and-payment', - __( 'No', 'woocommerce-admin' ), + __( 'No', 'woocommerce' ), false, Note::E_WC_ADMIN_NOTE_ACTIONED, false, - __( 'Thanks for your feedback', 'woocommerce-admin' ) + __( 'Thanks for your feedback', 'woocommerce' ) ); return $note; diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/InsightFirstSale.php b/plugins/woocommerce/src/Internal/Admin/Notes/InsightFirstSale.php index 89bd43cf98a..1cc28010536 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/InsightFirstSale.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/InsightFirstSale.php @@ -39,8 +39,8 @@ class InsightFirstSale { } $note = new Note(); - $note->set_title( __( 'Did you know?', 'woocommerce-admin' ) ); - $note->set_content( __( 'A WooCommerce powered store needs on average 31 days to get the first sale. You\'re on the right track! Do you find this type of insight useful?', 'woocommerce-admin' ) ); + $note->set_title( __( 'Did you know?', 'woocommerce' ) ); + $note->set_content( __( 'A WooCommerce powered store needs on average 31 days to get the first sale. You\'re on the right track! Do you find this type of insight useful?', 'woocommerce' ) ); $note->set_type( Note::E_WC_ADMIN_NOTE_SURVEY ); $note->set_name( self::NOTE_NAME ); $note->set_content_data( (object) array() ); @@ -51,19 +51,19 @@ class InsightFirstSale { // sent in NoteActions. $note->add_action( 'affirm-insight-first-sale', - __( 'Yes', 'woocommerce-admin' ), + __( 'Yes', 'woocommerce' ), false, Note::E_WC_ADMIN_NOTE_ACTIONED, false, - __( 'Thanks for your feedback', 'woocommerce-admin' ) + __( 'Thanks for your feedback', 'woocommerce' ) ); $note->add_action( 'deny-insight-first-sale', - __( 'No', 'woocommerce-admin' ), + __( 'No', 'woocommerce' ), false, Note::E_WC_ADMIN_NOTE_ACTIONED, false, - __( 'Thanks for your feedback', 'woocommerce-admin' ) + __( 'Thanks for your feedback', 'woocommerce' ) ); return $note; diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/InstallJPAndWCSPlugins.php b/plugins/woocommerce/src/Internal/Admin/Notes/InstallJPAndWCSPlugins.php index 525333cde39..2bc3e426973 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/InstallJPAndWCSPlugins.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/InstallJPAndWCSPlugins.php @@ -47,10 +47,10 @@ class InstallJPAndWCSPlugins { * @return Note */ public static function get_note() { - $content = __( 'We noticed that there was a problem during the Jetpack and WooCommerce Shipping & Tax install. Please try again and enjoy all the advantages of having the plugins connected to your store! Sorry for the inconvenience. The "Jetpack" and "WooCommerce Shipping & Tax" plugins will be installed & activated for free.', 'woocommerce-admin' ); + $content = __( 'We noticed that there was a problem during the Jetpack and WooCommerce Shipping & Tax install. Please try again and enjoy all the advantages of having the plugins connected to your store! Sorry for the inconvenience. The "Jetpack" and "WooCommerce Shipping & Tax" plugins will be installed & activated for free.', 'woocommerce' ); $note = new Note(); - $note->set_title( __( 'Uh oh... There was a problem during the Jetpack and WooCommerce Shipping & Tax install. Please try again.', 'woocommerce-admin' ) ); + $note->set_title( __( 'Uh oh... There was a problem during the Jetpack and WooCommerce Shipping & Tax install. Please try again.', 'woocommerce' ) ); $note->set_content( $content ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); @@ -58,7 +58,7 @@ class InstallJPAndWCSPlugins { $note->set_source( 'woocommerce-admin' ); $note->add_action( 'install-jp-and-wcs-plugins', - __( 'Install plugins', 'woocommerce-admin' ), + __( 'Install plugins', 'woocommerce' ), false, Note::E_WC_ADMIN_NOTE_ACTIONED ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/LaunchChecklist.php b/plugins/woocommerce/src/Internal/Admin/Notes/LaunchChecklist.php index 8cf49c884ac..b3b1eff76be 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/LaunchChecklist.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/LaunchChecklist.php @@ -45,16 +45,16 @@ class LaunchChecklist { return; } - $content = __( 'To make sure you never get that sinking "what did I forget" feeling, we\'ve put together the essential pre-launch checklist.', 'woocommerce-admin' ); + $content = __( 'To make sure you never get that sinking "what did I forget" feeling, we\'ve put together the essential pre-launch checklist.', 'woocommerce' ); $note = new Note(); - $note->set_title( __( 'Ready to launch your store?', 'woocommerce-admin' ) ); + $note->set_title( __( 'Ready to launch your store?', 'woocommerce' ) ); $note->set_content( $content ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); - $note->add_action( 'learn-more', __( 'Learn more', 'woocommerce-admin' ), 'https://woocommerce.com/posts/pre-launch-checklist-the-essentials/?utm_source=inbox&utm_medium=product' ); + $note->add_action( 'learn-more', __( 'Learn more', 'woocommerce' ), 'https://woocommerce.com/posts/pre-launch-checklist-the-essentials/?utm_source=inbox&utm_medium=product' ); return $note; } } diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/MagentoMigration.php b/plugins/woocommerce/src/Internal/Admin/Notes/MagentoMigration.php index 288c4dd01d9..33dd0ac50a0 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/MagentoMigration.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/MagentoMigration.php @@ -83,15 +83,15 @@ class MagentoMigration { public static function get_note() { $note = new Note(); - $note->set_title( __( 'How to Migrate from Magento to WooCommerce', 'woocommerce-admin' ) ); - $note->set_content( __( 'Changing platforms might seem like a big hurdle to overcome, but it is easier than you might think to move your products, customers, and orders to WooCommerce. This article will help you with going through this process.', 'woocommerce-admin' ) ); + $note->set_title( __( 'How to Migrate from Magento to WooCommerce', 'woocommerce' ) ); + $note->set_content( __( 'Changing platforms might seem like a big hurdle to overcome, but it is easier than you might think to move your products, customers, and orders to WooCommerce. This article will help you with going through this process.', 'woocommerce' ) ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'learn-more', - __( 'Learn more', 'woocommerce-admin' ), + __( 'Learn more', 'woocommerce' ), 'https://woocommerce.com/posts/how-migrate-from-magento-to-woocommerce/?utm_source=inbox' ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/ManageOrdersOnTheGo.php b/plugins/woocommerce/src/Internal/Admin/Notes/ManageOrdersOnTheGo.php index f6bff38a567..ffaccf6ee28 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/ManageOrdersOnTheGo.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/ManageOrdersOnTheGo.php @@ -47,15 +47,15 @@ class ManageOrdersOnTheGo { $note = new Note(); - $note->set_title( __( 'Manage your orders on the go', 'woocommerce-admin' ) ); - $note->set_content( __( 'Look for orders, customer info, and process refunds in one click with the Woo app.', 'woocommerce-admin' ) ); + $note->set_title( __( 'Manage your orders on the go', 'woocommerce' ) ); + $note->set_content( __( 'Look for orders, customer info, and process refunds in one click with the Woo app.', 'woocommerce' ) ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'learn-more', - __( 'Learn more', 'woocommerce-admin' ), + __( 'Learn more', 'woocommerce' ), 'https://woocommerce.com/mobile/?utm_source=inbox&utm_medium=product' ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/ManageStoreActivityFromHomeScreen.php b/plugins/woocommerce/src/Internal/Admin/Notes/ManageStoreActivityFromHomeScreen.php index 9aa7d918ab9..434190c781e 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/ManageStoreActivityFromHomeScreen.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/ManageStoreActivityFromHomeScreen.php @@ -51,14 +51,14 @@ class ManageStoreActivityFromHomeScreen { $note = new Note(); - $note->set_title( __( 'New! Manage your store activity from the Home screen', 'woocommerce-admin' ) ); - $note->set_content( __( 'Start your day knowing the next steps you need to take with your orders, products, and customer feedback.

Read more about how to use the activity panels on the Home screen.', 'woocommerce-admin' ) ); + $note->set_title( __( 'New! Manage your store activity from the Home screen', 'woocommerce' ) ); + $note->set_content( __( 'Start your day knowing the next steps you need to take with your orders, products, and customer feedback.

Read more about how to use the activity panels on the Home screen.', 'woocommerce' ) ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'learn-more', - __( 'Learn more', 'woocommerce-admin' ), + __( 'Learn more', 'woocommerce' ), 'https://woocommerce.com/document/home-screen/?utm_source=inbox&utm_medium=product', Note::E_WC_ADMIN_NOTE_ACTIONED ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/MarketingJetpack.php b/plugins/woocommerce/src/Internal/Admin/Notes/MarketingJetpack.php index a816e585f05..22f4693e6e3 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/MarketingJetpack.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/MarketingJetpack.php @@ -101,8 +101,8 @@ class MarketingJetpack { */ public static function get_note() { $note = new Note(); - $note->set_title( __( 'Protect your WooCommerce Store with Jetpack Backup.', 'woocommerce-admin' ) ); - $note->set_content( __( 'Store downtime means lost sales. One-click restores get you back online quickly if something goes wrong.', 'woocommerce-admin' ) ); + $note->set_title( __( 'Protect your WooCommerce Store with Jetpack Backup.', 'woocommerce' ) ); + $note->set_content( __( 'Store downtime means lost sales. One-click restores get you back online quickly if something goes wrong.', 'woocommerce' ) ); $note->set_type( Note::E_WC_ADMIN_NOTE_MARKETING ); $note->set_name( self::NOTE_NAME ); $note->set_layout( 'thumbnail' ); @@ -113,7 +113,7 @@ class MarketingJetpack { $note->set_source( 'woocommerce-admin-notes' ); $note->add_action( 'jetpack-backup-woocommerce', - __( 'Get backups', 'woocommerce-admin' ), + __( 'Get backups', 'woocommerce' ), esc_url( 'https://jetpack.com/upgrade/backup-woocommerce/?utm_source=inbox&utm_medium=automattic_referred&utm_campaign=jp_backup_to_woo' ), Note::E_WC_ADMIN_NOTE_ACTIONED ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/MigrateFromShopify.php b/plugins/woocommerce/src/Internal/Admin/Notes/MigrateFromShopify.php index f4634afb80b..eb0b08ff09d 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/MigrateFromShopify.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/MigrateFromShopify.php @@ -62,15 +62,15 @@ class MigrateFromShopify { } $note = new Note(); - $note->set_title( __( 'Do you want to migrate from Shopify to WooCommerce?', 'woocommerce-admin' ) ); - $note->set_content( __( 'Changing eCommerce platforms might seem like a big hurdle to overcome, but it is easier than you might think to move your products, customers, and orders to WooCommerce. This article will help you with going through this process.', 'woocommerce-admin' ) ); + $note->set_title( __( 'Do you want to migrate from Shopify to WooCommerce?', 'woocommerce' ) ); + $note->set_content( __( 'Changing eCommerce platforms might seem like a big hurdle to overcome, but it is easier than you might think to move your products, customers, and orders to WooCommerce. This article will help you with going through this process.', 'woocommerce' ) ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_content_data( (object) array() ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'migrate-from-shopify', - __( 'Learn more', 'woocommerce-admin' ), + __( 'Learn more', 'woocommerce' ), 'https://woocommerce.com/posts/migrate-from-shopify-to-woocommerce/?utm_source=inbox&utm_medium=product', Note::E_WC_ADMIN_NOTE_ACTIONED ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/MobileApp.php b/plugins/woocommerce/src/Internal/Admin/Notes/MobileApp.php index a7ef718afce..358f52e644e 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/MobileApp.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/MobileApp.php @@ -38,16 +38,16 @@ class MobileApp { return; } - $content = __( 'Install the WooCommerce mobile app to manage orders, receive sales notifications, and view key metrics — wherever you are.', 'woocommerce-admin' ); + $content = __( 'Install the WooCommerce mobile app to manage orders, receive sales notifications, and view key metrics — wherever you are.', 'woocommerce' ); $note = new Note(); - $note->set_title( __( 'Install Woo mobile app', 'woocommerce-admin' ) ); + $note->set_title( __( 'Install Woo mobile app', 'woocommerce' ) ); $note->set_content( $content ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); - $note->add_action( 'learn-more', __( 'Learn more', 'woocommerce-admin' ), 'https://woocommerce.com/mobile/?utm_medium=product' ); + $note->add_action( 'learn-more', __( 'Learn more', 'woocommerce' ), 'https://woocommerce.com/mobile/?utm_medium=product' ); return $note; } } diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/NavigationNudge.php b/plugins/woocommerce/src/Internal/Admin/Notes/NavigationNudge.php index d6401839df8..9b6c1b76595 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/NavigationNudge.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/NavigationNudge.php @@ -54,14 +54,14 @@ class NavigationNudge { } $note = new Note(); - $note->set_title( __( 'You now have access to the WooCommerce navigation', 'woocommerce-admin' ) ); - $note->set_content( __( 'We’re introducing a new navigation for a more intuitive and improved user experience. You can enable the beta version of the new experience in the Advanced Settings. Enable it now for your store.', 'woocommerce-admin' ) ); + $note->set_title( __( 'You now have access to the WooCommerce navigation', 'woocommerce' ) ); + $note->set_content( __( 'We’re introducing a new navigation for a more intuitive and improved user experience. You can enable the beta version of the new experience in the Advanced Settings. Enable it now for your store.', 'woocommerce' ) ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'enable-navigation', - __( 'Enable in Settings', 'woocommerce-admin' ), + __( 'Enable in Settings', 'woocommerce' ), admin_url( 'admin.php?page=wc-settings&tab=advanced§ion=features' ) ); return $note; diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/NewSalesRecord.php b/plugins/woocommerce/src/Internal/Admin/Notes/NewSalesRecord.php index 6103be57fa4..9b2c52d6c66 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/NewSalesRecord.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/NewSalesRecord.php @@ -110,7 +110,7 @@ class NewSalesRecord { $content = sprintf( /* translators: 1 and 4: Date (e.g. October 16th), 2 and 3: Amount (e.g. $160.00) */ - __( 'Woohoo, %1$s was your record day for sales! Net sales was %2$s beating the previous record of %3$s set on %4$s.', 'woocommerce-admin' ), + __( 'Woohoo, %1$s was your record day for sales! Net sales was %2$s beating the previous record of %3$s set on %4$s.', 'woocommerce' ), $formatted_yesterday, $formatted_total, $formatted_record_amt, @@ -131,13 +131,13 @@ class NewSalesRecord { // And now, create our new note. $note = new Note(); - $note->set_title( __( 'New sales record!', 'woocommerce-admin' ) ); + $note->set_title( __( 'New sales record!', 'woocommerce' ) ); $note->set_content( $content ); $note->set_content_data( $content_data ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); - $note->add_action( 'view-report', __( 'View report', 'woocommerce-admin' ), $report_url ); + $note->add_action( 'view-report', __( 'View report', 'woocommerce' ), $report_url ); $note->save(); } } diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/OnboardingPayments.php b/plugins/woocommerce/src/Internal/Admin/Notes/OnboardingPayments.php index e9cdc3abd4c..37662b0ce32 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/OnboardingPayments.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/OnboardingPayments.php @@ -50,15 +50,15 @@ class OnboardingPayments { } $note = new Note(); - $note->set_title( __( 'Start accepting payments on your store!', 'woocommerce-admin' ) ); - $note->set_content( __( 'Take payments with the provider that’s right for you - choose from 100+ payment gateways for WooCommerce.', 'woocommerce-admin' ) ); + $note->set_title( __( 'Start accepting payments on your store!', 'woocommerce' ) ); + $note->set_content( __( 'Take payments with the provider that’s right for you - choose from 100+ payment gateways for WooCommerce.', 'woocommerce' ) ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_content_data( (object) array() ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'view-payment-gateways', - __( 'Learn more', 'woocommerce-admin' ), + __( 'Learn more', 'woocommerce' ), 'https://woocommerce.com/product-category/woocommerce-extensions/payment-gateways/?utm_medium=product', Note::E_WC_ADMIN_NOTE_ACTIONED, true diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/OnlineClothingStore.php b/plugins/woocommerce/src/Internal/Admin/Notes/OnlineClothingStore.php index 17f219cfa71..968234a82d7 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/OnlineClothingStore.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/OnlineClothingStore.php @@ -81,15 +81,15 @@ class OnlineClothingStore { } $note = new Note(); - $note->set_title( __( 'Start your online clothing store', 'woocommerce-admin' ) ); - $note->set_content( __( 'Starting a fashion website is exciting but it may seem overwhelming as well. In this article, we\'ll walk you through the setup process, teach you to create successful product listings, and show you how to market to your ideal audience.', 'woocommerce-admin' ) ); + $note->set_title( __( 'Start your online clothing store', 'woocommerce' ) ); + $note->set_content( __( 'Starting a fashion website is exciting but it may seem overwhelming as well. In this article, we\'ll walk you through the setup process, teach you to create successful product listings, and show you how to market to your ideal audience.', 'woocommerce' ) ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_content_data( (object) array() ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'online-clothing-store', - __( 'Learn more', 'woocommerce-admin' ), + __( 'Learn more', 'woocommerce' ), 'https://woocommerce.com/posts/starting-an-online-clothing-store/?utm_source=inbox&utm_medium=product', Note::E_WC_ADMIN_NOTE_ACTIONED ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/OrderMilestones.php b/plugins/woocommerce/src/Internal/Admin/Notes/OrderMilestones.php index 5fda1891432..f3423fd43a6 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/OrderMilestones.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/OrderMilestones.php @@ -182,7 +182,7 @@ class OrderMilestones { public function get_note_title_for_milestone( $milestone ) { switch ( $milestone ) { case 1: - return __( 'First order received', 'woocommerce-admin' ); + return __( 'First order received', 'woocommerce' ); case 10: case 100: case 250: @@ -194,7 +194,7 @@ class OrderMilestones { case 1000000: return sprintf( /* translators: Number of orders processed. */ - __( 'Congratulations on processing %s orders!', 'woocommerce-admin' ), + __( 'Congratulations on processing %s orders!', 'woocommerce' ), wc_format_decimal( $milestone ) ); default: @@ -211,9 +211,9 @@ class OrderMilestones { public function get_note_content_for_milestone( $milestone ) { switch ( $milestone ) { case 1: - return __( 'Congratulations on getting your first order! Now is a great time to learn how to manage your orders.', 'woocommerce-admin' ); + return __( 'Congratulations on getting your first order! Now is a great time to learn how to manage your orders.', 'woocommerce' ); case 10: - return __( "You've hit the 10 orders milestone! Look at you go. Browse some WooCommerce success stories for inspiration.", 'woocommerce-admin' ); + return __( "You've hit the 10 orders milestone! Look at you go. Browse some WooCommerce success stories for inspiration.", 'woocommerce' ); case 100: case 250: case 500: @@ -222,7 +222,7 @@ class OrderMilestones { case 10000: case 500000: case 1000000: - return __( 'Another order milestone! Take a look at your Orders Report to review your orders to date.', 'woocommerce-admin' ); + return __( 'Another order milestone! Take a look at your Orders Report to review your orders to date.', 'woocommerce' ); default: return ''; } @@ -239,13 +239,13 @@ class OrderMilestones { case 1: return array( 'name' => 'learn-more', - 'label' => __( 'Learn more', 'woocommerce-admin' ), + 'label' => __( 'Learn more', 'woocommerce' ), 'query' => 'https://woocommerce.com/document/managing-orders/?utm_source=inbox&utm_medium=product', ); case 10: return array( 'name' => 'browse', - 'label' => __( 'Browse', 'woocommerce-admin' ), + 'label' => __( 'Browse', 'woocommerce' ), 'query' => 'https://woocommerce.com/success-stories/?utm_source=inbox&utm_medium=product', ); case 100: @@ -258,7 +258,7 @@ class OrderMilestones { case 1000000: return array( 'name' => 'review-orders', - 'label' => __( 'Review your orders', 'woocommerce-admin' ), + 'label' => __( 'Review your orders', 'woocommerce' ), 'query' => '?page=wc-admin&path=/analytics/orders', ); default: diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/PaymentsRemindMeLater.php b/plugins/woocommerce/src/Internal/Admin/Notes/PaymentsRemindMeLater.php index 0e8fbd6b1b2..cbc245f7ea1 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/PaymentsRemindMeLater.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/PaymentsRemindMeLater.php @@ -68,16 +68,16 @@ class PaymentsRemindMeLater { if ( ! self::should_display_note() ) { return; } - $content = __( 'Save up to $800 in fees by managing transactions with WooCommerce Payments. With WooCommerce Payments, you can securely accept major cards, Apple Pay, and payments in over 100 currencies.', 'woocommerce-admin' ); + $content = __( 'Save up to $800 in fees by managing transactions with WooCommerce Payments. With WooCommerce Payments, you can securely accept major cards, Apple Pay, and payments in over 100 currencies.', 'woocommerce' ); $note = new Note(); - $note->set_title( __( 'Save big with WooCommerce Payments', 'woocommerce-admin' ) ); + $note->set_title( __( 'Save big with WooCommerce Payments', 'woocommerce' ) ); $note->set_content( $content ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); - $note->add_action( 'learn-more', __( 'Learn more', 'woocommerce-admin' ), admin_url( 'admin.php?page=wc-admin&path=/wc-pay-welcome-page' ) ); + $note->add_action( 'learn-more', __( 'Learn more', 'woocommerce' ), admin_url( 'admin.php?page=wc-admin&path=/wc-pay-welcome-page' ) ); return $note; } } diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/PerformanceOnMobile.php b/plugins/woocommerce/src/Internal/Admin/Notes/PerformanceOnMobile.php index 9560ed8105a..bc82aa78238 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/PerformanceOnMobile.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/PerformanceOnMobile.php @@ -51,15 +51,15 @@ class PerformanceOnMobile { $note = new Note(); - $note->set_title( __( 'Track your store performance on mobile', 'woocommerce-admin' ) ); - $note->set_content( __( 'Monitor your sales and high performing products with the Woo app.', 'woocommerce-admin' ) ); + $note->set_title( __( 'Track your store performance on mobile', 'woocommerce' ) ); + $note->set_content( __( 'Monitor your sales and high performing products with the Woo app.', 'woocommerce' ) ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'learn-more', - __( 'Learn more', 'woocommerce-admin' ), + __( 'Learn more', 'woocommerce' ), 'https://woocommerce.com/mobile/?utm_source=inbox&utm_medium=product' ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/PersonalizeStore.php b/plugins/woocommerce/src/Internal/Admin/Notes/PersonalizeStore.php index 37f20c741da..eda59e548e5 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/PersonalizeStore.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/PersonalizeStore.php @@ -48,16 +48,16 @@ class PersonalizeStore { return; } - $content = __( 'The homepage is one of the most important entry points in your store. When done right it can lead to higher conversions and engagement. Don\'t forget to personalize the homepage that we created for your store during the onboarding.', 'woocommerce-admin' ); + $content = __( 'The homepage is one of the most important entry points in your store. When done right it can lead to higher conversions and engagement. Don\'t forget to personalize the homepage that we created for your store during the onboarding.', 'woocommerce' ); $note = new Note(); - $note->set_title( __( 'Personalize your store\'s homepage', 'woocommerce-admin' ) ); + $note->set_title( __( 'Personalize your store\'s homepage', 'woocommerce' ) ); $note->set_content( $content ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); - $note->add_action( 'personalize-homepage', __( 'Personalize homepage', 'woocommerce-admin' ), admin_url( 'post.php?post=' . $homepage_id . '&action=edit' ), Note::E_WC_ADMIN_NOTE_ACTIONED ); + $note->add_action( 'personalize-homepage', __( 'Personalize homepage', 'woocommerce' ), admin_url( 'post.php?post=' . $homepage_id . '&action=edit' ), Note::E_WC_ADMIN_NOTE_ACTIONED ); return $note; } } diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/RealTimeOrderAlerts.php b/plugins/woocommerce/src/Internal/Admin/Notes/RealTimeOrderAlerts.php index 8c6b4ce6a0b..b63c53edcd3 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/RealTimeOrderAlerts.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/RealTimeOrderAlerts.php @@ -42,16 +42,16 @@ class RealTimeOrderAlerts { return; } - $content = __( 'Get notifications about store activity, including new orders and product reviews directly on your mobile devices with the Woo app.', 'woocommerce-admin' ); + $content = __( 'Get notifications about store activity, including new orders and product reviews directly on your mobile devices with the Woo app.', 'woocommerce' ); $note = new Note(); - $note->set_title( __( 'Get real-time order alerts anywhere', 'woocommerce-admin' ) ); + $note->set_title( __( 'Get real-time order alerts anywhere', 'woocommerce' ) ); $note->set_content( $content ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); - $note->add_action( 'learn-more', __( 'Learn more', 'woocommerce-admin' ), 'https://woocommerce.com/mobile/?utm_source=inbox&utm_medium=product' ); + $note->add_action( 'learn-more', __( 'Learn more', 'woocommerce' ), 'https://woocommerce.com/mobile/?utm_source=inbox&utm_medium=product' ); return $note; } } diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/SellingOnlineCourses.php b/plugins/woocommerce/src/Internal/Admin/Notes/SellingOnlineCourses.php index c1ca168fb00..a00defa4256 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/SellingOnlineCourses.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/SellingOnlineCourses.php @@ -67,15 +67,15 @@ class SellingOnlineCourses { public static function get_note() { $note = new Note(); - $note->set_title( __( 'Do you want to sell online courses?', 'woocommerce-admin' ) ); - $note->set_content( __( 'Online courses are a great solution for any business that can teach a new skill. Since courses don’t require physical product development or shipping, they’re affordable, fast to create, and can generate passive income for years to come. In this article, we provide you more information about selling courses using WooCommerce.', 'woocommerce-admin' ) ); + $note->set_title( __( 'Do you want to sell online courses?', 'woocommerce' ) ); + $note->set_content( __( 'Online courses are a great solution for any business that can teach a new skill. Since courses don’t require physical product development or shipping, they’re affordable, fast to create, and can generate passive income for years to come. In this article, we provide you more information about selling courses using WooCommerce.', 'woocommerce' ) ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_MARKETING ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'learn-more', - __( 'Learn more', 'woocommerce-admin' ), + __( 'Learn more', 'woocommerce' ), 'https://woocommerce.com/posts/how-to-sell-online-courses-wordpress/?utm_source=inbox&utm_medium=product', Note::E_WC_ADMIN_NOTE_ACTIONED ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/SetUpAdditionalPaymentTypes.php b/plugins/woocommerce/src/Internal/Admin/Notes/SetUpAdditionalPaymentTypes.php index c53ea8f157f..e391820dbab 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/SetUpAdditionalPaymentTypes.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/SetUpAdditionalPaymentTypes.php @@ -91,11 +91,11 @@ class SetUpAdditionalPaymentTypes { * @return Note */ public static function get_note() { - $content = __( 'Set up additional payment providers, using third-party services or other methods.', 'woocommerce-admin' ); + $content = __( 'Set up additional payment providers, using third-party services or other methods.', 'woocommerce' ); $note = new Note(); - $note->set_title( __( 'Set up additional payment providers', 'woocommerce-admin' ) ); + $note->set_title( __( 'Set up additional payment providers', 'woocommerce' ) ); $note->set_content( $content ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); @@ -103,7 +103,7 @@ class SetUpAdditionalPaymentTypes { $note->set_source( 'woocommerce-admin' ); $note->add_action( 'set-up-payments', - __( 'Set up payments', 'woocommerce-admin' ), + __( 'Set up payments', 'woocommerce' ), wc_admin_url( '&task=payments' ), Note::E_WC_ADMIN_NOTE_UNACTIONED, true diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/TestCheckout.php b/plugins/woocommerce/src/Internal/Admin/Notes/TestCheckout.php index 6cbd3ee766a..1fb197bc9b8 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/TestCheckout.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/TestCheckout.php @@ -89,16 +89,16 @@ class TestCheckout { return; } - $content = __( 'Make sure that your checkout is working properly before you launch your store. Go through your checkout process in its entirety: from adding a product to your cart, choosing a shipping location, and making a payment.', 'woocommerce-admin' ); + $content = __( 'Make sure that your checkout is working properly before you launch your store. Go through your checkout process in its entirety: from adding a product to your cart, choosing a shipping location, and making a payment.', 'woocommerce' ); $note = new Note(); - $note->set_title( __( 'Don\'t forget to test your checkout', 'woocommerce-admin' ) ); + $note->set_title( __( 'Don\'t forget to test your checkout', 'woocommerce' ) ); $note->set_content( $content ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); - $note->add_action( 'test-checkout', __( 'Test checkout', 'woocommerce-admin' ), wc_get_page_permalink( 'shop' ) ); + $note->add_action( 'test-checkout', __( 'Test checkout', 'woocommerce' ), wc_get_page_permalink( 'shop' ) ); return $note; } } diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/TrackingOptIn.php b/plugins/woocommerce/src/Internal/Admin/Notes/TrackingOptIn.php index 13830e4f4d8..5273703f27c 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/TrackingOptIn.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/TrackingOptIn.php @@ -52,7 +52,7 @@ class TrackingOptIn { /* translators: 1: open link to WooCommerce.com settings, 2: open link to WooCommerce.com tracking documentation, 3: close link tag. */ $content_format = __( 'Gathering usage data allows us to improve WooCommerce. Your store will be considered as we evaluate new features, judge the quality of an update, or determine if an improvement makes sense. You can always visit the %1$sSettings%3$s and choose to stop sharing data. %2$sRead more%3$s about what data we collect.', - 'woocommerce-admin' + 'woocommerce' ); $note_content = sprintf( @@ -63,13 +63,13 @@ class TrackingOptIn { ); $note = new Note(); - $note->set_title( __( 'Help WooCommerce improve with usage tracking', 'woocommerce-admin' ) ); + $note->set_title( __( 'Help WooCommerce improve with usage tracking', 'woocommerce' ) ); $note->set_content( $note_content ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); - $note->add_action( 'tracking-opt-in', __( 'Activate usage tracking', 'woocommerce-admin' ), false, Note::E_WC_ADMIN_NOTE_ACTIONED, true ); + $note->add_action( 'tracking-opt-in', __( 'Activate usage tracking', 'woocommerce' ), false, Note::E_WC_ADMIN_NOTE_ACTIONED, true ); return $note; } diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/UnsecuredReportFiles.php b/plugins/woocommerce/src/Internal/Admin/Notes/UnsecuredReportFiles.php index 2465be23af3..05829e5d6a0 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/UnsecuredReportFiles.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/UnsecuredReportFiles.php @@ -32,11 +32,11 @@ class UnsecuredReportFiles { */ public static function get_note() { $note = new Note(); - $note->set_title( __( 'Potentially unsecured files were found in your uploads directory', 'woocommerce-admin' ) ); + $note->set_title( __( 'Potentially unsecured files were found in your uploads directory', 'woocommerce' ) ); $note->set_content( sprintf( /* translators: 1: opening analytics docs link tag. 2: closing link tag */ - __( 'Files that may contain %1$sstore analytics%2$s reports were found in your uploads directory - we recommend assessing and deleting any such files.', 'woocommerce-admin' ), + __( 'Files that may contain %1$sstore analytics%2$s reports were found in your uploads directory - we recommend assessing and deleting any such files.', 'woocommerce' ), '', '' ) @@ -47,14 +47,14 @@ class UnsecuredReportFiles { $note->set_source( 'woocommerce-admin' ); $note->add_action( 'learn-more', - __( 'Learn more', 'woocommerce-admin' ), + __( 'Learn more', 'woocommerce' ), 'https://developer.woocommerce.com/?p=10410', Note::E_WC_ADMIN_NOTE_UNACTIONED, true ); $note->add_action( 'dismiss', - __( 'Dismiss', 'woocommerce-admin' ), + __( 'Dismiss', 'woocommerce' ), wc_admin_url(), Note::E_WC_ADMIN_NOTE_ACTIONED, false diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/UpdateStoreDetails.php b/plugins/woocommerce/src/Internal/Admin/Notes/UpdateStoreDetails.php index 12e1d3b86c0..f200333753b 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/UpdateStoreDetails.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/UpdateStoreDetails.php @@ -43,15 +43,15 @@ class UpdateStoreDetails { } $note = new Note(); - $note->set_title( __( 'Edit your store details if you need to', 'woocommerce-admin' ) ); - $note->set_content( __( 'Nice work completing your store profile! You can always go back and edit the details you just shared, as needed.', 'woocommerce-admin' ) ); + $note->set_title( __( 'Edit your store details if you need to', 'woocommerce' ) ); + $note->set_content( __( 'Nice work completing your store profile! You can always go back and edit the details you just shared, as needed.', 'woocommerce' ) ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_content_data( (object) array() ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'update-store-details', - __( 'Update store details', 'woocommerce-admin' ), + __( 'Update store details', 'woocommerce' ), wc_admin_url( '&path=/setup-wizard' ) ); diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/WelcomeToWooCommerceForStoreUsers.php b/plugins/woocommerce/src/Internal/Admin/Notes/WelcomeToWooCommerceForStoreUsers.php index 5b27d80c3f4..494ec3ad670 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/WelcomeToWooCommerceForStoreUsers.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/WelcomeToWooCommerceForStoreUsers.php @@ -43,14 +43,14 @@ class WelcomeToWooCommerceForStoreUsers { } $note = new Note(); - $note->set_title( __( 'Welcome to your new store management experience', 'woocommerce-admin' ) ); - $note->set_content( __( "We've designed your navigation and home screen to help you focus on the things that matter most in managing your online store.", 'woocommerce-admin' ) ); + $note->set_title( __( 'Welcome to your new store management experience', 'woocommerce' ) ); + $note->set_content( __( "We've designed your navigation and home screen to help you focus on the things that matter most in managing your online store.", 'woocommerce' ) ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'learn-more', - __( 'Learn more', 'woocommerce-admin' ), + __( 'Learn more', 'woocommerce' ), 'https://wordpress.com/support/new-woocommerce-experience-on-wordpress-dot-com/"', Note::E_WC_ADMIN_NOTE_ACTIONED, true diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/WooCommercePayments.php b/plugins/woocommerce/src/Internal/Admin/Notes/WooCommercePayments.php index 1f581cc98b1..cb52aaa509f 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/WooCommercePayments.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/WooCommercePayments.php @@ -103,13 +103,13 @@ class WooCommercePayments { */ public static function get_note() { $note = new Note(); - $note->set_title( __( 'Try the new way to get paid', 'woocommerce-admin' ) ); + $note->set_title( __( 'Try the new way to get paid', 'woocommerce' ) ); $note->set_content( - __( 'Securely accept credit and debit cards on your site. Manage transactions without leaving your WordPress dashboard. Only with WooCommerce Payments.', 'woocommerce-admin' ) . + __( 'Securely accept credit and debit cards on your site. Manage transactions without leaving your WordPress dashboard. Only with WooCommerce Payments.', 'woocommerce' ) . '

' . sprintf( /* translators: 1: opening link tag, 2: closing tag */ - __( 'By clicking "Get started", you agree to our %1$sTerms of Service%2$s', 'woocommerce-admin' ), + __( 'By clicking "Get started", you agree to our %1$sTerms of Service%2$s', 'woocommerce' ), '', '' ) @@ -118,8 +118,8 @@ class WooCommercePayments { $note->set_type( Note::E_WC_ADMIN_NOTE_MARKETING ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); - $note->add_action( 'learn-more', __( 'Learn more', 'woocommerce-admin' ), 'https://woocommerce.com/payments/?utm_medium=product', Note::E_WC_ADMIN_NOTE_UNACTIONED ); - $note->add_action( 'get-started', __( 'Get started', 'woocommerce-admin' ), wc_admin_url( '&action=setup-woocommerce-payments' ), Note::E_WC_ADMIN_NOTE_ACTIONED, true ); + $note->add_action( 'learn-more', __( 'Learn more', 'woocommerce' ), 'https://woocommerce.com/payments/?utm_medium=product', Note::E_WC_ADMIN_NOTE_UNACTIONED ); + $note->add_action( 'get-started', __( 'Get started', 'woocommerce' ), wc_admin_url( '&action=setup-woocommerce-payments' ), Note::E_WC_ADMIN_NOTE_ACTIONED, true ); $note->add_nonce_to_action( 'get-started', 'setup-woocommerce-payments', '' ); // Create the note as "actioned" if the plugin is already installed. diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/WooCommerceSubscriptions.php b/plugins/woocommerce/src/Internal/Admin/Notes/WooCommerceSubscriptions.php index fd96c10f994..aa272e42e40 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/WooCommerceSubscriptions.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/WooCommerceSubscriptions.php @@ -44,15 +44,15 @@ class WooCommerceSubscriptions { } $note = new Note(); - $note->set_title( __( 'Do you need more info about WooCommerce Subscriptions?', 'woocommerce-admin' ) ); - $note->set_content( __( 'WooCommerce Subscriptions allows you to introduce a variety of subscriptions for physical or virtual products and services. Create product-of-the-month clubs, weekly service subscriptions or even yearly software billing packages. Add sign-up fees, offer free trials, or set expiration periods.', 'woocommerce-admin' ) ); + $note->set_title( __( 'Do you need more info about WooCommerce Subscriptions?', 'woocommerce' ) ); + $note->set_content( __( 'WooCommerce Subscriptions allows you to introduce a variety of subscriptions for physical or virtual products and services. Create product-of-the-month clubs, weekly service subscriptions or even yearly software billing packages. Add sign-up fees, offer free trials, or set expiration periods.', 'woocommerce' ) ); $note->set_type( Note::E_WC_ADMIN_NOTE_MARKETING ); $note->set_name( self::NOTE_NAME ); $note->set_content_data( (object) array() ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'learn-more', - __( 'Learn More', 'woocommerce-admin' ), + __( 'Learn More', 'woocommerce' ), 'https://woocommerce.com/products/woocommerce-subscriptions/?utm_source=inbox&utm_medium=product', Note::E_WC_ADMIN_NOTE_UNACTIONED, true diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/WooSubscriptionsNotes.php b/plugins/woocommerce/src/Internal/Admin/Notes/WooSubscriptionsNotes.php index 4782d1e1388..57547949150 100644 --- a/plugins/woocommerce/src/Internal/Admin/Notes/WooSubscriptionsNotes.php +++ b/plugins/woocommerce/src/Internal/Admin/Notes/WooSubscriptionsNotes.php @@ -182,15 +182,15 @@ class WooSubscriptionsNotes { */ public function add_no_connection_note() { $note = new Note(); - $note->set_title( __( 'Connect to WooCommerce.com', 'woocommerce-admin' ) ); - $note->set_content( __( 'Connect to get important product notifications and updates.', 'woocommerce-admin' ) ); + $note->set_title( __( 'Connect to WooCommerce.com', 'woocommerce' ) ); + $note->set_content( __( 'Connect to get important product notifications and updates.', 'woocommerce' ) ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::CONNECTION_NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'connect', - __( 'Connect', 'woocommerce-admin' ), + __( 'Connect', 'woocommerce' ), '?page=wc-addons§ion=helper', Note::E_WC_ADMIN_NOTE_UNACTIONED ); @@ -311,13 +311,13 @@ class WooSubscriptionsNotes { $note_title = sprintf( /* translators: name of the extension subscription expiring soon */ - __( '%s subscription expiring soon', 'woocommerce-admin' ), + __( '%s subscription expiring soon', 'woocommerce' ), $product_name ); $note_content = sprintf( /* translators: number of days until the subscription expires */ - __( 'Your subscription expires in %d days. Enable autorenew to avoid losing updates and access to support.', 'woocommerce-admin' ), + __( 'Your subscription expires in %d days. Enable autorenew to avoid losing updates and access to support.', 'woocommerce' ), $days_until_expiration ); @@ -340,7 +340,7 @@ class WooSubscriptionsNotes { $note->clear_actions(); $note->add_action( 'enable-autorenew', - __( 'Enable Autorenew', 'woocommerce-admin' ), + __( 'Enable Autorenew', 'woocommerce' ), 'https://woocommerce.com/my-account/my-subscriptions/?utm_medium=product' ); $note->set_content( $note_content ); @@ -372,13 +372,13 @@ class WooSubscriptionsNotes { $note_title = sprintf( /* translators: name of the extension subscription that expired */ - __( '%s subscription expired', 'woocommerce-admin' ), + __( '%s subscription expired', 'woocommerce' ), $product_name ); $note_content = sprintf( /* translators: date the subscription expired, e.g. Jun 7th 2018 */ - __( 'Your subscription expired on %s. Get a new subscription to continue receiving updates and access to support.', 'woocommerce-admin' ), + __( 'Your subscription expired on %s. Get a new subscription to continue receiving updates and access to support.', 'woocommerce' ), $expires_date ); @@ -403,7 +403,7 @@ class WooSubscriptionsNotes { $note->clear_actions(); $note->add_action( 'renew-subscription', - __( 'Renew Subscription', 'woocommerce-admin' ), + __( 'Renew Subscription', 'woocommerce' ), $product_page ); $note->save(); diff --git a/plugins/woocommerce/src/Internal/Admin/Onboarding/OnboardingHelper.php b/plugins/woocommerce/src/Internal/Admin/Onboarding/OnboardingHelper.php index c4f7ce48bda..bce1e76d562 100644 --- a/plugins/woocommerce/src/Internal/Admin/Onboarding/OnboardingHelper.php +++ b/plugins/woocommerce/src/Internal/Admin/Onboarding/OnboardingHelper.php @@ -70,7 +70,7 @@ class OnboardingHelper { // Add the new help tab. $help_tab = array( - 'title' => __( 'Setup wizard', 'woocommerce-admin' ), + 'title' => __( 'Setup wizard', 'woocommerce' ), 'id' => 'woocommerce_onboard_tab', ); @@ -78,26 +78,26 @@ class OnboardingHelper { $extended_list = TaskLists::get_list( 'extended' ); if ( $setup_list ) { - $help_tab['content'] = '

' . __( 'WooCommerce Onboarding', 'woocommerce-admin' ) . '

'; + $help_tab['content'] = '

' . __( 'WooCommerce Onboarding', 'woocommerce' ) . '

'; - $help_tab['content'] .= '

' . __( 'Profile Setup Wizard', 'woocommerce-admin' ) . '

'; - $help_tab['content'] .= '

' . __( 'If you need to access the setup wizard again, please click on the button below.', 'woocommerce-admin' ) . '

' . - '

' . __( 'Setup wizard', 'woocommerce-admin' ) . '

'; + $help_tab['content'] .= '

' . __( 'Profile Setup Wizard', 'woocommerce' ) . '

'; + $help_tab['content'] .= '

' . __( 'If you need to access the setup wizard again, please click on the button below.', 'woocommerce' ) . '

' . + '

' . __( 'Setup wizard', 'woocommerce' ) . '

'; - $help_tab['content'] .= '

' . __( 'Task List', 'woocommerce-admin' ) . '

'; - $help_tab['content'] .= '

' . __( 'If you need to enable or disable the task lists, please click on the button below.', 'woocommerce-admin' ) . '

' . + $help_tab['content'] .= '

' . __( 'Task List', 'woocommerce' ) . '

'; + $help_tab['content'] .= '

' . __( 'If you need to enable or disable the task lists, please click on the button below.', 'woocommerce' ) . '

' . ( $setup_list->is_hidden() - ? '

' . __( 'Enable', 'woocommerce-admin' ) . '

' - : '

' . __( 'Disable', 'woocommerce-admin' ) . '

' + ? '

' . __( 'Enable', 'woocommerce' ) . '

' + : '

' . __( 'Disable', 'woocommerce' ) . '

' ); } if ( $extended_list ) { - $help_tab['content'] .= '

' . __( 'Extended task List', 'woocommerce-admin' ) . '

'; - $help_tab['content'] .= '

' . __( 'If you need to enable or disable the extended task lists, please click on the button below.', 'woocommerce-admin' ) . '

' . + $help_tab['content'] .= '

' . __( 'Extended task List', 'woocommerce' ) . '

'; + $help_tab['content'] .= '

' . __( 'If you need to enable or disable the extended task lists, please click on the button below.', 'woocommerce' ) . '

' . ( $extended_list->is_hidden() - ? '

' . __( 'Enable', 'woocommerce-admin' ) . '

' - : '

' . __( 'Disable', 'woocommerce-admin' ) . '

' + ? '

' . __( 'Enable', 'woocommerce' ) . '

' + : '

' . __( 'Disable', 'woocommerce' ) . '

' ); } diff --git a/plugins/woocommerce/src/Internal/Admin/Onboarding/OnboardingIndustries.php b/plugins/woocommerce/src/Internal/Admin/Onboarding/OnboardingIndustries.php index 71b8fa5f1c6..16da26059fd 100644 --- a/plugins/woocommerce/src/Internal/Admin/Onboarding/OnboardingIndustries.php +++ b/plugins/woocommerce/src/Internal/Admin/Onboarding/OnboardingIndustries.php @@ -28,44 +28,44 @@ class OnboardingIndustries { 'woocommerce_admin_onboarding_industries', array( 'fashion-apparel-accessories' => array( - 'label' => __( 'Fashion, apparel, and accessories', 'woocommerce-admin' ), + 'label' => __( 'Fashion, apparel, and accessories', 'woocommerce' ), 'use_description' => false, 'description_label' => '', ), 'health-beauty' => array( - 'label' => __( 'Health and beauty', 'woocommerce-admin' ), + 'label' => __( 'Health and beauty', 'woocommerce' ), 'use_description' => false, 'description_label' => '', ), 'electronics-computers' => array( - 'label' => __( 'Electronics and computers', 'woocommerce-admin' ), + 'label' => __( 'Electronics and computers', 'woocommerce' ), 'use_description' => false, 'description_label' => '', ), 'food-drink' => array( - 'label' => __( 'Food and drink', 'woocommerce-admin' ), + 'label' => __( 'Food and drink', 'woocommerce' ), 'use_description' => false, 'description_label' => '', ), 'home-furniture-garden' => array( - 'label' => __( 'Home, furniture, and garden', 'woocommerce-admin' ), + 'label' => __( 'Home, furniture, and garden', 'woocommerce' ), 'use_description' => false, 'description_label' => '', ), 'cbd-other-hemp-derived-products' => array( - 'label' => __( 'CBD and other hemp-derived products', 'woocommerce-admin' ), + 'label' => __( 'CBD and other hemp-derived products', 'woocommerce' ), 'use_description' => false, 'description_label' => '', ), 'education-and-learning' => array( - 'label' => __( 'Education and learning', 'woocommerce-admin' ), + 'label' => __( 'Education and learning', 'woocommerce' ), 'use_description' => false, 'description_label' => '', ), 'other' => array( - 'label' => __( 'Other', 'woocommerce-admin' ), + 'label' => __( 'Other', 'woocommerce' ), 'use_description' => true, - 'description_label' => __( 'Description', 'woocommerce-admin' ), + 'description_label' => __( 'Description', 'woocommerce' ), ), ) ); diff --git a/plugins/woocommerce/src/Internal/Admin/Onboarding/OnboardingProducts.php b/plugins/woocommerce/src/Internal/Admin/Onboarding/OnboardingProducts.php index 6b8e6014d38..f707f733f86 100644 --- a/plugins/woocommerce/src/Internal/Admin/Onboarding/OnboardingProducts.php +++ b/plugins/woocommerce/src/Internal/Admin/Onboarding/OnboardingProducts.php @@ -31,29 +31,29 @@ class OnboardingProducts { public static function get_allowed_product_types() { $products = array( 'physical' => array( - 'label' => __( 'Physical products', 'woocommerce-admin' ), + 'label' => __( 'Physical products', 'woocommerce' ), 'default' => true, ), 'downloads' => array( - 'label' => __( 'Downloads', 'woocommerce-admin' ), + 'label' => __( 'Downloads', 'woocommerce' ), ), 'subscriptions' => array( - 'label' => __( 'Subscriptions', 'woocommerce-admin' ), + 'label' => __( 'Subscriptions', 'woocommerce' ), ), 'memberships' => array( - 'label' => __( 'Memberships', 'woocommerce-admin' ), + 'label' => __( 'Memberships', 'woocommerce' ), 'product' => 958589, ), 'bookings' => array( - 'label' => __( 'Bookings', 'woocommerce-admin' ), + 'label' => __( 'Bookings', 'woocommerce' ), 'product' => 390890, ), 'product-bundles' => array( - 'label' => __( 'Bundles', 'woocommerce-admin' ), + 'label' => __( 'Bundles', 'woocommerce' ), 'product' => 18716, ), 'product-add-ons' => array( - 'label' => __( 'Customizable products', 'woocommerce-admin' ), + 'label' => __( 'Customizable products', 'woocommerce' ), 'product' => 18618, ), ); @@ -116,7 +116,7 @@ class OnboardingProducts { $product_data[ $key ]['slug'] = strtolower( preg_replace( '~[^\pL\d]+~u', '-', $products[ $product_type['product'] ]->slug ) ); } elseif ( isset( $product_type['product'] ) ) { /* translators: site currency symbol (used to show that the product costs money) */ - $product_data[ $key ]['label'] .= sprintf( __( ' — %s', 'woocommerce-admin' ), html_entity_decode( get_woocommerce_currency_symbol() ) ); + $product_data[ $key ]['label'] .= sprintf( __( ' — %s', 'woocommerce' ), html_entity_decode( get_woocommerce_currency_symbol() ) ); } } diff --git a/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php b/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php index f10e0cb51c7..6ec1c56dccb 100644 --- a/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php +++ b/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php @@ -22,7 +22,7 @@ class DefaultFreeExtensions { $bundles = [ [ 'key' => 'obw/basics', - 'title' => __( 'Get the basics', 'woocommerce-admin' ), + 'title' => __( 'Get the basics', 'woocommerce' ), 'plugins' => [ self::get_plugin( 'woocommerce-payments' ), self::get_plugin( 'woocommerce-services:shipping' ), @@ -32,7 +32,7 @@ class DefaultFreeExtensions { ], [ 'key' => 'obw/grow', - 'title' => __( 'Grow your store', 'woocommerce-admin' ), + 'title' => __( 'Grow your store', 'woocommerce' ), 'plugins' => [ self::get_plugin( 'mailpoet' ), self::get_plugin( 'google-listings-and-ads' ), @@ -40,7 +40,7 @@ class DefaultFreeExtensions { ], [ 'key' => 'task-list/reach', - 'title' => __( 'Reach out to customers', 'woocommerce-admin' ), + 'title' => __( 'Reach out to customers', 'woocommerce' ), 'plugins' => [ self::get_plugin( 'mailpoet:alt' ), self::get_plugin( 'mailchimp-for-woocommerce' ), @@ -49,7 +49,7 @@ class DefaultFreeExtensions { ], [ 'key' => 'task-list/grow', - 'title' => __( 'Grow your store', 'woocommerce-admin' ), + 'title' => __( 'Grow your store', 'woocommerce' ), 'plugins' => [ self::get_plugin( 'google-listings-and-ads:alt' ), ], @@ -69,10 +69,10 @@ class DefaultFreeExtensions { public static function get_plugin( $slug ) { $plugins = array( 'google-listings-and-ads' => [ - 'name' => __( 'Google Listings & Ads', 'woocommerce-admin' ), + 'name' => __( 'Google Listings & Ads', 'woocommerce' ), 'description' => sprintf( /* translators: 1: opening product link tag. 2: closing link tag */ - __( 'Drive sales with %1$sGoogle Listings and Ads%2$s', 'woocommerce-admin' ), + __( 'Drive sales with %1$sGoogle Listings and Ads%2$s', 'woocommerce' ), '', '' ), @@ -92,29 +92,29 @@ class DefaultFreeExtensions { ], ], 'google-listings-and-ads:alt' => [ - 'name' => __( 'Google Listings & Ads', 'woocommerce-admin' ), - 'description' => __( 'Reach more shoppers and drive sales for your store. Integrate with Google to list your products for free and launch paid ad campaigns.', 'woocommerce-admin' ), + 'name' => __( 'Google Listings & Ads', 'woocommerce' ), + 'description' => __( 'Reach more shoppers and drive sales for your store. Integrate with Google to list your products for free and launch paid ad campaigns.', 'woocommerce' ), 'image_url' => plugins_url( 'images/onboarding/google-listings-and-ads.png', WC_ADMIN_PLUGIN_FILE ), 'manage_url' => 'admin.php?page=wc-admin&path=%2Fgoogle%2Fstart', 'is_built_by_wc' => true, ], 'mailpoet' => [ - 'name' => __( 'MailPoet', 'woocommerce-admin' ), - 'description' => __( 'Create and send purchase follow-up emails, newsletters, and promotional campaigns straight from your dashboard.', 'woocommerce-admin' ), + 'name' => __( 'MailPoet', 'woocommerce' ), + 'description' => __( 'Create and send purchase follow-up emails, newsletters, and promotional campaigns straight from your dashboard.', 'woocommerce' ), 'image_url' => plugins_url( 'images/onboarding/mailpoet.png', WC_ADMIN_PLUGIN_FILE ), 'manage_url' => 'admin.php?page=mailpoet-newsletters', 'is_built_by_wc' => true, ], 'mailchimp-for-woocommerce' => [ - 'name' => __( 'Mailchimp', 'woocommerce-admin' ), - 'description' => __( 'Send targeted campaigns, recover abandoned carts and much more with Mailchimp.', 'woocommerce-admin' ), + 'name' => __( 'Mailchimp', 'woocommerce' ), + 'description' => __( 'Send targeted campaigns, recover abandoned carts and much more with Mailchimp.', 'woocommerce' ), 'image_url' => plugins_url( 'images/onboarding/mailchimp-for-woocommerce.png', WC_ADMIN_PLUGIN_FILE ), 'manage_url' => 'admin.php?page=mailchimp-woocommerce', 'is_built_by_wc' => false, ], 'creative-mail-by-constant-contact' => [ - 'name' => __( 'Creative Mail for WooCommerce', 'woocommerce-admin' ), - 'description' => __( 'Create on-brand store campaigns, fast email promotions and customer retargeting with Creative Mail.', 'woocommerce-admin' ), + 'name' => __( 'Creative Mail for WooCommerce', 'woocommerce' ), + 'description' => __( 'Create on-brand store campaigns, fast email promotions and customer retargeting with Creative Mail.', 'woocommerce' ), 'image_url' => plugins_url( 'images/onboarding/creative-mail-by-constant-contact.png', WC_ADMIN_PLUGIN_FILE ), 'manage_url' => 'admin.php?page=creativemail', 'is_built_by_wc' => false, @@ -122,7 +122,7 @@ class DefaultFreeExtensions { 'woocommerce-payments' => [ 'description' => sprintf( /* translators: 1: opening product link tag. 2: closing link tag */ - __( 'Accept credit cards and other popular payment methods with %1$sWooCommerce Payments%2$s', 'woocommerce-admin' ), + __( 'Accept credit cards and other popular payment methods with %1$sWooCommerce Payments%2$s', 'woocommerce' ), '', '' ), @@ -260,7 +260,7 @@ class DefaultFreeExtensions { 'woocommerce-services:shipping' => [ 'description' => sprintf( /* translators: 1: opening product link tag. 2: closing link tag */ - __( 'Print shipping labels with %1$sWooCommerce Shipping%2$s', 'woocommerce-admin' ), + __( 'Print shipping labels with %1$sWooCommerce Shipping%2$s', 'woocommerce' ), '', '' ), @@ -327,7 +327,7 @@ class DefaultFreeExtensions { 'woocommerce-services:tax' => [ 'description' => sprintf( /* translators: 1: opening product link tag. 2: closing link tag */ - __( 'Get automated sales tax with %1$sWooCommerce Tax%2$s', 'woocommerce-admin' ), + __( 'Get automated sales tax with %1$sWooCommerce Tax%2$s', 'woocommerce' ), '', '' ), @@ -407,7 +407,7 @@ class DefaultFreeExtensions { 'jetpack' => [ 'description' => sprintf( /* translators: 1: opening product link tag. 2: closing link tag */ - __( 'Enhance speed and security with %1$sJetpack%2$s', 'woocommerce-admin' ), + __( 'Enhance speed and security with %1$sJetpack%2$s', 'woocommerce' ), '', '' ), @@ -425,10 +425,10 @@ class DefaultFreeExtensions { 'is_built_by_wc' => false, ], 'mailpoet' => [ - 'name' => __( 'MailPoet', 'woocommerce-admin' ), + 'name' => __( 'MailPoet', 'woocommerce' ), 'description' => sprintf( /* translators: 1: opening product link tag. 2: closing link tag */ - __( 'Level up your email marketing with %1$sMailPoet%2$s', 'woocommerce-admin' ), + __( 'Level up your email marketing with %1$sMailPoet%2$s', 'woocommerce' ), '', '' ), @@ -447,8 +447,8 @@ class DefaultFreeExtensions { 'is_built_by_wc' => true, ], 'mailpoet:alt' => [ - 'name' => __( 'MailPoet', 'woocommerce-admin' ), - 'description' => __( 'Create and send purchase follow-up emails, newsletters, and promotional campaigns straight from your dashboard.', 'woocommerce-admin' ), + 'name' => __( 'MailPoet', 'woocommerce' ), + 'description' => __( 'Create and send purchase follow-up emails, newsletters, and promotional campaigns straight from your dashboard.', 'woocommerce' ), 'image_url' => plugins_url( 'images/onboarding/mailpoet.png', WC_ADMIN_PLUGIN_FILE ), 'manage_url' => 'admin.php?page=mailpoet-newsletters', 'is_built_by_wc' => true, diff --git a/plugins/woocommerce/src/Internal/Admin/Schedulers/CustomersScheduler.php b/plugins/woocommerce/src/Internal/Admin/Schedulers/CustomersScheduler.php index 431db0c3d85..946f301d875 100644 --- a/plugins/woocommerce/src/Internal/Admin/Schedulers/CustomersScheduler.php +++ b/plugins/woocommerce/src/Internal/Admin/Schedulers/CustomersScheduler.php @@ -240,7 +240,7 @@ class CustomersScheduler extends ImportScheduler { } // Long form query because $wpdb->update rejects [deleted]. - $deleted_text = __( '[deleted]', 'woocommerce-admin' ); + $deleted_text = __( '[deleted]', 'woocommerce' ); $updated = $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->prefix}wc_customer_lookup diff --git a/plugins/woocommerce/src/Internal/Admin/Settings.php b/plugins/woocommerce/src/Internal/Admin/Settings.php index 5ae40a45a0e..de6e5ceabc6 100644 --- a/plugins/woocommerce/src/Internal/Admin/Settings.php +++ b/plugins/woocommerce/src/Internal/Admin/Settings.php @@ -192,7 +192,7 @@ class Settings { // Plugins that depend on changing the translation work on the server but not the client - // WooCommerce Branding is an example of this - so pass through the translation of // 'WooCommerce' to wcSettings. - $settings['woocommerceTranslation'] = __( 'WooCommerce', 'woocommerce-admin' ); + $settings['woocommerceTranslation'] = __( 'WooCommerce', 'woocommerce' ); // We may have synced orders with a now-unregistered status. // E.g An extension that added statuses is now inactive or removed. $settings['unregisteredOrderStatuses'] = $this->get_unregistered_order_statuses(); @@ -233,8 +233,8 @@ class Settings { public function add_settings_group( $groups ) { $groups[] = array( 'id' => 'wc_admin', - 'label' => __( 'WooCommerce Admin', 'woocommerce-admin' ), - 'description' => __( 'Settings for WooCommerce admin reporting.', 'woocommerce-admin' ), + 'label' => __( 'WooCommerce Admin', 'woocommerce' ), + 'description' => __( 'Settings for WooCommerce admin reporting.', 'woocommerce' ), ); return $groups; } @@ -253,8 +253,8 @@ class Settings { $settings[] = array( 'id' => 'woocommerce_excluded_report_order_statuses', 'option_key' => 'woocommerce_excluded_report_order_statuses', - 'label' => __( 'Excluded report order statuses', 'woocommerce-admin' ), - 'description' => __( 'Statuses that should not be included when calculating report totals.', 'woocommerce-admin' ), + 'label' => __( 'Excluded report order statuses', 'woocommerce' ), + 'description' => __( 'Statuses that should not be included when calculating report totals.', 'woocommerce' ), 'default' => array( 'pending', 'cancelled', 'failed' ), 'type' => 'multiselect', 'options' => $all_statuses, @@ -262,8 +262,8 @@ class Settings { $settings[] = array( 'id' => 'woocommerce_actionable_order_statuses', 'option_key' => 'woocommerce_actionable_order_statuses', - 'label' => __( 'Actionable order statuses', 'woocommerce-admin' ), - 'description' => __( 'Statuses that require extra action on behalf of the store admin.', 'woocommerce-admin' ), + 'label' => __( 'Actionable order statuses', 'woocommerce' ), + 'description' => __( 'Statuses that require extra action on behalf of the store admin.', 'woocommerce' ), 'default' => array( 'processing', 'on-hold' ), 'type' => 'multiselect', 'options' => $all_statuses, @@ -271,8 +271,8 @@ class Settings { $settings[] = array( 'id' => 'woocommerce_default_date_range', 'option_key' => 'woocommerce_default_date_range', - 'label' => __( 'Default Date Range', 'woocommerce-admin' ), - 'description' => __( 'Default Date Range', 'woocommerce-admin' ), + 'label' => __( 'Default Date Range', 'woocommerce' ), + 'description' => __( 'Default Date Range', 'woocommerce' ), 'default' => 'period=month&compare=previous_year', 'type' => 'text', ); diff --git a/plugins/woocommerce/src/Internal/Admin/SettingsNavigationFeature.php b/plugins/woocommerce/src/Internal/Admin/SettingsNavigationFeature.php index 40c2c2b10d4..e1247ef02b3 100644 --- a/plugins/woocommerce/src/Internal/Admin/SettingsNavigationFeature.php +++ b/plugins/woocommerce/src/Internal/Admin/SettingsNavigationFeature.php @@ -84,10 +84,10 @@ class SettingsNavigationFeature { */ public static function add_feature_toggle( $features ) { $features[] = array( - 'title' => __( 'Settings', 'woocommerce-admin' ), + 'title' => __( 'Settings', 'woocommerce' ), 'desc' => __( 'Adds the new WooCommerce settings UI.', - 'woocommerce-admin' + 'woocommerce' ), 'id' => 'woocommerce_settings_enabled', 'type' => 'checkbox', diff --git a/plugins/woocommerce/src/Internal/Admin/ShippingLabelBanner.php b/plugins/woocommerce/src/Internal/Admin/ShippingLabelBanner.php index cfc1bebb89e..b1dc2d55b6e 100644 --- a/plugins/woocommerce/src/Internal/Admin/ShippingLabelBanner.php +++ b/plugins/woocommerce/src/Internal/Admin/ShippingLabelBanner.php @@ -87,7 +87,7 @@ class ShippingLabelBanner { if ( $this->should_show_meta_box() ) { add_meta_box( 'woocommerce-admin-print-label', - __( 'Shipping Label', 'woocommerce-admin' ), + __( 'Shipping Label', 'woocommerce' ), array( $this, 'meta_box' ), null, 'normal', diff --git a/plugins/woocommerce/src/Internal/Admin/WCAdminAssets.php b/plugins/woocommerce/src/Internal/Admin/WCAdminAssets.php index 906b56e8c3c..d8990800933 100644 --- a/plugins/woocommerce/src/Internal/Admin/WCAdminAssets.php +++ b/plugins/woocommerce/src/Internal/Admin/WCAdminAssets.php @@ -295,7 +295,7 @@ class WCAdminAssets { ); if ( in_array( $script, $translated_scripts, true ) ) { - wp_set_script_translations( $script, 'woocommerce-admin' ); + wp_set_script_translations( $script, 'woocommerce' ); } } catch ( \Exception $e ) { // Avoid crashing WordPress if an asset file could not be loaded. diff --git a/plugins/woocommerce/src/Internal/Admin/WCPayPromotion/WCPaymentGatewayPreInstallWCPayPromotion.php b/plugins/woocommerce/src/Internal/Admin/WCPayPromotion/WCPaymentGatewayPreInstallWCPayPromotion.php index 292c2fbd4f4..7a14d002900 100644 --- a/plugins/woocommerce/src/Internal/Admin/WCPayPromotion/WCPaymentGatewayPreInstallWCPayPromotion.php +++ b/plugins/woocommerce/src/Internal/Admin/WCPayPromotion/WCPaymentGatewayPreInstallWCPayPromotion.php @@ -50,9 +50,9 @@ class WCPaymentGatewayPreInstallWCPayPromotion extends \WC_Payment_Gateway { public function init_form_fields() { $this->form_fields = array( 'is_dismissed' => array( - 'title' => __( 'Dismiss', 'woocommerce-admin' ), + 'title' => __( 'Dismiss', 'woocommerce' ), 'type' => 'checkbox', - 'label' => __( 'Dismiss the gateway', 'woocommerce-admin' ), + 'label' => __( 'Dismiss the gateway', 'woocommerce' ), 'default' => 'no', ), ); diff --git a/plugins/woocommerce/src/Internal/Admin/WcPayWelcomePage.php b/plugins/woocommerce/src/Internal/Admin/WcPayWelcomePage.php index 53b55e8fe68..ceb903dcd46 100644 --- a/plugins/woocommerce/src/Internal/Admin/WcPayWelcomePage.php +++ b/plugins/woocommerce/src/Internal/Admin/WcPayWelcomePage.php @@ -46,11 +46,11 @@ class WcPayWelcomePage { $menu_data = array( 'id' => 'wc-calypso-bridge-payments-welcome-page', - 'title' => __( 'Payments', 'woocommerce-admin' ), + 'title' => __( 'Payments', 'woocommerce' ), 'path' => '/wc-pay-welcome-page', 'position' => '56', 'nav_args' => [ - 'title' => __( 'WooCommerce Payments', 'woocommerce-admin' ), + 'title' => __( 'WooCommerce Payments', 'woocommerce' ), 'is_category' => false, 'menuId' => 'plugins', 'is_top_level' => true, @@ -66,8 +66,8 @@ class WcPayWelcomePage { // WooCommerce menu. if ( 'yes' === get_option( 'woocommerce_navigation_enabled', 'no' ) ) { $menu_with_nav_data = array( - __( 'Payments', 'woocommerce-admin' ), - __( 'Payments', 'woocommerce-admin' ), + __( 'Payments', 'woocommerce' ), + __( 'Payments', 'woocommerce' ), 'view_woocommerce_reports', 'admin.php?page=wc-admin&path=/wc-pay-welcome-page', null,