From bea5b42f42067a4582275ea0a2bba62b4587e953 Mon Sep 17 00:00:00 2001 From: Akshit Sethi Date: Sun, 12 Apr 2020 16:59:15 +0530 Subject: [PATCH] Renamed the plugin and updated to a new version --- .github/workflows/release.yml | 4 +- Makefile | 4 +- composer.json | 2 +- package.json | 4 +- src/composer.json | 2 +- src/{woo-customizer.php => customize-woo.php} | 6 +- .../{woo-customizer.pot => customize-woo.pot} | 22 ++++--- src/inc/admin/views/header.php | 4 +- src/inc/admin/views/settings-about.php | 10 +-- src/inc/admin/views/settings-checkout.php | 36 +++++------ src/inc/admin/views/settings-misc.php | 22 +++---- src/inc/admin/views/settings-product.php | 62 +++++++++---------- src/inc/admin/views/settings-shop.php | 52 ++++++++-------- src/inc/admin/views/settings-support.php | 16 ++--- src/inc/admin/views/settings.php | 14 ++--- src/inc/class-admin.php | 30 ++++----- src/inc/class-config.php | 44 ++++++------- src/inc/class-front.php | 2 +- src/inc/class-woocheck.php | 2 +- src/readme.txt | 6 +- 20 files changed, 175 insertions(+), 169 deletions(-) rename src/{woo-customizer.php => customize-woo.php} (96%) rename src/i18n/{woo-customizer.pot => customize-woo.pot} (97%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b1ce277..5b2f652 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,6 +32,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: build/woo-customizer.zip - asset_name: woo-customizer.zip + asset_path: build/customize-woo.zip + asset_name: customize-woo.zip asset_content_type: application/zip diff --git a/Makefile b/Makefile index 413a483..940db6d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -VERSION := 1.0.1 -PLUGINSLUG := woo-customizer +VERSION := 1.0.2 +PLUGINSLUG := customize-woo SRCPATH := $(shell pwd)/src bin/linux/amd64/github-release: diff --git a/composer.json b/composer.json index 5da4284..1658205 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "akshitsethi/woo-customizer", + "name": "akshitsethi/customize-woo", "description": "Plugin to help customise WooCommerce with the help of actions and filters.", "require": { "php": ">=7.2.0" diff --git a/package.json b/package.json index 33a8304..d34056f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "woo-customizer", - "version": "1.0.1", + "name": "customize-woo", + "version": "1.0.2", "description": "Plugin to help customise WooCommerce with the help of actions and filters.", "scripts": { "lint": "eslint", diff --git a/src/composer.json b/src/composer.json index 27574b7..45cd6df 100644 --- a/src/composer.json +++ b/src/composer.json @@ -1,5 +1,5 @@ { - "name": "akshitsethi/woo-customizer", + "name": "akshitsethi/customize-woo", "description": "Plugin to help customise WooCommerce with the help of actions and filters.", "keywords": [ "wordpress", diff --git a/src/woo-customizer.php b/src/customize-woo.php similarity index 96% rename from src/woo-customizer.php rename to src/customize-woo.php index 54ec0e4..ee42154 100644 --- a/src/woo-customizer.php +++ b/src/customize-woo.php @@ -1,11 +1,11 @@ \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2020-04-12T16:44:38+05:30\n" +"POT-Creation-Date: 2020-04-12T16:57:12+05:30\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.4.0\n" -"X-Domain: woo-customizer\n" +"X-Domain: customize-woo\n" #. Plugin Name of the plugin -#: inc/class-admin.php:42 -#: inc/class-admin.php:43 -#: inc/class-config.php:45 -msgid "Woo Customizer" +msgid "Customize WooCommerce" msgstr "" #. Description of the plugin @@ -466,6 +463,11 @@ msgstr "" msgid "About" msgstr "" +#: inc/class-admin.php:42 +#: inc/class-admin.php:43 +msgid "Customizer" +msgstr "" + #: inc/class-admin.php:67 msgid "Ask for Support" msgstr "" @@ -502,6 +504,10 @@ msgstr "" msgid "There was an error creating the support ticket. You can try again later or send me an email directly at akshitsethi@gmail.com" msgstr "" +#: inc/class-config.php:45 +msgid "Woo Customizer" +msgstr "" + #: inc/class-config.php:56 #: inc/class-config.php:70 msgid "Add to Cart" diff --git a/src/inc/admin/views/header.php b/src/inc/admin/views/header.php index cf7d668..774c383 100755 --- a/src/inc/admin/views/header.php +++ b/src/inc/admin/views/header.php @@ -14,10 +14,10 @@

- +

- +
diff --git a/src/inc/admin/views/settings-about.php b/src/inc/admin/views/settings-about.php index e194919..04bfd41 100755 --- a/src/inc/admin/views/settings-about.php +++ b/src/inc/admin/views/settings-about.php @@ -11,17 +11,17 @@
-

-

+

+

diff --git a/src/inc/admin/views/settings-checkout.php b/src/inc/admin/views/settings-checkout.php index 90ee8b6..8a73c9d 100644 --- a/src/inc/admin/views/settings-checkout.php +++ b/src/inc/admin/views/settings-checkout.php @@ -12,51 +12,51 @@
-

-

+

+

- - + + -

+

- - + + -

+

- - + + -

+

- + -

+

- - + + -

+

diff --git a/src/inc/admin/views/settings-misc.php b/src/inc/admin/views/settings-misc.php index 02ebb59..4ee21bb 100644 --- a/src/inc/admin/views/settings-misc.php +++ b/src/inc/admin/views/settings-misc.php @@ -12,32 +12,32 @@
-

-

+

+

- - + + -

+

- - + + -

+

- - + + -

+

diff --git a/src/inc/admin/views/settings-product.php b/src/inc/admin/views/settings-product.php index 9c193c6..94b7345 100644 --- a/src/inc/admin/views/settings-product.php +++ b/src/inc/admin/views/settings-product.php @@ -12,85 +12,85 @@
-

-

+

+

- - + + -

+

- - + + -

+

- - + + -

+

- -

+ +

- - + + -

+

- - + + -

+

- - + + -

+

- - + + -

+

- - + + -

+

- - + + -

+

diff --git a/src/inc/admin/views/settings-shop.php b/src/inc/admin/views/settings-shop.php index a180b81..a3b48d8 100644 --- a/src/inc/admin/views/settings-shop.php +++ b/src/inc/admin/views/settings-shop.php @@ -12,61 +12,61 @@
-

-

+

+

- - + + -

+

- - + + -

+

- - + + -

+

- - + + -

+

- - + + -

+

- - + + -

+

- + -

+

- + -

+

- + -

+

diff --git a/src/inc/admin/views/settings-support.php b/src/inc/admin/views/settings-support.php index 5b88426..2953690 100755 --- a/src/inc/admin/views/settings-support.php +++ b/src/inc/admin/views/settings-support.php @@ -12,22 +12,22 @@
-

-

+

+

- - + + -

+

- - + + -

+

diff --git a/src/inc/admin/views/settings.php b/src/inc/admin/views/settings.php index b3b245a..9392923 100755 --- a/src/inc/admin/views/settings.php +++ b/src/inc/admin/views/settings.php @@ -14,17 +14,17 @@
    -
  • -
  • -
  • -
  • -
  • -
  • +
  • +
  • +
  • +
  • +
  • +
diff --git a/src/inc/class-admin.php b/src/inc/class-admin.php index b83e2eb..f27faeb 100644 --- a/src/inc/class-admin.php +++ b/src/inc/class-admin.php @@ -39,8 +39,8 @@ public function add_menu() { if ( is_admin() && current_user_can( 'manage_options' ) ) { $menu = add_submenu_page( 'woocommerce', - esc_html__( 'Woo Customizer', 'woo-customizer' ), - esc_html__( 'Woo Customizer', 'woo-customizer' ), + esc_html__( 'Customizer', 'customize-woo' ), + esc_html__( 'Customizer', 'customize-woo' ), 'manage_options', Config::PREFIX . 'options', array( $this, 'settings' ) @@ -63,10 +63,10 @@ public function admin_scripts() { $localize = array( 'prefix' => Config::PREFIX, - 'save_text' => esc_html__( 'Save Changes', 'woo-customizer' ), - 'support_text' => esc_html__( 'Ask for Support', 'woo-customizer' ), - 'save_changes' => esc_html__( 'Please save your changes first.', 'woo-customizer' ), - 'processing' => esc_html__( 'Processing..', 'woo-customizer' ), + 'save_text' => esc_html__( 'Save Changes', 'customize-woo' ), + 'support_text' => esc_html__( 'Ask for Support', 'customize-woo' ), + 'save_changes' => esc_html__( 'Please save your changes first.', 'customize-woo' ), + 'processing' => esc_html__( 'Processing..', 'customize-woo' ), 'nonce' => wp_create_nonce( Config::PREFIX . 'nonce' ), ); wp_localize_script( Config::SHORT_SLUG . '-admin', Config::PREFIX . 'admin_l10n', $localize ); @@ -90,10 +90,10 @@ public function load_scripts() { * @return array */ public function meta_links( $links, $file ) { - if ( strpos( $file, 'woo-customizer.php' ) !== false ) { + if ( strpos( $file, 'customize-woo.php' ) !== false ) { $new_links = array( - '' . esc_html__( 'Facebook', 'woo-customizer' ) . '', - '' . esc_html__( 'Twitter', 'woo-customizer' ) . '', + '' . esc_html__( 'Facebook', 'customize-woo' ) . '', + '' . esc_html__( 'Twitter', 'customize-woo' ) . '', ); $links = array_merge( $links, $new_links ); @@ -118,12 +118,12 @@ public function save_options() { // Default response $response = array( 'code' => 'error', - 'response' => esc_html__( 'There was an error processing the request. Please try again later.', 'woo-customizer' ), + 'response' => esc_html__( 'There was an error processing the request. Please try again later.', 'customize-woo' ), ); // Check for _nonce if ( empty( $_POST['_nonce'] ) || ! wp_verify_nonce( $_POST['_nonce'], Config::PREFIX . 'nonce' ) ) { - $response['response'] = esc_html__( 'Request does not seem to be a valid one. Please try again by refreshing the page.', 'woo-customizer' ); + $response['response'] = esc_html__( 'Request does not seem to be a valid one. Please try again by refreshing the page.', 'customize-woo' ); } else { // Check for action to determine the options to be updated $section = str_replace( Config::PREFIX, '', sanitize_text_field( $_POST['action'] ) ); @@ -180,7 +180,7 @@ public function save_options() { // Success $response['code'] = 'success'; - $response['response'] = esc_html__( 'Options have been updated successfully.', 'woo-customizer' ); + $response['response'] = esc_html__( 'Options have been updated successfully.', 'customize-woo' ); } } } @@ -201,7 +201,7 @@ public function support_ticket() { // Storing response in an array $response = array( 'code' => 'error', - 'response' => esc_html__( 'Please fill in both the fields to create your support ticket.', 'woo-customizer' ), + 'response' => esc_html__( 'Please fill in both the fields to create your support ticket.', 'customize-woo' ), ); // Filter and sanitize @@ -217,13 +217,13 @@ public function support_ticket() { // Success $response = array( 'code' => 'success', - 'response' => esc_html__( 'I have received your support ticket and will get back to you shortly!', 'woo-customizer' ), + 'response' => esc_html__( 'I have received your support ticket and will get back to you shortly!', 'customize-woo' ), ); } else { // Failure $response = array( 'code' => 'error', - 'response' => esc_html__( 'There was an error creating the support ticket. You can try again later or send me an email directly at akshitsethi@gmail.com', 'woo-customizer' ), + 'response' => esc_html__( 'There was an error creating the support ticket. You can try again later or send me an email directly at akshitsethi@gmail.com', 'customize-woo' ), ); } } diff --git a/src/inc/class-config.php b/src/inc/class-config.php index f1356fa..96a5d66 100644 --- a/src/inc/class-config.php +++ b/src/inc/class-config.php @@ -16,9 +16,9 @@ class Config { public static $plugin_path; public static $default_options; - const PLUGIN_SLUG = 'woo-customizer'; - const SHORT_SLUG = 'woocustomizer'; - const VERSION = '1.0.1'; + const PLUGIN_SLUG = 'customize-woo'; + const SHORT_SLUG = 'customizewoo'; + const VERSION = '1.0.2'; const DB_OPTION = 'as_' . self::SHORT_SLUG; const PREFIX = self::SHORT_SLUG . '_'; const MIN_WC_VERSION = '3.1.0'; @@ -42,7 +42,7 @@ public function __construct() { * @since 1.0.0 */ public static function get_plugin_name() { - return esc_html__( 'Woo Customizer', 'woo-customizer' ); + return esc_html__( 'Woo Customizer', 'customize-woo' ); } @@ -53,32 +53,32 @@ public static function get_plugin_name() { */ public function default_options() { self::$default_options = array( - 'add_to_cart_text' => esc_html__( 'Add to Cart', 'woo-customizer' ), - 'variable_add_to_cart_text' => esc_html__( 'Select Options', 'woo-customizer' ), - 'grouped_add_to_cart_text' => esc_html__( 'View Options', 'woo-customizer' ), - 'out_of_stock_add_to_cart_text' => esc_html__( 'Out of Stock', 'woo-customizer' ), - 'external_add_to_cart_text' => esc_html__( 'Read More', 'woo-customizer' ), - 'loop_sale_flash_text' => esc_html__( 'Sale!', 'woo-customizer' ), + 'add_to_cart_text' => esc_html__( 'Add to Cart', 'customize-woo' ), + 'variable_add_to_cart_text' => esc_html__( 'Select Options', 'customize-woo' ), + 'grouped_add_to_cart_text' => esc_html__( 'View Options', 'customize-woo' ), + 'out_of_stock_add_to_cart_text' => esc_html__( 'Out of Stock', 'customize-woo' ), + 'external_add_to_cart_text' => esc_html__( 'Read More', 'customize-woo' ), + 'loop_sale_flash_text' => esc_html__( 'Sale!', 'customize-woo' ), 'loop_shop_per_page' => 12, 'loop_shop_columns' => 12, 'woocommerce_product_thumbnails_columns' => 12, - 'woocommerce_product_description_tab_title' => esc_html__( 'Description', 'woo-customizer' ), - 'woocommerce_product_description_heading' => esc_html__( 'Description', 'woo-customizer' ), - 'woocommerce_product_reviews_tab_title' => esc_html__( 'Reviews', 'woo-customizer' ), - 'woocommerce_product_additional_information_tab_title' => esc_html__( 'Additional Information', 'woo-customizer' ), - 'woocommerce_product_additional_information_heading' => esc_html__( 'Additional Information', 'woo-customizer' ), - 'single_add_to_cart_text' => esc_html__( 'Add to Cart', 'woo-customizer' ), - 'single_out_of_stock_text' => esc_html__( 'Out of stock', 'woo-customizer' ), - 'single_backorder_text' => esc_html__( 'Available on backorder', 'woo-customizer' ), - 'single_sale_flash_text' => esc_html__( 'Sale!', 'woo-customizer' ), + 'woocommerce_product_description_tab_title' => esc_html__( 'Description', 'customize-woo' ), + 'woocommerce_product_description_heading' => esc_html__( 'Description', 'customize-woo' ), + 'woocommerce_product_reviews_tab_title' => esc_html__( 'Reviews', 'customize-woo' ), + 'woocommerce_product_additional_information_tab_title' => esc_html__( 'Additional Information', 'customize-woo' ), + 'woocommerce_product_additional_information_heading' => esc_html__( 'Additional Information', 'customize-woo' ), + 'single_add_to_cart_text' => esc_html__( 'Add to Cart', 'customize-woo' ), + 'single_out_of_stock_text' => esc_html__( 'Out of stock', 'customize-woo' ), + 'single_backorder_text' => esc_html__( 'Available on backorder', 'customize-woo' ), + 'single_sale_flash_text' => esc_html__( 'Sale!', 'customize-woo' ), 'woocommerce_must_be_logged_in_message' => '', 'woocommerce_coupon_message' => '', 'woocommerce_login_message' => '', 'woocommerce_create_account_default_checked' => '', 'woocommerce_order_button_text' => '', - 'woocommerce_countries_tax_or_vat' => esc_html__( 'Tax for USA, VAT for European countries', 'woo-customizer' ), - 'woocommerce_countries_inc_tax_or_vat' => esc_html__( 'Inc. tax for USA, Inc. VAT for European countries', 'woo-customizer' ), - 'woocommerce_countries_ex_tax_or_vat' => esc_html__( 'Exc. tax for USA, Exc. VAT for European countries', 'woo-customizer' ), + 'woocommerce_countries_tax_or_vat' => esc_html__( 'Tax for USA, VAT for European countries', 'customize-woo' ), + 'woocommerce_countries_inc_tax_or_vat' => esc_html__( 'Inc. tax for USA, Inc. VAT for European countries', 'customize-woo' ), + 'woocommerce_countries_ex_tax_or_vat' => esc_html__( 'Exc. tax for USA, Exc. VAT for European countries', 'customize-woo' ), ); } diff --git a/src/inc/class-front.php b/src/inc/class-front.php index 39496c0..7f03a0d 100644 --- a/src/inc/class-front.php +++ b/src/inc/class-front.php @@ -230,7 +230,7 @@ private function get_sale_percentage( $product ) { // Only add "up to" if there's > 1 percentage possible if ( ! empty( $child_sale_percents ) ) { /* translators: Placeholder: %s - sale percentage */ - $percentage = count( $child_sale_percents ) > 1 ? sprintf( esc_html__( 'up to %s', 'woo-customizer' ), max( $child_sale_percents ) ) : current( $child_sale_percents ); + $percentage = count( $child_sale_percents ) > 1 ? sprintf( esc_html__( 'up to %s', 'customize-woo' ), max( $child_sale_percents ) ) : current( $child_sale_percents ); } } else { $percentage = $this->calculate_sale_percentage( $product->get_regular_price(), $product->get_sale_price() ); diff --git a/src/inc/class-woocheck.php b/src/inc/class-woocheck.php index cd62c95..22c85ed 100644 --- a/src/inc/class-woocheck.php +++ b/src/inc/class-woocheck.php @@ -58,7 +58,7 @@ public static function is_plugin_active( $plugin_name ) { public static function inactive_notice() { $message = sprintf( /* translators: %1$s - , %2$s - , %3$s - , %4$s - version number, %5$s - */ - esc_html__( '%1$sWooCommerce Customizer won\'t work properly%2$s as it requires WooCommerce. Please %3$sactivate%4$s WooCommerce version %5$s or newer.', 'woo-customizer' ), + esc_html__( '%1$sWooCommerce Customizer won\'t work properly%2$s as it requires WooCommerce. Please %3$sactivate%4$s WooCommerce version %5$s or newer.', 'customize-woo' ), '', '', '', diff --git a/src/readme.txt b/src/readme.txt index b5d9813..b3d1938 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -5,7 +5,7 @@ Tags: woocommerce, customizer, woo Requires at least: 3.5.1 Tested up to: 5.4 Requires PHP: 5.6 -Stable tag: 1.0.1 +Stable tag: 1.0.2 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -26,9 +26,9 @@ Customize your WooCommerce store with a click of few buttons. This plugin provid To manually install this plugin, please follow the instructions below. -1. Upload `woo-customizer` folder to the `/wp-content/plugins/` directory. +1. Upload `customize-woo` folder to the `/wp-content/plugins/` directory. 2. Activate the plugin through the 'Plugins' menu in WordPress. -3. Go to 'Woo Customizer' options under the 'Settings' menu. +3. Go to 'Customizer' options under the 'Settings' menu. 4. Configure the plugin and start enjoying it.