{"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":"2025-04-29T15:00:09","modified_gmt":"2025-04-29T15:00:09","slug":"saudi-riyal-icon","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/saudi-riyal-icon\/","author":20524353,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.16","stable_tag":"1.1.16","tested":"6.8.5","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":"2025-04-29 15:00:09","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/sh8adat.com\/home\/donate\/","header_plugin_uri":"","header_author_uri":"https:\/\/sh8adat.com","rating":0,"author_block_rating":0,"active_installs":10,"downloads":342,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"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"}},"upgrade_notice":{"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. No additional setup is needed.<\/p>","1.1.14":"<p>Improved code comments for clarity. No action required unless using PDF invoices (later updated in 1.1.15).<\/p>","1.1.13":"<p>Enhanced debugging and media library integration for PDFs (reverted in 1.1.15). Update for better reliability.<\/p>","1.1.12":"<p>Fixed security and debugging issues. Recommended for all users to ensure safety and compliance.<\/p>","1.1.11":"<p>Fixed a fatal error in the PDF invoice integration. Ensure <code>sr.png<\/code> is available for PDF invoices to work correctly.<\/p>","1.1.10":"<p>Added support for PDF invoices using a PNG icon. Convert <code>sr.svg<\/code> to <code>sr.png<\/code> (20px by 20px) and place it in the <code>assets<\/code> folder for this feature to work.<\/p>","1.1.9":"<p>Added support for customer order details page. Update to ensure the Riyal icon appears in all customer-facing order views.<\/p>","1.1.8":"<p>Fixed icon size to 20px in order details, thank-you page, and emails. Recommended for consistent icon display.<\/p>","1.1.7":"<p>Reverted SVG sanitization and fixed icon visibility issues. Icon size set to 20px for consistency.<\/p>","1.1.6":"<p>Added SVG sanitization to fix checkout totals and invoices. Improved debugging logs.<\/p>","1.1.5":"<p>Initial fix for checkout totals and invoices (further improved in later versions).<\/p>","1.1":"<p>This update fixes the icon size to 12px and adds support for the &quot;\u0631.\u0633&quot; symbol. Recommended for all users.<\/p>","1.0":"<p>Initial release of the plugin.<\/p>"},"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.16"],"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, replacing the currency symbol."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[8504,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-saudi-riyal","plugin_tags-svg-icon","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-sh8adat","plugin_committers-sh8adat"],"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 contexts like the shop, cart, checkout, customer order details, and emails. For PDF invoices, it uses the standard \"\u0631.\u0633\" symbol to ensure compatibility. No coding required\u2014just 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 plugins like WooCommerce PDF Invoices &amp; Packing Slips).<\/li>\n<li>Supports non-WooCommerce sites by replacing \"SAR\" or \"\u0631.\u0633\" in page content.<\/li>\n<li>Automatically adjusts icon spacing for RTL (e.g., Arabic) and LTR (e.g., English) layouts.<\/li>\n<li>Ensures consistent 20px icon size across all contexts (except PDFs, which use text).<\/li>\n<li>Lightweight, secure, and easy to use.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>saudi-rial-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 in page content for non-WooCommerce sites.<\/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> within the plugin folder. Ensure this file is included for the plugin to function correctly.<\/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\" symbol instead of an image, providing reliable rendering with plugins like WooCommerce PDF Invoices &amp; Packing Slips.<\/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 across all contexts. Developers can modify the CSS in the plugin code (<code>add_icon_styles<\/code> and <code>add_admin_icon_styles<\/code> methods) to adjust it.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\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, though PNG support was 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, aligning with WordPress best practices.<\/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 to display the Riyal icon in PDF invoices.<\/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 (e.g., subtotals, discounts, totals).<\/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 to prevent <code>.cls-1<\/code> leakage in sanitized contexts.<\/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 in checkout totals, discounts, and invoices.<\/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 (later refined in 1.1.6).<\/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 an SVG icon on WooCommerce and WordPress sites. Works in prices, orders, emails. Activate and go!","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/229589","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=229589"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/sh8adat"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=229589"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=229589"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=229589"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=229589"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=229589"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=229589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}