Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename plugin text domain according to wp standard #77

Merged
merged 2 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/scripts/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ NEW_VERSION=$(echo $GITHUB_REF | cut -d / -f 3)
# Remove the 'v' prefix if present
NEW_VERSION=${NEW_VERSION#v}

# Update the version in main.php (both in the comment block and in the body)
sed -i "s/\([ *]*Version:[ ]*\)[0-9.]\+/\1$NEW_VERSION/" main.php
sed -i "s/\(define('MMG_PLUGIN_VERSION', '\)[0-9.]\+/\1$NEW_VERSION/" main.php
# Update the version in kalpa-mmg-checkou.php (both in the comment block and in the body)
sed -i "s/\([ *]*Version:[ ]*\)[0-9.]\+/\1$NEW_VERSION/" kalpa-mmg-checkout.php
sed -i "s/\(define('MMG_PLUGIN_VERSION', '\)[0-9.]\+/\1$NEW_VERSION/" kalpa-mmg-checkou.php
# Update the Stable tag in README.txt
sed -i "s/\(Stable tag: \)[0-9.]\+/\1$NEW_VERSION/" README.txt

git add README.txt main.php
git add README.txt kalpa-mmg-checkou.php
git commit -m "Bump version to $NEW_VERSION"

# Push the change to the main branch
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.PAT }}
- name: Update version in main.php
- name: Update version in kalpa-mmg-checkout.php
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
run: |
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
run: composer install --no-dev --optimize-autoloader

- name: Zip project
run: zip -r mmg-checkout-payment.zip main.php LICENSE.txt uninstall.php vendor/* README.txt admin/* public/* includes/*
run: zip -r kalpa-mmg-checkout.zip kalpa-mmg-checkout.php LICENSE.txt uninstall.php vendor/* README.txt admin/* public/* includes/*

- name: Setup GitHub CLI
uses: actions/setup-go@v4
Expand All @@ -63,4 +63,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.ref_name }} ./mmg-checkout-payment.zip --clobber
gh release upload ${{ github.ref_name }} ./kalpa-mmg-checkout.zip --clobber
7 changes: 3 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Developer Contribution Guide


## Project Overview

MMG Checkout Payment is a WordPress plugin that integrates with WooCommerce to provide a secure payment gateway for MMG Merchants. This guide is for developers who want to contribute to the project.
MMG Checkout for WooCommerce is a WordPress plugin that integrates with WooCommerce to provide a secure payment gateway for MMG Merchants. This guide is for developers who want to contribute to the project.

## Development Prerequisites

Expand All @@ -24,7 +23,7 @@ MMG Checkout Payment is a WordPress plugin that integrates with WooCommerce to p
git clone https://github.com/Kalpa-Services/mmg-wp-plugin.git
```
1. Navigate to project directory. Doing so should automatically install all the required environment dependencies. If not run `devbox install`.
2. Run `composer install` project dependencies.
1. Run `composer install` project dependencies.
1. Run `devbox services up` to start all services.
1. Run `mysql -u root` to connect to the database and create a new database for wordpress.
1. Create a new directory called `wordpress` in `devbox.d` and run the following commands inside it:
Expand All @@ -40,7 +39,7 @@ MMG Checkout Payment is a WordPress plugin that integrates with WooCommerce to p
1. Navigae to `devbox.d/wordpress/wp-content/plugins` and run the following command:

```sh
ln -s /path/to/project/mmg-wp-plugin mmg-checkout-payment
ln -s /path/to/project/mmg-wp-plugin kalpa-mmg-checkout
```

1. Activate plugin in the WordPress admin panel.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# MMG Checkout Payment Plugin - Developer Contribution Guide
# MMG Checkout for WooCommerce Plugin - Developer Contribution Guide

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FKalpa-Services%2Fmmg-wp-plugin.svg?type=shield&issueType=security)](https://app.fossa.com/projects/git%2Bgithub.com%2FKalpa-Services%2Fmmg-wp-plugin?ref=badge_shield&issueType=security)

## Project Overview

MMG Checkout Payment is a WordPress plugin that integrates with WooCommerce to provide a secure payment gateway for MMG Merchants. This guide is for developers who want to contribute to the project.
MMG Checkout for WooCommerce is a WordPress plugin that integrates with WooCommerce to provide a secure payment gateway for MMG Merchants. This guide is for developers who want to contribute to the project.

## Development Prerequisites

Expand All @@ -25,7 +25,7 @@ MMG Checkout Payment is a WordPress plugin that integrates with WooCommerce to p
git clone https://github.com/Kalpa-Services/mmg-wp-plugin.git
```
1. Navigate to project directory. Doing so should automatically install all the required environment dependencies. If not run `devbox install`.
2. Run `composer install` project dependencies.
1. Run `composer install` project dependencies.
1. Run `devbox services up` to start all services.
1. Run `mysql -u root` to connect to the database and create a new database for wordpress.
1. Create a new directory called `wordpress` in `devbox.d` and run the following commands inside it:
Expand All @@ -41,7 +41,7 @@ MMG Checkout Payment is a WordPress plugin that integrates with WooCommerce to p
1. Navigae to `devbox.d/wordpress/wp-content/plugins` and run the following command:

```sh
ln -s /path/to/project/mmg-wp-plugin mmg-checkout-payment
ln -s /path/to/project/mmg-wp-plugin kalpa-mmg-checkout
```

1. Activate plugin in the WordPress admin panel.
Expand Down
12 changes: 6 additions & 6 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
=== MMG Checkout Payment for WooCommerce ===
=== MMG Checkout for WooCommerce for WooCommerce ===
Contributors: kalpaservices
Tags: woocommerce, payment gateway, mmg, checkout
Requires at least: 5.6
Expand All @@ -8,11 +8,11 @@ Stable tag: 2.1.7
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Enables MMG Checkout Payment flow for registered MMG Merchants to receive E-Commerce payments from MMG customers.
Enables MMG Checkout for WooCommerce flow for registered MMG Merchants to receive E-Commerce payments from MMG customers.

== Description ==

MMG Checkout Payment is a WordPress plugin that enables MMG Checkout Payment flow for registered MMG Merchants to receive E-Commerce payments from MMG customers. This plugin integrates seamlessly with WooCommerce to provide a secure and efficient payment gateway for your online store.
MMG Checkout for WooCommerce is a WordPress plugin that enables MMG Checkout for WooCommerce flow for registered MMG Merchants to receive E-Commerce payments from MMG customers. This plugin integrates seamlessly with WooCommerce to provide a secure and efficient payment gateway for your online store.

Key Features:
* Easy integration with WooCommerce
Expand All @@ -27,7 +27,7 @@ Key Features:

1. Log in to your WordPress admin panel.
2. Navigate to 'Plugins' -> 'Add New'.
3. In the search box, type "MMG Checkout Payment for WooCommerce".
3. In the search box, type " MMG Checkout for WooCommerce for WooCommerce".
4. Look for the plugin in the search results and click "Install Now".
5. After installation, click "Activate" to enable the plugin.
6. Configure the plugin settings in the WordPress admin area under 'Settings' > 'MMG Checkout'.
Expand Down Expand Up @@ -82,8 +82,8 @@ This version includes important updates and improvements. Please upgrade to ensu

== Screenshots ==

1. MMG Checkout Payment gateway settings page
![MMG Checkout Payment gateway settings page](public/images/settings-page.png)
1. MMG Checkout for WooCommerce gateway settings page
![ MMG Checkout for WooCommerce gateway settings page](public/images/settings-page.png)

2. MMG Checkout option on WooCommerce checkout page
![MMG Checkout option on WooCommerce checkout page](public/images/checkout-options.png)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
/**
* MMG Checkout Payment Activator
* MMG Checkout for WooCommerce Activator
*
* This file contains the MMG_Checkout_Payment_Activator class and activation function.
* This file contains the Kalpa_MMG_Checkout_Activator class and activation function.
*
* @package MMG_Checkout_Payment
* @package Kalpa_Kalpa_MMG_Checkout_Main
* @since 1.0.0
*/

Expand All @@ -18,10 +18,10 @@
* This class defines all code necessary to run during the plugin's activation.
*
* @since 1.0.0
* @package MMG_Checkout_Payment
* @package Kalpa_Kalpa_MMG_Checkout_Main
* @author Kalpa Services Inc. <[email protected]>
*/
class MMG_Checkout_Payment_Activator {
class Kalpa_MMG_Checkout_Activator {

/**
* Activate the plugin.
Expand All @@ -46,9 +46,9 @@ private static function mmg_activate() {
}

/**
* Add rewrite rules for MMG Checkout Payment callbacks.
* Add rewrite rules for MMG Checkout for WooCommerce callbacks.
*
* This function adds a rewrite rule to handle MMG Checkout Payment callbacks
* This function adds a rewrite rule to handle MMG Checkout for WooCommerce callbacks
* through a custom endpoint.
*/
private static function add_rewrite_rules() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
/**
* MMG Checkout Payment Deactivator
* MMG Checkout for WooCommerce Deactivator
*
* This file contains the MMG_Checkout_Payment_Deactivator class and deactivation function.
* This file contains the Kalpa_MMG_Checkout_Deactivator class and deactivation function.
*
* @package MMG_Checkout_Payment
* @package Kalpa_Kalpa_MMG_Checkout_Main
* @since 1.0.0
*/

Expand All @@ -16,10 +16,10 @@
* Fired during plugin deactivation
*
* @since 1.0.0
* @package MMG Checkout Payment
* @package MMG Checkout for WooCommerce
* @author Kalpa Services Inc. <[email protected]>
*/
class MMG_Checkout_Payment_Deactivator {
class Kalpa_MMG_Checkout_Deactivator {

/**
* Deactivate the plugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
/**
* MMG Dependency Checker
*
* This file contains the MMG_Dependency_Checker class which checks for required dependencies.
* This file contains the Kalpa_MMG_Checkout_Dependency_Checker class which checks for required dependencies.
*
* @package MMG_Checkout
* @package Kalpa_MMG_Checkout
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* Class MMG_Dependency_Checker
* Class Kalpa_MMG_Checkout_Dependency_Checker
*
* Checks for required dependencies and displays notices if they are missing.
*/
class MMG_Dependency_Checker {
class Kalpa_MMG_Checkout_Dependency_Checker {
/**
* Check if all dependencies are met.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
*
* This class defines the MMG payment gateway for WooCommerce.
*
* @package MMG_Checkout
* @package Kalpa_MMG_Checkout
*/

/**
* WC_MMG_Gateway class.
* Kalpa_MMG_Checkout_Gateway class.
*/
class WC_MMG_Gateway extends WC_Payment_Gateway {
class Kalpa_MMG_Checkout_Gateway extends WC_Payment_Gateway {

/**
* Constructor for the gateway.
Expand All @@ -19,7 +19,7 @@ public function __construct() {
$this->id = 'mmg_checkout';
$this->has_fields = false;
$this->method_title = 'MMG Checkout';
$this->method_description = 'Enables MMG Checkout Payment flow for WooCommerce';
$this->method_description = 'Enables MMG Checkout for WooCommerce';

$this->init_form_fields();
$this->init_settings();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?php
/**
* MMG Checkout Payment Class
* MMG Checkout for WooCommerce Class
*
* This class handles the payment processing for MMG Checkout.
*
* @package MMG_Checkout
* @package Kalpa_MMG_Checkout
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* MMG_Checkout_Payment class.
* Kalpa_MMG_Checkout_Main class.
*/
class MMG_Checkout_Payment {
class Kalpa_MMG_Checkout_Main {
/**
* Client ID.
*
Expand Down Expand Up @@ -81,8 +81,8 @@ public function __construct() {
$this->callback_url = $this->generate_unique_callback_url();

// Load settings.
require_once __DIR__ . '/class-mmg-checkout-settings.php';
new MMG_Checkout_Settings();
require_once __DIR__ . '/class-kalpa-mmg-checkout-settings.php';
new Kalpa_MMG_Checkout_Settings();

add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
add_action( 'wp_ajax_generate_checkout_url', array( $this, 'generate_checkout_url' ) );
Expand Down Expand Up @@ -283,7 +283,7 @@ private function validate_public_key() {
* @return array
*/
public function add_gateway_class( $gateways ) {
$gateways[] = 'WC_MMG_Gateway';
$gateways[] = 'Kalpa_MMG_Checkout_Gateway';
return $gateways;
}

Expand All @@ -292,7 +292,7 @@ public function add_gateway_class( $gateways ) {
*/
public function init_gateway_class() {
if ( class_exists( 'WC_Payment_Gateway' ) ) {
require_once __DIR__ . '/class-wc-mmg-gateway.php';
require_once __DIR__ . '/class-kalpa-mmg-checkout-gateway.php';
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
/**
* MMG Payments Blocks Integration
*
* Integrates MMG Checkout payment method with WooCommerce Blocks.
* Integrates MMG Checkout for WooCommerce method with WooCommerce Blocks.
*
* @package MMG_Checkout
* @package Kalpa_MMG_Checkout
*/

use Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType;

/**
* WC_MMG_Payments_Blocks class.
* Kalpa_MMG_Checkout_Payments_Blocks class.
*/
class WC_MMG_Payments_Blocks extends AbstractPaymentMethodType {
class Kalpa_MMG_Checkout_Payments_Blocks extends AbstractPaymentMethodType {

/**
* Payment method name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
*
* This class handles the settings page for the MMG Checkout plugin.
*
* @package MMG_Checkout_Payment
* @package Kalpa_Kalpa_MMG_Checkout_Main
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

/**
* Class MMG_Checkout_Settings
* Class Kalpa_MMG_Checkout_Settings
*/
class MMG_Checkout_Settings {
class Kalpa_MMG_Checkout_Settings {

/**
* Constructor.
Expand Down
Loading
Loading