# Custom Customer Pricing for WooCommerce

**Plugin Name:** Custom Customer Pricing for WooCommerce
**Plugin URI:** https://www.thaxam.no/docs/
**Description:** Custom pricing and discount plugin for WooCommerce customers with Ultimate Members compatibility.
**Author:** Thomas Amundsen
**Contributors:** thaxam
**Author URI:** https://www.thaxam.no/wordpress-plugins/
**Donate link:** https://paypal.me/thaxam
**Tags:** woocommerce, pricing, discount, customer, custom price, ultimate-member
**Requires plugins:** woocommerce
**Requires at least:** 5.8
**Requires PHP:** 7.4
**Tested up to:** 6.8
**woocommerce requires at least:** 10.0
**woocommerce tested up to:** 10.1
**Stable tag:** 1.0.25
**License:** GPL-2.0-or-later
**License URI:** https://www.gnu.org/licenses/gpl-2.0.html


A powerful and flexible custom pricing plugin for WooCommerce, allowing you to set custom prices and discounts for individual customers. Includes compatibility with Ultimate Member roles.


## Description

The **Custom Customer Pricing for WooCommerce** plugin provides a comprehensive solution for setting up personalized pricing for your customers. You can define custom prices or percentage-based discounts on a per-product basis for each user. This plugin is designed to be highly flexible and compatible with modern WooCommerce themes and plugins.

### Key Features

- **Custom Prices:** Set specific prices for products for individual customers.
- **Percentage Discounts:** Apply percentage-based discounts to products.
- **Ultimate Member Compatibility:** Seamlessly integrates with Ultimate Member roles.
- **Global Discounts:** Apply a global percentage discount to all products for a user.
- **AJAX-Powered Interface:** A fast and modern user interface for managing custom prices.
- **Shortcode Support:** Use `[thaxamccp_frontend]` to display the pricing interface on any page.
- **Translation Ready:** The plugin is fully translation-ready with the text domain `custom-customer-pricing-for-woocommerce`.


## Banner

https://www.thaxam.no/wp-updates/plugins/banners/custom-customer-pricing-for-woocommerce-1544x500.png


## Text Domain and Localization

This plugin is translation-ready and uses the text domain `custom-customer-pricing-for-woocommerce`. The main plugin file `custom-customer-pricing-for-woocommerce.php` and all PHP files use this text domain for localization.


### Text Domain Mismatch Warning

You may see a `textdomain_mismatch` warning in your WordPress admin panel. This is a known issue and can be safely ignored. The warning appears because WordPress's validation for plugin slugs with hyphens can sometimes be overly strict.

The plugin's directory name is `custom-customer-pricing-for-woocommerce`, and the text domain is also `custom-customer-pricing-for-woocommerce`, which is the correct way to handle text domains for plugins with hyphenated names.


To address this, we have added a validation function `thaxamccp_validate_text_domain` that runs on `init` to ensure the text domain is correctly loaded. This function suppresses the warning and ensures that the plugin is fully translatable.

If you encounter any issues with translations, please ensure your language files are named correctly (e.g., `custom-customer-pricing-for-woocommerce-fr_FR.mo`) and placed in the `/languages` directory of the plugin.


## Installation

1. Upload the `custom-customer-pricing-for-woocommerce` folder to the `/wp-content/plugins/` directory.

2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Configure the plugin settings under **Customer Pricing > Settings**.

## Frequently Asked Questions

**Q: How do I set a custom price for a customer?**

A: Navigate to **Customer Pricing** in your WordPress admin menu. Search for a customer, and you will see a list of products. You can set a custom price or discount for each product.

**Q: Can I apply a global discount to a customer?**

A: Yes, you can set a global percentage discount for each customer in the main pricing interface.

**Q: Does this plugin support variable products?**

A: Yes, it supports variable products and variations.

**Q: Where can I find the settings for the plugin?**

A: You can configure the plugin settings under **Customer Pricing > Settings** in your WordPress admin menu.


## Screenshots

1. The main pricing interface for setting custom prices.
2. The product table with custom prices.
3. The frontend pricing interface.


## Changelog

### 1.0.25
- Tweak: Updated version number and readme files.

### 1.0.24
- Tweak: Updated version number and readme files.

### 1.0.23
- Tweak: Updated version number and readme files.

### 1.0.22
- Tweak: Updated version number and readme files.

### 1.0.21
- Fix: Resolved an issue where pricing data was not saving correctly from the main plugin page.
- Tweak: Updated version number and readme files.


### 1.0.20
- Internal bug fixes and stability improvements.

### 1.0.19
- Enhanced frontend price injection for non-standard WooCommerce themes
- Added global discount management system for customer-wide discounts
- Improved cart integration with better variable product handling
- Added plugin conflict detection and admin notices
- Enhanced security with nonce validation for all AJAX requests
- Improved database performance with optimized caching
- Fixed various UI issues and improved responsive design

### 1.0.18
- Changed plugin slug from `custom-customer-pricing` to `custom-customer-pricing-for-woocommerce` for clarity and to avoid conflicts.
- Updated all internal references, text domains, and file names to match the new slug.
- Refactored all AJAX calls into a separate class (`Custom_Customer_Pricing_AJAX`) and file for better organization.

### 1.0.17
- Fixed prefix to be consistent with the new thaxamccp throughout the plugin code.
- Fixed CSS rendering issues with three-column layout and filter row grid layout.
- Improved modern UI design with contained layout (max-width 1200px).
- Optimized font sizes for better readability (16px headers, 14px body text, 13px tables).
- Enhanced column width distribution for better balance (30% search, flexible info, 30% calculator).
- Updated plugin metadata and descriptions.

### 1.0.15
- Added confirmation popup with user info for "Copy Prices from Another Customer" feature.
- Refactored AJAX user info handler into separate helper class to fix parse errors.
- Improved plugin structure and code maintainability.
- Preserved all existing functionality.

### 1.0.14
- Bumped version number.
- Updated meta information and fixed plugin URIs.

### 1.0.13
- Bumped version number.
- Updated meta information and fixed plugin URIs.

### 1.0.12
- Minor fixes and improvements.

### 1.0.11
- Added customer select reload on change, improved stability.


## Upgrade Notice

### 1.0.16
- Major UI improvements with fixed layout issues, modern design, and optimized typography for better user experience.

### 1.0.15
- Enhanced user experience with improved copy prices feature and better code structure.

## Support

If you need any help with the plugin, please contact us at [plugins@thaxam.no](mailto:plugins@thaxam.no).
