=== PixelcraftDev Confirm Payment for Woocommerce ===
Contributors: superauu
Donate link: https://supapongai.com
Tags: payment confirmation, bank transfer, woocommerce payment, confirm payment
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.5
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

WooCommerce payment confirmation plugin for bank transfers with email notifications and customizable forms.

== Description ==

PixelcraftDev Confirm Payment allows your WooCommerce customers to submit bank transfer payment confirmations directly on your website.

= How to configure =

1. Install and activate WooCommerce.
2. Enable WooCommerce → Settings → Payments → Direct bank transfer (Bacs).
3. Go to Confirm Payment → Settings in wp-admin.
4. Add your bank accounts (name, account number, bank, optional logo and branch).
5. Choose the Confirm Payment page (created automatically on activation) or use a shortcode on any page.
6. Customize form appearance, email notifications, and success popup as needed.

= How to use =

* Customers place a Bacs order, then submit payment details on the Confirm Payment form (name, phone, order, amount, bank, date/time, optional slip).
* Store admins review submissions under Confirm Payment → Payment List and approve or cancel each payment.
* Approved payments update the related WooCommerce order status and trigger email notifications.
* Customers can view their submission history in My Account → Payment History.

= Shortcodes =

* `[pxcraft_confirm_payment_form]` — full payment form (English labels)
* `[pxcraft_confirm_payment_form lang="th"]` — Thai labels
* `[pxcraft_confirm_payment_form order_id="123"]` — pre-selected order
* `[pxcraft_confirm_payment_button]` — link button to the confirm payment page

Website: [https://supapongai.com](https://supapongai.com)

= Features =

* Add unlimited bank accounts with logo upload
* Protect against fake payment confirmations — accept or reject submissions
* Customers can view payment status and history
* Override email templates
* Email notifications for admin and customer
* Payment history logged in WooCommerce order notes
* Calendar date/time picker for transfer date
* Customizable success popup (font, colors) from admin settings

== Installation ==

1. Upload the `pixelcraftdev-confirm-payment-for-woocommerce` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Ensure WooCommerce is installed and Direct bank transfer (Bacs) is enabled

== External services ==

This plugin does not contact external servers automatically. No customer, order, or admin usage data is transmitted to third-party services.

All JavaScript, CSS, images, and fonts are loaded from the plugin directory on your own site.

Bundled libraries (local only, no network requests):

* SweetAlert2 — success popup on the payment form ([MIT license](https://github.com/sweetalert2/sweetalert2/blob/master/LICENSE))
* Flatpickr — date/time picker on the payment form ([MIT license](https://github.com/flatpickr/flatpickr/blob/master/LICENSE.md))

Bundled admin images (local only):

* Language flag icons (`th-flag.png`, `gb-flag.png`)
* Admin header logo and footer mascot image

Optional local font files may be placed in `assets/fonts/`. When a selected font has a matching CSS file in that folder, it is loaded from your site. No Google Fonts or other remote font CDNs are used.

Admin footer links to the developer website and LINE contact are optional manual links only. They do not load tracking scripts or send site data.

== Screenshots ==

1. Settings page
2. Select bank logo
3. Email settings
4. Payment confirmation form
5. Bank logo on checkout
6. Bank details on account page
7. Payment confirmation form
8. Customer payment history
9. Orders with confirmed payment
10. All payment confirmations
11. Payment confirmation log
12. Admin email notification
13. Customer cancellation email
14. Payment date picker

== Changelog ==

= 1.0.5 =
* WordPress.org compliance: text domain, security hardening, removed custom CSS field
* Local-only assets for admin images and fonts
* Requires Plugins: woocommerce header added

= 1.0.4 =
* Added flatpickr calendar picker for transfer date/time fields
* Added popup font, font size, and button color settings in admin
* Bundled SweetAlert2 and Flatpickr as local assets
* Fixed date/time validation condition mismatch
* Fixed post status max-length issue (pxcraft-pending)
* Fixed AJAX form submission to always use FormData

= 1.0 =
* Initial release by Supapong (https://supapongai.com)
