# Button Text Changer for WooCommerce

A lightweight WordPress plugin that allows you to globally change WooCommerce button text without editing individual products or WooCommerce templates.

It also includes an Elementor widget for displaying a customizable WooCommerce-style button.

## 🚀 Features

* Change WooCommerce **Add to Cart** button text globally
* Change **View Cart** button text
* Change **Update Cart** button text
* Change **Proceed to Checkout** button text
* Change **Place Order** button text
* Change **Read More** button text
* Enable or disable global button text changes
* Reset all button text settings with one click
* Confirmation popup before resetting settings
* WooCommerce-compatible implementation
* Elementor widget support
* No Product ID required
* Works globally across the website
* Lightweight and developer-friendly
* WordPress Settings API integration
* Secure nonce and capability checks
* PHP 8.3 compatible

## 📋 Supported Buttons

| WooCommerce Button  | Customizable |
| ------------------- | ------------ |
| Add to Cart         | ✅            |
| View Cart           | ✅            |
| Update Cart         | ✅            |
| Proceed to Checkout | ✅            |
| Place Order         | ✅            |
| Read More           | ✅            |

## 🖥️ Admin Settings

The plugin adds a settings page under:

**WordPress Dashboard → WooCommerce → Button Text Changer**

From there you can configure:

* Enable/Disable plugin
* Add to Cart text
* View Cart text
* Update Cart text
* Proceed to Checkout text
* Place Order text
* Read More text

## 🎨 Elementor Support

The plugin includes an Elementor widget that allows you to create a customizable WooCommerce-style button.

You can use the widget to configure:

* Button text
* Button URL
* Alignment
* Typography
* Colors
* Button styling

Elementor is optional and is not required for the core button text functionality.

## 🔧 How It Works

The plugin uses WordPress and WooCommerce hooks to modify supported button labels globally.

Your customizations are stored in the WordPress database and remain independent of your active theme.

This means you do not need to:

* Edit WooCommerce template files
* Edit theme files
* Modify individual products
* Add custom code to `functions.php`

## 💡 Example

### Default

```text
Add to Cart
View Cart
Update Cart
Proceed to Checkout
Place Order
Read More
```

### Customized

```text
Buy Now
View Basket
Update Basket
Continue to Payment
Confirm Order
Learn More
```

## 📦 Installation

1. Download or clone the plugin.
2. Upload the `button-text-changer-for-woocommerce` folder to:
   `wp-content/plugins/`
3. Go to **WordPress Dashboard → Plugins**.
4. Activate **Button Text Changer for WooCommerce**.
5. Make sure WooCommerce is installed and activated.
6. Go to **WooCommerce → Button Text Changer**.
7. Enter your preferred button labels.
8. Click **Save Button Settings**.

## 🔄 Reset Settings

The plugin includes a **Reset Settings** button.

Clicking Reset Settings restores all customized button labels to their default WooCommerce behavior.

A confirmation message is displayed before resetting the settings.

## 🔐 Security

The plugin follows WordPress security best practices, including:

* Capability checks
* Nonce verification
* Sanitization of settings
* Escaping of output
* WordPress Settings API
* Safe redirects

## 📋 Requirements

* WordPress 6.0 or higher
* WooCommerce
* PHP 7.4 or higher
* Elementor is optional

## 🌐 Compatibility

The plugin is designed to work with WooCommerce websites and Elementor-based WooCommerce websites.

It does not require Elementor for the core button text functionality.

## 📁 Plugin Structure

```text
button-text-changer-for-woocommerce/
│
├── button-text-changer-for-woocommerce.php
│
├── admin/
│   ├── class-admin.php
│   ├── css/
│   │   └── admin.css
│   └── js/
│       └── admin.js
│
├── includes/
│   ├── class-button-text-changer.php
│   └── class-woocommerce-hooks.php
│
├── elementor/
│   ├── class-elementor.php
│   └── widgets/
│       └── class-woocommerce-button-widget.php
│
├── assets/
│   └── css/
│       └── frontend.css
│
├── languages/
│
├── readme.txt
└── README.md
```

## 📸 Screenshots

Screenshots demonstrate:

1. Plugin settings page
2. Button text customization options
3. Save and Reset controls
4. Customized button text on the frontend
5. Elementor button widget

## 📝 Changelog

### 1.0.1

* Updated plugin naming for WordPress.org compatibility.
* Updated plugin slug to `button-text-changer-for-woocommerce`.
* Improved internationalization consistency.
* Updated WordPress compatibility information.
* Improved Plugin Check compatibility.

### 1.0.0

* Initial release.
* Added Add to Cart button text customization.
* Added View Cart button text customization.
* Added Update Cart button text customization.
* Added Proceed to Checkout button text customization.
* Added Place Order button text customization.
* Added Read More button text customization.
* Added Save settings functionality.
* Added Reset settings functionality.
* Added Elementor compatibility.

## 📄 License

This plugin is licensed under the **GPL-2.0-or-later** license.

## 👨‍💻 Author

**Khizer Qureshi**

GitHub: `https://github.com/kprojects87`
