| 开发者 |
mostafas1990
kashani |
|---|---|
| 更新时间 | 2026年11月12日 01:31 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
persian_kit_date(), persian_kit_to_persian_digits(), persian_kit_validate_national_id(), persian_kit_validate_iban() and morewp persian-kit normalize and wp persian-kit importpersian-kit.zip, or copy the plugin folder to /wp-content/plugins/.Yes. Settings are per site. Network activation sets the default settings on every site, including sites added later. Configure each site from its own Persian Kit screen. Uninstalling removes the plugin's options from every site in the network.
Yes. Persian Kit declares HPOS compatibility, and the Jalali order date filter works on both the classic orders screen and the HPOS Orders screen.
Persian Kit ships a Persian (fa_IR) translation of its settings screen. When a language pack for your language is available on translate.wordpress.org, WordPress installs it and Persian Kit uses it instead of the bundled file.
Nothing in your saved content. On a new install:
With Use Persian slugs on (Persian Kit → Writing → Persian slugs, on by default), new posts and terms with Persian titles keep the Persian letters in the slug, and a half-space becomes "-". Titles without Persian letters are slugged by WordPress as usual. Existing slugs are never rewritten, and old URLs keep working. Turn the option off to go back to WordPress's percent-encoded slugs. Links in your pages are percent-encoded either way, like WordPress's own Persian links, and browsers show them with Persian letters.
With Jalali dates on, the dashboard's Activity widget, the post lists and the admin bar show Jalali dates. The Activity widget is WordPress's own widget, shown with Jalali dates. The admin font applies only when the admin language is Persian or right-to-left.
With Jalali dates on, a date archive whose year is below 1700 is Jalali:
/1405/07/ lists the posts of Mehr 1405./1405/ lists the posts of the Jalali year./1405/07/09/ lists the posts of one day./2025/03/ keep working. A Gregorian month covers two Jalali months, so its title names both, for example "اسفند 1403 – فروردین 1404".
Yes, if your permalink structure has the date, such as "Day and name". Turn on Jalali dates in post links under Persian Kit → Display → Jalali dates. Posts then link to /1405/07/09/my-post/ instead of /2026/10/01/my-post/. Old Gregorian links redirect to the new ones, and turning the option off redirects the Jalali links back.
Jalali links keep working while Jalali dates are off, whichever plugin made them (Persian Kit, Parsi Date or WP Jalali). They redirect to the Gregorian links, but only while Persian Kit is active. If you deactivate it, they return "not found". Turn the option off first.
Yes. Turn on Show the Gregorian date too under Persian Kit → Display → Jalali dates. Post and comment dates then read "۱۰ مهر ۱۴۰۵ (2026-10-02)". You can show it with month names ("۲ اکتبر ۲۰۲۶"), put it first, and choose parentheses, a slash or a dash between the two dates. With Persian digits on for dates, the Gregorian date gets Persian digits too. Feeds, search engines, admin screens, emails, the store and archives keep a single date.
Yes. Afghanistan and Kurdistan use the same calendar under other names, and Persian Kit picks them from your site's language: Dari (fa_AF) gets حمل، ثور، جوزا… ("۱۲ میزان ۱۴۰۵"), Pashto (ps) وری، غویی، غبرګولی… ("۱۲ تله ۱۴۰۵") and Sorani Kurdish (ckb) خاکەلێوە، گوڵان، جۆزەردان… ("۱۲ ڕەزبەر ۱۴۰۵"). To choose another set, use Month names under Persian Kit → Display → Jalali dates. Weekdays, the Gregorian month names next to the Jalali date, the date picker and WooCommerce Analytics follow the same choice. The days and the year (1405) are the same as in Iran. On a WPML or Polylang site each language has its own choice, and Pashto and Kurdish pages get Jalali dates like Persian ones.
No. The WooCommerce features and the WooCommerce tab only appear when WooCommerce is installed and active.
With the WooCommerce module on, what customers type is fixed before it is saved. Persian and Arabic digits in phone numbers and postcodes become English digits, and Arabic ي and ك in names and addresses become Persian ی and ک. For addresses in Iran, the phone must be a valid mobile or landline number and the postcode must have 10 valid digits. This works in the classic checkout, the block checkout and My Account. You can also ask for the customer's national ID (optional or required). It is checked, and shown on the order screen and in order emails.
Yes. Turn on Persian Kit → Display → Persian digits → WooCommerce emails. Order numbers, prices, quantities and dates in Persian emails then use Persian digits, in the subject too. Phone numbers, postcodes, coupon codes and links keep English digits, so they can be copied and still work.
A customer who pastes an order number in Persian digits into the order tracking form, or an admin who pastes it into the order search, still finds the order. Gmail may not find "123" in a subject that says "۱۲۳". To keep order numbers in English digits, return false from the persian_kit_digit_conversion filter for woocommerce_email_order_number.
WooCommerce emails ask for Helvetica or Arial, which are made for English, so Persian text used to show in whatever font the mail app chose. With Persian font in emails on (Persian Kit → WooCommerce → Emails, on by default), Persian emails use Tahoma, then Segoe UI on newer Windows, the iPhone's own Persian font, and Noto Sans Arabic on Android. These are preferences for fonts the device already has, so nothing is downloaded. A font you chose under WooCommerce → Settings → Emails, or in the block email editor's styles, is kept, as are emails in other languages. On a right-to-left site, block emails also read right to left.
Yes, with Jalali dates in WooCommerce Analytics on (Persian Kit → WooCommerce → Dates, on by default). "Last month" is the last Jalali month, quarters are Jalali seasons (بهار, تابستان, پاییز, زمستان) and years start on 1 Farvardin, so reports group sales by Jalali calendar periods. Bars by month, season or year hold whole Jalali months, not Gregorian ones with Jalali names. Custom ranges are picked on a Jalali calendar, and dates in tables and charts are Jalali. CSV exports keep the Gregorian date and add a Jalali date column next to it. Stored order dates are not changed. Turn the option off to return to Gregorian periods.
Yes. Under Persian Kit → WooCommerce → Checkout and addresses, choose Only these provinces and tick the provinces you deliver to. For addresses in Iran, the checkout, the cart and My Account then list only those provinces, and any other province is refused. With one province, it is selected for the customer. The shop admin still lists every province, and past orders keep their province's name.
Yes. Under Persian Kit → WooCommerce → Checkout and addresses, tick Shorter checkout when nothing needs shipping. When every item in the cart is virtual, the checkout asks only for the name, country, phone and email, and for the national ID when it is on. Order notes stay. It works in the classic and the block checkout. As soon as the cart has an item that ships, the whole address is asked for again. Addresses customers saved in My Account don't change.
Yes. Pick Iranian thousand toman (هزار تومان) or Iranian thousand rial (هزار ریال) under WooCommerce → Settings → General → Currency. Changing the currency doesn't convert prices you have already saved, shipping costs or coupons, so update them yourself. Check that your payment gateway supports thousand toman first. Search engines get prices in rials, because they don't accept toman. Before you deactivate Persian Kit, switch the currency back to toman or rial.
Yes. Under Persian Kit → WooCommerce → Prices and currency, tick Show a text instead of an empty price, and leave the price empty on the products sold on request. A price of 0 means free. The product page shows «تماس بگیرید» or your own text, and the shop, categories and related products can show a shorter one. Add a phone number or a contact page address to link the text on the product page to it, and to turn the shop button into "Call for price". These products still can't be added to the cart.
Yes. While the integration is on and its plugin is active:
Yes. Once a language is set up, Persian, Pashto and Kurdish pages and emails get Jalali dates and Persian digits. Pages in other languages keep Gregorian dates and English digits. Admin screens follow each admin's own language (Users → Profile → Language).
Fixing letters, Persian slugs and the half-space key apply to Persian content only, so an Arabic translation keeps its ي and ك. With Jalali dates in post links, only Persian posts get Jalali links.
Weglot isn't supported. It translates finished pages and keeps the site's language, so Persian Kit can't tell its languages apart. TranslatePress and other plugins that change WordPress's language per page can turn this on with add_filter('persian_kit_multilingual', '__return_true');.
Yes. Each turns on by itself when its plugin is active (Integrations tab).
Yes, from Forminator 1.50. Date fields in the Calendar style get a Jalali date picker and still save Gregorian dates, so entries and exports don't change. While Jalali dates is on, emails and the Submissions screen show the Jalali date. For Iranian checks, add one of these classes to a field's Additional CSS Classes: persian-kit-mobile, persian-kit-national-id, persian-kit-postcode, persian-kit-card or persian-kit-iban. Persian digits typed into phone and number fields become English digits.
Yes, from Gravity Forms 2.9.
Yes, from WPForms 1.9.1, including WPForms Lite. The builder's Add Fields panel has an "Iranian fields" group with mobile number, national ID, postcode, bank card number and IBAN fields that check what is typed, and a Jalali date field with a Jalali date picker. Emails show the Jalali date. Persian digits typed into number and price inputs become English digits. WPForms' paid Date / Time, Phone and Address fields are not covered yet.
They keep working, with these differences:
Yes. With the city list on, the city field suggests the province's cities, but customers can still type a village or any place that isn't listed.
Yes. It ignores spaces, half-spaces and the letters people type differently, such as Arabic ي and ك, ئ and گ: قائمشهر finds قایم شهر and مشکین finds مشگین شهر. When the order or address is saved, a city typed another way is saved under its listed name, so orders use one spelling. A place that isn't listed is saved as typed. To add villages, or to rename or remove a city, use the persian_kit_woocommerce_cities filter.
From the Statistical Centre of Iran's country-divisions list for 1403 (amar.org.ir): the 1,454 cities of its 31 provinces.
Persian Kit changes how dates are shown and leaves the dates that other code reads standard. Dates meant for machines stay Gregorian, and the dates people read are Jalali. We tested Persian Kit 1.0.2, Parsi Date 6.5.2 and Persian WooCommerce 10.0.7 on the same test site, one at a time, with the same content. The test ran on 11 November 2026 with WordPress 7.1.4, PHP 8.3, WooCommerce 11.2.2 and Yoast SEO 28.8. Each result below is the mean or the median of 3 rounds of 30 requests on 14 pages.
<time> tag kept a Gregorian ISO date with the right time zone offset (+03:30), wp_date( 'c' ) and wp_date( 'U' ) were unchanged, and the date in the Yoast SEO title stayed Gregorian. In the same test Parsi Date wrote +00:00 into the <time> tag, and Persian WooCommerce wrote a Jalali date into its datetime attribute.Yes. Open Persian Kit → Tools → Switch from another plugin. It shows what Persian Kit does with each of the old plugin's settings and data before anything changes.
wp persian-kit import list.
functions.php.
wp persian-kit import.& showed broken characters with Persian digits on.date_jalali and date_modified_jalali were empty when a request asked for them with _fields but not for date or modified.eram/abzar (0.8) and eram/daynum (1.0.0-beta.3) libraries.persian_kit_*, including persian_kit_currency_format, persian_kit_currency_convert, persian_kit_words_to_number, persian_kit_validate_postal_code, persian_kit_validate_plate_number, persian_kit_validate_bill_id, persian_kit_half_space_fix, persian_kit_keyboard_fix, persian_kit_persian_sort.-. Slugs saved by earlier versions keep working, and posts created before activation load again.pa_color) are left to WordPress, which fixes attributes being renamed to pa-color.the_date() printed the date for every post instead of once per day.wp_mail runs. Email content rendered before wp_mail() is called is still converted.