=== Payment Method Based Sale Prices for WooCommerce ===
Contributors: ravishka
Tags: woocommerce, sale price, payment method, checkout, discount
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.3.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show WooCommerce sale prices only for selected payment gateways on product and checkout pages.

== Description ==

Payment Method Based Sale Prices for WooCommerce lets store owners hide sale prices from the main single product price and show payment-method sale price boxes only for selected gateways.

When a customer selects an eligible payment gateway, products with valid WooCommerce regular and sale prices use the sale price in the order total. When the selected gateway is not eligible, the same products use their regular price and the customer can see a configurable WooCommerce notice.

= Key features =

* Uses the standard WooCommerce regular price and sale price fields.
* Lets you choose which payment gateways can use sale prices.
* Hides the main WooCommerce sale price on single product pages.
* Shows sale price boxes for selected payment gateways below the product price.
* Includes product-page card logo support for Cash Price/Cash on Delivery, Bank Transfer, Visa/Mastercard card payments, PayHere/card-style gateways, Koko, Mintpay, and Payzy.
* Shows an optional note linked from the payment-method price boxes.
* Shows an optional checkout notice when the selected gateway is not eligible.
* Declares compatibility with WooCommerce High-Performance Order Storage (HPOS).
* Does not create coupons, fees, custom product fields, or external service connections.

= Payment methods currently supported =

The plugin can apply payment-method-based sale pricing to any active WooCommerce payment gateway selected in WooCommerce > Payment Sale Prices.

For product-page price card logos, the plugin currently includes built-in matching for:

* Cash Price / Cash on Delivery
* Bank Transfer / Direct Bank Transfer
* Visa and Mastercard card payments
* PayHere or other card-style gateways
* Koko
* Mintpay
* Payzy

Other WooCommerce gateways can still be selected. If the plugin does not recognize a gateway logo, the product-page price card falls back to the gateway name.

= Important checkout note =

This plugin is designed for the classic WooCommerce checkout. Checkout Blocks may require a block-specific integration because payment method changes are handled differently there.

== Installation ==

1. Make sure WooCommerce is installed and active.
2. Upload the plugin ZIP from Plugins > Add New > Upload Plugin, or install it from the WordPress.org plugin directory when available.
3. Activate Payment Method Based Sale Prices for WooCommerce.
4. Go to WooCommerce > Payment Sale Prices.
5. Enable the feature and select the payment methods where sale prices should be valid.
6. Adjust the single product note and checkout warning text if needed.

== Frequently Asked Questions ==

= Does this create a new discount or coupon? =

No. The plugin uses WooCommerce's existing regular price and sale price fields. It does not create coupons, cart fees, or extra discount rules.

= Will sale prices still show in the main product price? =

No. On single product pages, the main WooCommerce price area shows the regular price. Sale prices are shown only inside the selected payment method boxes.

= Will sale prices still show on shop and archive pages? =

Shop and archive pages continue to use the normal WooCommerce price display.

= What happens when a customer selects a payment method that is not eligible? =

Products with valid sale prices are recalculated using their regular prices, and the configured WooCommerce notice can be shown at checkout.

= What happens before a payment method is selected? =

If WooCommerce has not stored a chosen payment method yet, the plugin treats the payment method as not eligible and uses regular prices for cart and checkout totals.

= Can I choose any WooCommerce payment gateway? =

Yes. The settings page lists active WooCommerce payment gateways found on the site, including gateways added by third-party payment plugins. Built-in product-page logo matching is currently included for Cash Price/Cash on Delivery, Bank Transfer, Visa/Mastercard card payments, PayHere/card-style gateways, Koko, Mintpay, and Payzy.

= Does this work with variable products? =

Yes. Cart items use the variation's own regular and sale prices when a variation is purchased.

= Does this support Checkout Blocks? =

The plugin is built mainly for the classic WooCommerce checkout shortcode. Checkout Blocks may require additional block-specific integration.

= Does this collect customer data or connect to external services? =

No. The plugin stores only its admin settings in the WordPress database and does not send data to external services.

== Changelog ==

= 1.3.7 =
* Updates the plugin text domain to payment-method-based-sale-prices-for-woocommerce.
* Renames the main PHP class to match the new plugin slug using a valid PHP class name.

= 1.3.6 =
* Adds an "Available Discounts" heading before payment method price cards.

= 1.3.5 =
* Stops default payment method cards from appearing when no gateways are selected in plugin settings.
* Strengthens card logo CSS to remove theme-applied shadows, filters, borders, and outlines.

= 1.3.4 =
* Shows payment method price cards only on products with a valid WooCommerce sale price.
* Removes theme-applied shadows and filters from payment method logos in price cards.

= 1.3.3 =
* Uses a non-destructive product price fallback so third-party payment/installment messages are not removed.
* Moves variable product price cards before variation selectors.
* Changes product price cards to two columns on desktop and one column on mobile.
* Updates product price cards to use a white background and black border.

= 1.3.2 =
* Preserves appended payment/installment messages when replacing the main single product sale price with the regular price.
* Shows the regular price in payment method cards when a product does not have a valid sale discount.
* Adds Payzy image support for payment method price cards.

= 1.3.1 =
* Collapses equal variable product price ranges into one regular price on single product pages.
* Collapses equal sale price ranges inside payment method price cards.
* Replaces payment method text labels with gateway images on single product pages.
* Removes the More Information link from payment method price cards.

= 1.3.0 =
* Hides sale prices from the main single product price area.
* Adds selected payment method sale price boxes below the product price.
* Links payment method boxes to the optional single product information note.
* Updates admin and readme text for the new single product display behavior.

= 1.2.0 =
* Updated plugin metadata and readme for WordPress.org plugin directory readiness.
* Added GPL license headers to the main plugin file.
* Improved admin text escaping and internationalization.
* Moved checkout refresh JavaScript into WordPress's script enqueue system.
* Added uninstall cleanup for stored plugin settings.
* Updated WooCommerce compatibility metadata.

= 1.1.0 =
* Keeps sale price display on product and archive pages.
* Shows the discount note only on single product details pages.
* Adds checkout warning for ineligible payment methods.
* Continues checkout using regular prices when the selected payment method is not eligible.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.3.7 =
Updates internal plugin website url.

= 1.3.6 =
Adds a heading before payment method price cards on product pages.

= 1.3.5 =
Price cards now appear only for gateways explicitly selected in plugin settings.

= 1.3.4 =
Payment method price cards now appear only on sale products and logos render without shadows.

= 1.3.3 =
Improves compatibility with payment/installment plugins and moves variable product cards before variation selectors.

= 1.3.2 =
Fixes hidden Koko/Mintpay-style payment messages and adds Payzy logo support.

= 1.3.1 =
Single product price cards now use payment method images and equal price ranges display as one price.

= 1.3.0 =
Single product pages now show the regular price in the main price area and display sale prices only in selected payment method boxes.

= 1.2.0 =
Improves WordPress.org readiness, metadata, internationalization, checkout script loading, and uninstall cleanup.
