WP Manifestindependent plugin directory
manifest / ecommerce / woodmart-custom-thank-you

WoodMart Custom Thank You Page

Automatically creates and uses a custom WooCommerce Thank You page styled for WoodMart, showing Bengali order details.

by absoftlab · github.com/absoftlabs/woodmart-custom-thank-you · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/absoftlabs/woodmart-custom-thank-you/archive/refs/heads/main.zip

Readme

WoodMart Custom Thank You Page

A lightweight WordPress plugin that replaces WooCommerce’s default Order Received (Thank You) page with a beautiful, Bengali-first layout designed to blend with the WoodMart theme (works with others too).

It automatically creates a “ধন্যবাদ” page, injects a shortcode to render the order details, and redirects WooCommerce to this page after checkout.

✨ Features

  • Auto page creation on activation

    • Title: ধন্যবাদ

    • Slug: thank-you-custom

    • Content: [woodmart_custom_thank_you_page]

    • Page template: Elementor Full Width (elementor_full_width)

  • Seamless redirect: Overrides WooCommerce “Order received” URL to this page (no manual setting change needed)

  • Bengali UI out of the box:

    • Success heading, gratitude text, and all labels in Bangla

    • Product table: নাম, পরিমাণ, মূল্য, সাবটোটাল

    • Order summary: নম্বর, তারিখ, মোট, পেমেন্ট পদ্ধতি

    • Billing & Shipping blocks with phone/email

  • District & Sub-district/Upazila support:

    • Reads common meta keys (e.g., billing_district, billing_upazila, etc.)

    • Fuzzy meta scan finds keys like district, upazila, thana, zilla

    • Filter for converting numeric IDs → labels

  • Theme-friendly styles:

    • Separate, well-commented CSS (/css/styles.css)

    • Minimal markup, WoodMart/container-friendly classes

  • Typography:

    • Enqueues Hind Siliguri (Bangla) from Google Fonts

    • v1.2 default: font is enqueued but not forced, so your theme’s look remains intact

🧩 Requirements

  • WordPress 6.0+

  • PHP 7.4+ (PHP 8.x compatible)

  • WooCommerce 7.5+ (tested with newer)

  • WoodMart theme recommended (works with others)

  • Elementor optional (the page is set to elementor_full_width if available)

📦 Installation

Upload & ActivatePlugins → Add New → Upload Plugin → select the ZIP → Install → Activate

On activation, the plugin will:

  • Create the “ধন্যবাদ” page at /thank-you-custom

  • Set its content to [woodmart_custom_thank_you_page]

  • Assign template elementor_full_width (if present)

Make a test order and you’ll be redirected to the new Thank You page with order details.

Deactivation keeps the page (non-destructive) but removes the stored page ID option.

🛠️ How It Works

  • Shortcode: [woodmart_custom_thank_you_page] renders the Thank You layout.

  • Security: Order details render only when the URL includes valid order and key query vars (e.g., ?order=123&key=wc_order_...). If not available, the page shows a safe fallback message.

  • Redirect: The plugin filters woocommerce_get_checkout_order_received_url to send customers to the custom page with the order ID & key.

🧪 Usage & Customization

Change the gratitude textIn woodmart-custom-thank-you.php there’s a filterable string. You can override it:

Plain textANTLR4BashCC#CSSCoffeeScriptCMakeDartDjangoDockerEJSErlangGitGoGraphQLGroovyHTMLJavaJavaScriptJSONJSXKotlinLaTeXLessLuaMakefileMarkdownMATLABMarkupObjective-CPerlPHPPowerShell.propertiesProtocol BuffersPythonRRubySass (Sass)Sass (Scss)SchemeSQLShellSwiftSVGTSXTypeScriptWebAssemblyYAMLXMLadd_filter( 'wcty_custom_text', function( $text ) { return 'আপনার অর্ডারের জন্য ধন্যবাদ! আমরা খুব দ্রুতই আপনার সাথে যোগাযোগ করবো।'; });

District & Sub-district/Upazila mappingThe template tries many common meta keys and also scans all order meta for keys that contain known aliases.If your checkout saves numeric IDs, translate them to labels via:

Plain textANTLR4BashCC#CSSCoffeeScriptCMakeDartDjangoDockerEJSErlangGitGoGraphQLGroovyHTMLJavaJavaScriptJSONJSXKotlinLaTeXLessLuaMakefileMarkdownMATLABMarkupObjective-CPerlPHPPowerShell.propertiesProtocol BuffersPythonRRubySass (Sass)Sass (Scss)SchemeSQLShellSwiftSVGTSXTypeScriptWebAssemblyYAMLXMLadd_filter( 'wcty_format_geo_value', function( $value, $ctx ) { if ( empty( $value ) ) return $value; // Example: resolve numeric IDs to readable names if ( is_numeric( $value ) ) { $id = (int) $value; // If your district/upazila plugin exposes helpers, call them here: if ( function_exists( 'my_bd_get_district_name' ) && $ctx['type'] === 'district' ) { return my_bd_get_district_name( $id ); } if ( function_exists( 'my_bd_get_upazila_name' ) && $ctx['type'] === 'subdistrict' ) { return my_bd_get_upazila_name( $id ); } // Fallback attempts: $term = get_term( $id ); if ( $term && ! is_wp_error( $term ) && $term->name ) return $term->name; $post = get_post( $id ); if ( $post && ! is_wp_error( $post ) && $post->post_title ) return $post->post_title; } return $value; }, 10, 2 );

Add or lock in exact meta keys inside templates/thank-you.php if needed.

StylesAll presentation lives in /css/styles.css. Classes are scoped with .wcty-….

Examples you might tweak:

Plain textANTLR4BashCC#CSSCoffeeScriptCMakeDartDjangoDockerEJSErlangGitGoGraphQLGroovyHTMLJavaJavaScriptJSONJSXKotlinLaTeXLessLuaMakefileMarkdownMATLABMarkupObjective-CPerlPHPPowerShell.propertiesProtocol BuffersPythonRRubySass (Sass)Sass (Scss)SchemeSQLShellSwiftSVGTSXTypeScriptWebAssemblyYAMLXML.wcty-title { /* heading size, spacing */ } .wcty-table th, .wcty-table td { /* table padding/borders */ } .wcty-button { /* CTA button look */ }

Typography (Hind Siliguri)The plugin enqueues the font but doesn’t force it (v1.2). To apply it selectively:

Plain textANTLR4BashCC#CSSCoffeeScriptCMakeDartDjangoDockerEJSErlangGitGoGraphQLGroovyHTMLJavaJavaScriptJSONJSXKotlinLaTeXLessLuaMakefileMarkdownMATLABMarkupObjective-CPerlPHPPowerShell.propertiesProtocol BuffersPythonRRubySass (Sass)Sass (Scss)SchemeSQLShellSwiftSVGTSXTypeScriptWebAssemblyYAMLXML.wcty-title, .wcty-section-title { font-family: 'Hind Siliguri', sans-serif; }

🔌 Hooks

Filters

  • wcty_custom_text — Change the gratitude paragraph text

  • wcty_format_geo_value — Convert stored district/upazila values (e.g., numeric IDs → readable labels)

  • The Thank You URL override uses woocommerce_get_checkout_order_received_url.

📁 File Structure

Plain textANTLR4BashCC#CSSCoffeeScriptCMakeDartDjangoDockerEJSErlangGitGoGraphQLGroovyHTMLJavaJavaScriptJSONJSXKotlinLaTeXLessLuaMakefileMarkdownMATLABMarkupObjective-CPerlPHPPowerShell.propertiesProtocol BuffersPythonRRubySass (Sass)Sass (Scss)SchemeSQLShellSwiftSVGTSXTypeScriptWebAssemblyYAMLXMLwoodmart-custom-thank-you/ ├─ woodmart-custom-thank-you.php # Main plugin (activation, assets, shortcode, redirect) ├─ templates/ │ └─ thank-you.php # The Thank You page template (Bengali layout) ├─ css/ │ └─ styles.css # Scoped, well-commented styles └─ includes/ └─ functions.php # (Reserved) helper functions

❓ FAQ

Q: Does this change WooCommerce settings?A: It doesn’t modify Woo settings directly. Instead, it filters the “order received” URL to point to the custom page, passing order + key. This is safer and one-click.

Q: Will it work without WoodMart?A: Yes. It’s built to be WoodMart-friendly but doesn’t hard-depend on it.

Q: Elementor is not installed. Is that a problem?A: No. If elementor_full_width template doesn’t exist, WordPress will use the default page template. You can edit or change the page’s template later.

Q: My district/upazila doesn’t show.A: Provide your exact meta keys (e.g., billing_bd_district_id, shipping_bd_upazila) or share the field-registration snippet, and map them via the provided filter.

🐞 Troubleshooting

  • Blank details on Thank You page: Ensure the URL includes ?order=ID&key=ORDER_KEY. Without the key match, the template won’t expose order data.

  • Styles not applied: Confirm /css/styles.css is enqueued (plugin does this only on the Thank You page).

  • Template not full width: Check that your theme has a page template named elementor_full_width or switch the page’s template manually in the editor.

🗓 Changelog

1.2

  • Restored v1.0 design (no global font override)

  • Kept Elementor full-width template on activation

  • Enqueue Hind Siliguri (not applied by default)

  • Robust district/upazila detection & filters

1.1

  • Added Hind Siliguri font & applied globally

  • Set Elementor full-width page template

1.0

  • Initial release: auto page, shortcode, redirect, Bengali UI, CSS

📄 License

GPL-2.0-or-later

🙌 Credits

  • Hind Siliguri font by Indian Type Foundry (served via Google Fonts).

  • Built to be friendly with WoodMart and WooCommerce.

Contributing

PRs and issues welcome. If your site uses a specific checkout plugin for Bangladesh addresses, please open an issue with the exact meta keys (or a code snippet) so we can add first-class support.

Read the full README on GitHub →