| 开发者 | ruyhan |
|---|---|
| 更新时间 | 2026年7月20日 23:28 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[estitofo_form] shortcode and a matching Elementor widget[estitofo_form] shortcode onto any page, or use the Elementor widget Estimation Tool./wp-content/plugins/, or install it through the WordPress Plugins screen.[estitofo_form] to any page, or insert the Elementor widget.Yes. Product data, pricing, and currency all come from WooCommerce.
Yes. An Estimation Tool widget appears in the Elementor editor (Elementor 3.5 or higher).
Yes. The plugin declares compatibility with custom_order_tables and cart_checkout_blocks.
In a dedicated database table (wp_estimation_submissions). Soft-deleted rows go to a trash view and can be restored or permanently deleted.
The submissions table and the plugin's options are removed. Active submissions are deleted.
The plugin ships TCPDF (LGPL-3.0) for PDF generation. No external service is contacted.
estitofo_display_price filter — add-ons can adjust the prices shown in search results, suggestions and the REST API (used by Pro's role-based pricing).estitofo_pdf_engine filter — add-ons can supply a fully built PDF object to replace the built-in layout (used by the Pro add-on's multi-template engine). No behaviour change when the filter is unused.tcpdf_autoconfig.php and the core font metric files) were missing from the bundled lib/ directory. PDF generation now works again on all sites.quotely-estimates-for-woocommerce. The internal estitofo_ code prefix, the [estitofo_form] shortcode and stored option keys are unchanged, so existing installs upgrade without data loss.tcpdf/ directory with a Composer + Strauss-managed copy under lib/ where the main class is prefixed to Estitofo_TCPDF (and all sub-classes likewise). This eliminates the naming conflict that would occur if another plugin bundles a different TCPDF version — the classes are now completely isolated under the plugin's own namespace.Estitofo_TCPDF instead of TCPDF.lib/ include a defined('ABSPATH') || exit; direct-access guard as required by WordPress.org.K_TCPDF_EXTERNAL_CONFIG and K_TCPDF_THROW_EXCEPTION_ERROR constants into tcpdf/tcpdf.php (where they belong as library configuration) so they no longer appear in the plugin's own namespace scan.class_exists('TCPDF') early-return guard at the top of tcpdf/tcpdf.php so the library is self-protecting against double-load regardless of load order.current_time('timestamp'), translator comment placement, and inline comment punctuation.Requires at least) from 5.6 to 6.4 in both the plugin header and readme.txt.Tested up to: 7.0 (current WordPress stable) in both files.class_exists('TCPDF') guard, and TCPDF's own K_TCPDF_EXTERNAL_CONFIG / K_TCPDF_THROW_EXCEPTION_ERROR constants are wrapped in defined() checks to avoid conflicts with other plugins bundling TCPDF.estitofo_rl_ key prefix (previously the obsolete wc_est_rl_ prefix left orphaned rows in wp_options).Tested up to: 6.9 while readme.txt had already been bumped to 7.0. Plugin Check's mismatched_tested_up_to rule (severity 7) was the only critical error remaining. Both files are now in sync at 7.0 (current WordPress major release).missing_direct_file_access_protection (severity 6) on all TCPDF vendor files: added defined('ABSPATH') || exit; immediately after the file-level docblock in each of the 31 PHP files under tcpdf/. The check ships expects every PHP file in a plugin to refuse direct access. Since TCPDF is only ever loaded from inside WordPress (where ABSPATH is defined), this guard never triggers and library behavior is unchanged.woocommerce-estimation-tool.php to estimation-tool-for-woocommerce.php so it matches the WordPress.org plugin slug. Plugin Check's "mismatched_plugin_slug" rule (severity 7) was the only critical-level error remaining; this fixes it. Internal references use __FILE__/plugin_basename(__FILE__) so no other code change was needed; the .pot translation template's file-reference comments were updated to match.uninstall.php rewritten: all logic is now wrapped in estitofo_uninstall_cleanup() so no variables leak into the global scope. @unlink() calls replaced with wp_delete_file(). The @rmdir() call replaced with $wp_filesystem->rmdir() after loading wp-admin/includes/file.php.class-estimation-pdf.php: every error_log() call is now tagged with // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log (calls remain gated on WP_DEBUG, so they only fire in development). The three-line fopen / fread / fclose block in png_has_alpha() is now a single bounded file_get_contents($path, false, null, 0, 26) call.class-estimation-settings.php import handler: file_get_contents() of the uploaded JSON file replaced with $wp_filesystem->get_contents() via the WP_Filesystem API.class-estimation-mailer.php: the @file_put_contents() call that drops an empty index.html into the tmp directory (to prevent directory listing) replaced with $wp_filesystem->put_contents().class-estimation-rest.php: added // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_tax_query on the optional tax_query branch — the query is opt-in and capped by posts_per_page.Estitofo_Plugin::public_pdf): wrapped $_REQUEST reads in a phpcs:disable WordPress.Security.NonceVerification.Recommended block. The endpoint is HMAC-token-gated (validated via hash_equals()), so a nonce isn't applicable./** */ file-level docblock to the top of every PHP file under tcpdf/ so Plugin Check's missing_doc_comment rule (which doesn't honor phpcs:ignoreFile) is satisfied. The existing phpcs:ignoreFile pragma stays on the next line for PHPCS rules. TCPDF's own header comments below are unchanged.flags@2x.png / flags@2x.webp / globe@2x.png / globe@2x.webp (and the _light variants) to dash-separated names (flags-2x.*, globe-2x.*). The @ character isn't allowed in file names per WordPress.org's naming rules. CSS updated to reference the new names.globe_light.png/webp, globe_light@2x.png/webp) — never referenced by CSS or JS, removing them shrinks the plugin slightly.tcpdf/config/tcpdf_config.php file (the 3.16.4 release switched TCPDF to load via K_TCPDF_EXTERNAL_CONFIG = true, so this config file was no longer loaded by anything and was only triggering Plugin Check noise).// phpcs:ignoreFile pragma to the top of every PHP file under tcpdf/ to signal "this is a third-party library, exempt from WordPress coding standards" to Plugin Check / PHPCS / WP.org's automated review. TCPDF's existing C-style file headers are preserved untouched on the lines below.config/tcpdf_config.php dropped the if (!defined(...)) guards on its define() calls, so any constant the host plugin pre-defines (we set K_TCPDF_THROW_EXCEPTION_ERROR to true so PDF errors throw catchable exceptions instead of die()-ing) triggered a redefinition warning. Fixed by setting K_TCPDF_EXTERNAL_CONFIG = true before loading TCPDF — tcpdf_autoconfig.php still supplies all the same PDF_* / K_* defaults but through guarded checks. No TCPDF source files modified./Producer header bump.images/ (demo logo), tools/ (CLI utilities), Makefile, and CHANGELOG.TXT from the shipped library — plugin remains under 4 MB.form-table blocks (especially Pro Features) showed inconsistent padding, asymmetric borders, and section headings floating between cards. Section <h2> headings inside the form are now styled as proper section dividers, row spacing is even across all tabs, and the submit-button row integrates with the card via a hairline rule.estitofo_pro_purchase_url filter so site owners / Pro can override the upsell URL.wc_estimation_* / WC_Estimation_* to plugin-unique estitofo_* / Estitofo_* throughout: classes, defined constants, option keys, transients, AJAX action names, hook names, nonces, REST namespace, JS globals, shortcode ([estitofo_form]). The plugin slug and text domain stay the same.<script> / <style> blocks in admin pages moved into a dedicated assets/js/admin-settings.js enqueued via admin_enqueue_scripts, and a new section in assets/css/admin-estimation.css. No more inline tags in PHP output.apply_filters('estitofo_save_settings', …) now receives an early-sanitized snapshot of the submitted array (every value run through sanitize_text_field) instead of the raw $_POST data. Add-ons can re-sanitize their own keys as needed.Requires Plugins: woocommerce header so WordPress can pre-check the WooCommerce dependency before activation.Estitofo_Plugin::PRO_PURCHASE_URL so the destination is easy to swap when the Pro item is published. Default points to a CodeCanyon search URL (no 404) until the author updates it with the live CodeCanyon item URL.[wc_estimation_tool heading="…" subheading="…"]) and Elementor widget controls.padding-left: 48px !important on .wc-search-input (via a more specific .wc-estimation-wrapper .wc-search-input selector), pinned the icon to left: 16px / width: 18px with !important, and added text-indent: 0 !important to neutralise theme rules. Net result: at least 14px clear space between the icon's right edge and the start of the placeholder text on every theme.bd) wasn't reflecting on the frontend because enqueue_assets was reading the legacy standalone option wc_estimation_default_country instead of the consolidated wc_estimation_settings array. Now uses Estitofo_Options::get('default_country') so the saved value is honoured.<select> dropdowns with flag emoji, country name and dial code (e.g. 🇧🇩 Bangladesh (+880)) — no more typing ISO codes from memory.01851932715 with BD flag is correctly accepted.isValidNumber + isPossibleNumber, with raw input + E.164 + leading-zero-stripped form, with both upper- and lower-case ISO country codes) and accepts if ANY of them returns true. Bangladesh's leading-zero national format like 01851932715 now reliably validates against the BD flag because at least one of those combinations will recognise it.?wcestphonedebug=1 to the URL and every validation prints {input, country, accepted, tries: [...]} to the browser console — makes it trivial to see which library call accepted/rejected a given number.nationalMode to true so the library expects users to type their local format (e.g. 01851932715 with the leading zero), which is what people actually do. isValidNumber() is now the single source of truth: green tick when it returns true, specific error message via getValidationError() when false.iti.getNumber()), verifies the resulting prefix matches the selected country's dial code, then asks isPossibleNumber() whether the full E.164 is plausible for that country. Valid 01851932715 with 🇧🇩 selected passes; the same digits with 🇺🇸 selected now fail.01851932715. Previously libphonenumber's isValidNumber() rejected the leading-zero national form even though it's how 99% of users actually type their number. The validator now layers four soft-pass checks: isValidNumber() → isPossibleNumber() → getValidationError() IS_POSSIBLE codes → digit-count plausibility (7–15). The wrong-country +xx prefix check remains a hard fail so the BD-on-US-flag case is still rejected.isValidNumber() rejects perfectly-good numbers that aren't in the strictest canonical form (leading-zero national prefix, mobile/landline-only ranges, etc.). The validator now treats those as acceptable when getValidationError() reports IS_POSSIBLE (0) or IS_POSSIBLE_LOCAL_ONLY (4) — the field clears silently. Only real format errors (wrong country, too short, too long, invalid length) block submission.+xx… with a different flag selected still fails fast.utils.js was distributed as an ES module ending with export default utils;. When loaded via a regular tag (as we and intl-tel-input both do) the export keyword threw Uncaught SyntaxError: Unexpected token 'export', the global window.intlTelInputUtils was never set, and all country-aware phone validation silently degraded to the lenient fallback. Replaced the trailing 3 lines so the file works as a classic script: assigns window.intlTelInputUtils = window.intlTelInputUtilsTemp.utils.js library (country rules) is now pre-enqueued via wp_enqueue_script so it loads with the page instead of being lazy-loaded by intl-tel-input after init — eliminates the race window where validation got stuck waiting.utils.js is still blocked (CSP / hardened host), the validator now falls back to a 7–15 digit length check after 3 seconds instead of staying in "Checking…" forever.isValidNumber() against intlTelInputUtils.getRegionCodeForNumber() and against any user-typed +xx prefix.utils.js is still loading instead of falling through to a lenient length check — eliminates the race window where an invalid number could slip in before country rules arrived.TypeError: in_array(): Argument #2 must be of type array, null given and a chain of "Undefined property" warnings on PHP 8.2.x + opcache. Root cause: TCPDF 6.10 declares properties like protected $fontkeys = array(); but never reassigns them in __construct(). On certain PHP/opcache combinations, the class-property default isn't materialised on the instance, so every later read returns NULL. We now run a reflection-based property pre-seed right after new TCPDF() that force-initialises fontkeys, numfonts, fonts, font_subsetting, pdfa_mode, isunicode, FillColor, DrawColor, TextColor, CoreFonts, and 9 other dependencies. The fix is contained inside our class — TCPDF itself isn't patched.in_array(NULL) fatal that hit hosts without the GD extension. Non-Latin currency symbols still display correctly via the ISO-code fallback in money().gd extension in php.ini, or (c) install Imagick.logo_id from logo_url on the PDF tab — older saved logos now work without re-uploading.@ prefix, then falls back to a regular path-based Image() call. If both fail, WP_DEBUG logs the exact stage that broke.@ prefix instead of a filesystem path. This bypasses every open_basedir / mixed-slash / hardened-host issue that was preventing the logo from appearing.!important size overrides.:has() selector), animated modal with backdrop blur, customer info card in modal, cleaner action buttons.resolve_logo_path() with path normalization (collapses mixed slashes), 4-stage fallback (attachment ID → URL parse → reverse-resolve URL → strip thumb suffix), and WP_DEBUG error_log diagnostics when resolution fails.get_attached_file() for rock-solid path resolution. Logo preview + Remove button in the admin.৳ for BDT) now decode correctly; non-Latin symbols fall back to the ISO code (BDT, INR, THB, KRW, …) so amounts always render.wc_get_products, name__like, SKU, and finally WP_Query.wc_estimation_settings option (one-time migration from v2.1 keys).wc-estimation/v1 (search, suggested, categories, save, resume) — front-end now uses REST with an admin-ajax fallback.wc_estimation_ to avoid collisions.admin-post.php POST with nonce in body.$_REQUEST reads.date() calls with date_i18n() / gmdate().console.log; internationalized all frontend strings via wp_localize_script.