{"id":229589,"date":"2025-04-29T15:01:25","date_gmt":"2025-04-29T15:01:25","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/saudi-riyal-icon\/"},"modified":"2026-07-31T03:11:55","modified_gmt":"2026-07-31T03:11:55","slug":"saudi-riyal-icon","status":"publish","type":"plugin","link":"https:\/\/azb.wordpress.org\/plugins\/saudi-riyal-icon\/","author":20524353,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.2.0","stable_tag":"1.2.0","tested":"7.0.3","requires":"5.0","requires_php":"7.0","requires_plugins":null,"header_name":"Saudi Riyal Icon","header_author":"Sh8adat","header_description":"Replaces the \"SAR\" or \"\u0631.\u0633\" currency symbol with a custom SVG icon. Just activate and go Learn more at <a href=\"https:\/\/sh8adat.com\">sh8adat.com<\/a>","assets_banners_color":"","last_updated":"2026-07-31 03:11:55","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/sh8adat.com\/home\/donate\/","header_plugin_uri":"https:\/\/sh8adat.com","header_author_uri":"https:\/\/sh8adat.com","rating":0,"author_block_rating":0,"active_installs":10,"downloads":587,"num_ratings":0,"support_threads":1,"support_threads_resolved":1,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"sh8adat","date":"2025-04-29 15:01:42"},"1.1.16":{"tag":"1.1.16","author":"sh8adat","date":"2025-04-29 15:00:09"},"1.2.0":{"tag":"1.2.0","author":"sh8adat","date":"2026-07-31 03:11:55"}},"upgrade_notice":{"1.2.0":"<p>Major update with improved stability, security, proper Arabic support, and translation readiness. Highly recommended for all users.<\/p>","1.1.16":"<p>Updated CSS enqueuing to meet WordPress.org standards and improved performance. No setup needed.<\/p>","1.1.15":"<p>PDF invoices now use the text symbol &quot;\u0631.\u0633&quot; instead of a PNG icon for better compliance.<\/p>"},"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.16","1.2.0"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"The Saudi Riyal SVG icon displayed in place of \"SAR\" or \"\u0631.\u0633\" on a WooCommerce product page.","2":"The Riyal icon in the cart and checkout pages, consistently sized at 20px.","3":"The Riyal icon in customer order details (<code>\/my-account\/orders\/view-order\/<\/code>).","4":"The text symbol \"\u0631.\u0633\" in a PDF invoice."}},"plugin_section":[],"plugin_tags":[8504,273902,239270,222779,286],"plugin_category":[45],"plugin_contributors":[241563],"plugin_business_model":[],"class_list":["post-229589","plugin","type-plugin","status-publish","hentry","plugin_tags-currency","plugin_tags-riyal","plugin_tags-saudi-riyal","plugin_tags-svg-icon","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-sh8adat","plugin_committers-adhubyani","plugin_committers-sh8adat","plugin_support_reps-adhubyani"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/saudi-riyal-icon.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>The Saudi Riyal Icon plugin replaces the \"SAR\" or \"\u0631.\u0633\" currency symbol with a custom SVG icon on your WordPress site. Designed for seamless integration with WooCommerce, it enhances the visual appeal of prices in the shop, cart, checkout, customer order details, and emails. For PDF invoices it uses the standard text symbol \"\u0631.\u0633\" for reliable rendering. No coding required \u2014 just activate and it works automatically!<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li>Replaces \"SAR\" or \"\u0631.\u0633\" with a custom SVG icon in WooCommerce prices (shop, product pages, cart, checkout, thank-you page, admin order details, customer order details, and emails).<\/li>\n<li>Uses the text symbol \"\u0631.\u0633\" in PDF invoices for reliable rendering (compatible with WooCommerce PDF Invoices &amp; Packing slips).<\/li>\n<li>Supports non-WooCommerce sites by safely replacing \"SAR\" or \"\u0631.\u0633\" in page content.<\/li>\n<li>Automatically adjusts icon spacing for RTL (Arabic) and LTR (English) layouts.<\/li>\n<li>Ensures consistent 20px icon size across all contexts (except PDFs, which use text).<\/li>\n<li>Lightweight, secure, and translation-ready (includes Arabic .po\/.mo support).<\/li>\n<li>Proper WooCommerce checks to prevent errors when WooCommerce is not active.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>saudi-riyal-icon<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the \"Plugins\" menu in WordPress.<\/li>\n<li>Done! The \"SAR\" or \"\u0631.\u0633\" symbol will be replaced with the SVG icon automatically (PDF invoices use the text symbol \"\u0631.\u0633\").<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20plugin%20require%20woocommerce%3F\"><h3>Does this plugin require WooCommerce?<\/h3><\/dt>\n<dd><p>No. It works with or without WooCommerce. It replaces \"SAR\" or \"\u0631.\u0633\" in WooCommerce prices and also in regular page content.<\/p><\/dd>\n<dt id=\"where%20is%20the%20svg%20icon%20stored%3F\"><h3>Where is the SVG icon stored?<\/h3><\/dt>\n<dd><p>The SVG icon is located in <code>assets\/sr.svg<\/code> inside the plugin folder. Make sure this file is present.<\/p><\/dd>\n<dt id=\"why%20does%20the%20plugin%20use%20a%20text%20symbol%20in%20pdf%20invoices%3F\"><h3>Why does the plugin use a text symbol in PDF invoices?<\/h3><\/dt>\n<dd><p>To ensure compatibility and compliance with WordPress guidelines. PDF invoices use the standard \"\u0631.\u0633\" text symbol instead of an image.<\/p><\/dd>\n<dt id=\"can%20i%20customize%20the%20icon%20size%3F\"><h3>Can I customize the icon size?<\/h3><\/dt>\n<dd><p>The SVG icon size is set to 20px for optimal display. Developers can modify the CSS in the <code>add_icon_styles<\/code> and <code>add_admin_icon_styles<\/code> methods.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>Complete rewrite for better stability and security.<\/li>\n<li>Fixed fatal errors when WooCommerce is not active.<\/li>\n<li>Proper UTF-8 support for the Arabic symbol \"\u0631.\u0633\".<\/li>\n<li>Safer content replacement (word-boundary for \"SAR\").<\/li>\n<li>Fixed PDF invoice filter add\/remove logic.<\/li>\n<li>Added full internationalization support (text domain + Arabic .po\/.mo).<\/li>\n<li>Removed forced price separators that overrode store settings.<\/li>\n<li>Improved code structure and performance.<\/li>\n<li>Updated to version 1.2.0.<\/li>\n<\/ul>\n\n<h4>1.1.16<\/h4>\n\n<ul>\n<li>Fixed: Properly enqueued CSS using <code>wp_register_style()<\/code> and <code>wp_enqueue_style()<\/code> per WordPress.org guidelines.<\/li>\n<li>Improved: Simplified price formatting logic for better performance.<\/li>\n<li>Updated: Short description in readme.txt to meet 150-character limit.<\/li>\n<\/ul>\n\n<h4>1.1.15<\/h4>\n\n<ul>\n<li>Changed PDF invoices to use the text symbol \"\u0631.\u0633\" instead of a PNG icon to comply with WordPress plugin guidelines.<\/li>\n<li>Removed PNG icon support and related media library integration for simplicity.<\/li>\n<\/ul>\n\n<h4>1.1.14<\/h4>\n\n<ul>\n<li>Improved documentation in code to clarify PDF invoice image handling (PNG support later removed in 1.1.15).<\/li>\n<\/ul>\n\n<h4>1.1.13<\/h4>\n\n<ul>\n<li>Replaced debugging logs with WooCommerce\u2019s logging system for production safety.<\/li>\n<li>Integrated PNG icon with WordPress media library for PDF invoices (reverted in 1.1.15).<\/li>\n<\/ul>\n\n<h4>1.1.12<\/h4>\n\n<ul>\n<li>Fixed security issue by properly escaping debug output to prevent XSS vulnerabilities.<\/li>\n<li>Improved logging to only activate in debug mode.<\/li>\n<\/ul>\n\n<h4>1.1.11<\/h4>\n\n<ul>\n<li>Fixed a syntax error in the PDF invoice integration that caused a fatal error.<\/li>\n<li>Improved error handling for missing PNG files in PDF invoices.<\/li>\n<\/ul>\n\n<h4>1.1.10<\/h4>\n\n<ul>\n<li>Added support for PDF invoices using a PNG version of the icon (<code>sr.png<\/code>).<\/li>\n<li>Integrated with WooCommerce PDF Invoices &amp; Packing Slips.<\/li>\n<\/ul>\n\n<h4>1.1.9<\/h4>\n\n<ul>\n<li>Added support for customer order details page (<code>\/my-account\/orders\/view-order\/<\/code>).<\/li>\n<li>Ensured the SVG icon appears in customer-facing order details.<\/li>\n<\/ul>\n\n<h4>1.1.8<\/h4>\n\n<ul>\n<li>Fixed icon size in WooCommerce order details (admin, thank-you page, emails) to be consistently 20px.<\/li>\n<li>Added inline SVG width and height attributes for better email compatibility.<\/li>\n<\/ul>\n\n<h4>1.1.7<\/h4>\n\n<ul>\n<li>Removed SVG sanitization to restore icon visibility in cart, shop, and product pages.<\/li>\n<li>Replaced SVG <code>&lt;style&gt;<\/code> block with inline styles.<\/li>\n<li>Set icon size to 20px across all contexts.<\/li>\n<\/ul>\n\n<h4>1.1.6<\/h4>\n\n<ul>\n<li>Added minimal SVG sanitization to prevent stripping in checkout totals and invoices.<\/li>\n<li>Fixed <code>.cls-1 { fill: #888ea8; }<\/code> issue.<\/li>\n<li>Improved logging for debugging.<\/li>\n<\/ul>\n\n<h4>1.1.5<\/h4>\n\n<ul>\n<li>Initial attempt to fix <code>.cls-1 { fill: #888ea8; }<\/code> issue in checkout totals and invoices.<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Fixed icon size to 12px for better display.<\/li>\n<li>Added support for replacing \"\u0631.\u0633\" in addition to \"SAR\".<\/li>\n<li>Improved compatibility with WooCommerce and non-WooCommerce sites.<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Replaces &quot;SAR&quot; or &quot;\u0631.\u0633&quot; with a custom SVG icon on WooCommerce and WordPress sites. Works in prices, orders, emails. Activate and go!","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/229589","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=229589"}],"author":[{"embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/sh8adat"}],"wp:attachment":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=229589"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=229589"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=229589"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=229589"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=229589"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=229589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}