{"id":273251,"date":"2026-04-19T03:54:03","date_gmt":"2026-04-19T03:54:03","guid":{"rendered":"https:\/\/ja.wordpress.org\/plugins\/ec-relate-blocks\/"},"modified":"2026-04-19T04:02:23","modified_gmt":"2026-04-19T04:02:23","slug":"itmaroon-ec-relate-blocks","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/itmaroon-ec-relate-blocks\/","author":20901693,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"6.9.4","requires":"6.4","requires_php":"8.2","requires_plugins":null,"header_name":"ITMAROON EC RELATE BLOCKS","header_author":"Web Creator ITmaroon","header_description":"We provide blocks to build EC sites in cooperation with various EC companies.","assets_banners_color":"73c798","last_updated":"2026-04-19 04:02:23","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/itmaroon.net","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":172,"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":"itmaroon","date":"2026-04-19 04:02:23"}},"upgrade_notice":{"1.0.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3509859,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3509859,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544\u00d7500.png":{"filename":"banner-1544\u00d7500.png","revision":3509859,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772\u00d7250.png":{"filename":"banner-772\u00d7250.png","revision":3509859,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":{"itmar\/cart-block":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"itmar\/cart-block","version":"0.1.0","title":"CART BLOCK","category":"widgets","supports":{"html":false},"attributes":{"storefrontToken":{"type":"string"},"selectedFields":{"type":"array","default":[]},"numberOfItems":{"type":"number","default":3},"cartId":{"type":"string"},"cartIconId":{"type":"string"},"blocksAttributesArray":{"type":"array","default":[]}},"textdomain":"itmaroon-ec-relate-bloks","editorScript":"file:.\/index.js","editorStyle":"file:.\/index.css","style":"file:.\/style-index.css","viewScript":"file:.\/view.js"},"itmar\/product-block":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"itmar\/product-block","version":"0.1.0","title":"PRODUCT BLOCK","category":"widgets","supports":{"html":false},"attributes":{"pickupId":{"type":"string","default":"Default_Product"},"productPost":{"type":"string","default":"post"},"storeUrl":{"type":"string"},"shopId":{"type":"string"},"channelName":{"type":"string"},"headlessId":{"type":"string"},"apiSecretMask":{"type":"string"},"adminTokenMask":{"type":"string"},"storefrontTokenMask":{"type":"string"},"callbackUrl":{"type":"string"},"stripeKey":{"type":"string"},"selectedFields":{"type":"array","default":[]},"choiceTerms":{"type":"array","default":[]},"categoryArray":{"type":"array","default":[]},"numberOfItems":{"type":"number","default":3},"blocksAttributesArray":{"type":"array","default":[]}},"textdomain":"itmaroon-ec-relate-bloks","editorScript":"file:.\/index.js","editorStyle":"file:.\/index.css","style":"file:.\/style-index.css","viewScript":"file:.\/view.js"}},"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3509859,"resolution":"1","location":"assets","locale":"","width":414,"height":1251},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3509859,"resolution":"2","location":"assets","locale":"","width":1252,"height":1417},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3509859,"resolution":"3","location":"assets","locale":"","width":416,"height":1056},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3509859,"resolution":"4","location":"assets","locale":"","width":1613,"height":1215},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3509859,"resolution":"5","location":"assets","locale":"","width":488,"height":510}},"screenshots":{"1":"Product block settings (EC setting)","2":"Product listing \/ product card output (example)","3":"Cart block UI","4":"Checkout button redirecting to Shopify Checkout","5":"(Optional) Customer login flow (Headless)"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[3047,3148,282,6601,23548],"plugin_category":[45],"plugin_contributors":[218452],"plugin_business_model":[],"class_list":["post-273251","plugin","type-plugin","status-publish","hentry","plugin_tags-cart","plugin_tags-checkout","plugin_tags-ecommerce","plugin_tags-inventory","plugin_tags-shopify","plugin_category-ecommerce","plugin_contributors-itmaroon","plugin_committers-itmaroon"],"banners":{"banner":"https:\/\/ps.w.org\/itmaroon-ec-relate-blocks\/assets\/banner-772\u00d7250.png?rev=3509859","banner_2x":"https:\/\/ps.w.org\/itmaroon-ec-relate-blocks\/assets\/banner-1544\u00d7500.png?rev=3509859","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/itmaroon-ec-relate-blocks\/assets\/icon-128x128.png?rev=3509859","icon_2x":"https:\/\/ps.w.org\/itmaroon-ec-relate-blocks\/assets\/icon-256x256.png?rev=3509859","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/itmaroon-ec-relate-blocks\/assets\/screenshot-1.png?rev=3509859","caption":"Product block settings (EC setting)"},{"src":"https:\/\/ps.w.org\/itmaroon-ec-relate-blocks\/assets\/screenshot-2.png?rev=3509859","caption":"Product listing \/ product card output (example)"},{"src":"https:\/\/ps.w.org\/itmaroon-ec-relate-blocks\/assets\/screenshot-3.png?rev=3509859","caption":"Cart block UI"},{"src":"https:\/\/ps.w.org\/itmaroon-ec-relate-blocks\/assets\/screenshot-4.png?rev=3509859","caption":"Checkout button redirecting to Shopify Checkout"},{"src":"https:\/\/ps.w.org\/itmaroon-ec-relate-blocks\/assets\/screenshot-5.png?rev=3509859","caption":"(Optional) Customer login flow (Headless)"}],"raw_content":"<!--section=description-->\n<p>ITMAROON EC RELATE BLOCKS provides two Gutenberg blocks to integrate a headless Shopify commerce flow into a WordPress site:<\/p>\n\n<ul>\n<li><p><code>itmar\/product-block<\/code><\/p>\n\n<ul>\n<li>Links a WordPress post type to Shopify products.<\/li>\n<li>When the linked posts are published\/updated, the plugin can create\/update the corresponding Shopify product data (depending on your configuration and permissions).<\/li>\n<li>Designed for WordPress as the content layer (product pages) while Shopify remains the commerce layer (inventory + checkout).<\/li>\n<\/ul><\/li>\n<li><p><code>itmar\/cart-block<\/code><\/p>\n\n<ul>\n<li>Provides a cart UI powered by Shopify Storefront API Cart.<\/li>\n<li>Sends shoppers to Shopify Checkout to complete payment.<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<p>Important concept (recommended operation):\n* Shopify is the source of truth for inventory and checkout.\n* WordPress is the source of truth for marketing\/product content.\n* This plugin focuses on a smooth purchase flow from WordPress pages to Shopify Checkout.<\/p>\n\n<h3>Security \/ Data Handling (Important)<\/h3>\n\n<ul>\n<li>Admin API Token and Storefront API Token are saved server-side in WordPress options via REST and are NOT embedded into post content or rendered into front-end HTML.<\/li>\n<li>The editor UI no longer persists secret tokens as block attributes. Tokens should never be stored in post_content.<\/li>\n<\/ul>\n\n<h3>Block Overview<\/h3>\n\n<p>= itmar\/product-block =\nUse this block in the Site Editor (template) to enable Shopify connection and product linkage for a selected post type.<\/p>\n\n<p>Main settings (Block Inspector \u2192 \u201cEC setting\u201d):\n* Select Product Post Type\n* Store Site URL (Shopify domain)\n* Shop ID (for Customer Account API)\n* Channel Name (publication \/ sales channel display name)\n* Headless Client ID (Customer Account API client_id)\n* Admin API Token (saved server-side; not stored in post content)\n* Storefront API Token (saved server-side; not stored in post content)\n* Optional display controls (fields selector, display count, cart icon media ID, etc.)<\/p>\n\n<h4>itmar\/cart-block<\/h4>\n\n<p>Use this block to show the cart UI. It uses Shopify Storefront API Cart endpoints to:\n* Create\/update cart lines\n* Show totals\n* Provide a Checkout URL for completing purchase in Shopify Checkout<\/p>\n\n<h3>Shopify Setup (Required)<\/h3>\n\n<p>You need a Shopify store and API credentials.<\/p>\n\n<p>1) Admin API Access Token (for product\/customer management)\n* Create a Shopify app (Custom app) and generate an Admin API access token.\n* Grant only the minimum required permissions.<\/p>\n\n<p>2) Storefront API Access Token (for product\/cart\/checkout flow)\n* Create a Storefront access token in Shopify.<\/p>\n\n<p>3) Customer Accounts (Headless) (optional but recommended if you enable customer login)\n* Enable the new Customer Accounts \/ Customer Account API in Shopify.\n* Install Shopify \u201cHeadless\u201d (sales channel) and obtain the \u201cClient ID\u201d used for OAuth (Customer Account API).\n* You will also need the \u201cShop ID\u201d.\n  - Tip: You can derive Shop ID from the issuer value in:\n    https:\/\/{your-shop-domain}\/.well-known\/openid-configuration<\/p>\n\n<h3>Quick Start (Recommended Workflow)<\/h3>\n\n<p>1) Configure connection settings\n* Open the Site Editor.\n* Add <code>itmar\/product-block<\/code> to a global template (e.g., Header, or a dedicated template used site-wide).\n* In the block Inspector \u2192 \u201cEC setting\u201d, enter:\n  - Shopify domain (Store Site URL)\n  - Channel Name (e.g., \u201cOnline Store\u201d)\n  - Headless Client ID \/ Shop ID (if using customer login)\n  - Admin API Token and Storefront API Token (saved to WordPress options)<\/p>\n\n<p>2) Choose the linked post type\n* In <code>itmar\/product-block<\/code>, select your product post type (e.g., \u201cproduct\u201d).<\/p>\n\n<p>3) Add the cart\n* Add <code>itmar\/cart-block<\/code> to a template\/page where you want the cart UI to appear.<\/p>\n\n<p>4) Publish product posts\n* Create or edit posts in the selected post type.\n* Publish\/update them to trigger Shopify-side creation\/update (based on your configuration).<\/p>\n\n<h3>Related Links<\/h3>\n\n<ul>\n<li>ec-relate-blocks: GitHub\nhttps:\/\/github.com\/itmaroon\/itmaroon-ec-relate-blocks<\/li>\n<li>block-class-package: GitHub\nhttps:\/\/github.com\/itmaroon\/block-class-package<\/li>\n<li>block-class-package: Packagist\nhttps:\/\/packagist.org\/packages\/itmar\/block-class-package<\/li>\n<li>itmar-block-packages: npm\nhttps:\/\/www.npmjs.com\/package\/itmar-block-packages<\/li>\n<li>itmar-block-packages: GitHub\nhttps:\/\/github.com\/itmaroon\/itmar-block-packages<\/li>\n<\/ul>\n\n<h3>Developer Notes<\/h3>\n\n<ol>\n<li>PHP class management is done using Composer.<\/li>\n<li>Shared functions\/components are published as an npm package and reused across plugins.<\/li>\n<\/ol>\n\n<h3>External Services<\/h3>\n\n<p>This plugin connects to external services to provide e-commerce functionality.<\/p>\n\n<h4>Shopify<\/h4>\n\n<p>Service provider:\n* Shopify<\/p>\n\n<p>Domains contacted:\n* The Shopify shop domain configured by the site administrator (e.g. *.myshopify.com or a custom Shopify domain) for Admin API \/ GraphQL Admin API requests.\n* shopify.com for authentication \/ OAuth token exchange (when customer login is enabled).\n* Shopify-operated domains used for checkout and storefront features (depending on configuration).<\/p>\n\n<p>APIs used (depending on your configuration\/features enabled):\n* Shopify Admin API (product\/customer management)\n* Shopify GraphQL Admin API (graphql.json)\n* Shopify Storefront API (product\/cart\/checkout flow)\n* Shopify Customer Account API \/ OAuth endpoints (optional customer login)<\/p>\n\n<p>Data that may be sent to Shopify:\n* Store domain, channel name, and API credentials \/ access tokens (server-side)\n* Product data required for creating\/updating products (title, description, image, sales price, list price, quantity in stock)\n- The title is the title of the post data sent.\n- The description is an excerpt of the post data sent.\n- The image is the featured image, if one is set. Furthermore, if the ACF custom field has a gallery field named \"gallery\", images in that field will also be added.\n- The sales price is the price set in the \"prces\" group set in the ACF custom field if \"sales_price\" is set as a member.\n- The list price is the price set in the above group if \"list_price\" is set.\n- The stock quantity is set as the default quantity if \"quantity\" is set in the ACF custom field. However, this does not reflect your sales history in Shopify, so do not use it outside of the initial setup.\n* Cart line items (variant IDs and quantities)\n* Customer authentication and identity linkage (OAuth code exchange, customer access tokens when enabled)\n* When uploading product images via Admin API: image data (or image URLs) and related metadata for Shopify product images.\n* For authentication \/ OAuth token exchange (when enabled): OAuth codes and token exchange parameters.<\/p>\n\n<p>When data is sent:\n* When saving settings (admin only)\n* When rendering product\/cart features or performing cart actions\n* When creating\/updating Shopify products based on WordPress post changes\n* When performing customer authentication (if enabled)\n* When exchanging OAuth tokens (e.g. https:\/\/shopify.com\/authentication\/{shop_id}\/oauth\/token) if enabled.<\/p>\n\n<p>Important:\n* Shopify is responsible for payment processing and checkout.\n* As with any HTTP request, the WordPress server\u2019s IP address and user agent may be included in requests to Shopify.<\/p>\n\n<p>Terms \/ Privacy:\n* Shopify Terms of Service: https:\/\/www.shopify.com\/legal\/terms\n* Shopify Privacy Policy: https:\/\/www.shopify.com\/legal\/privacy\n* Shopify API License and Terms of Use: https:\/\/www.shopify.com\/legal\/api-terms<\/p>\n\n<h4>GitHub (raw.githubusercontent.com) \u2013 Shopify Product Taxonomy<\/h4>\n\n<p>This plugin downloads a taxonomy text file hosted on GitHub (raw.githubusercontent.com) to provide a category list used by the plugin.<\/p>\n\n<p>Domain contacted:\n* raw.githubusercontent.com<\/p>\n\n<p>Data that may be sent and when:\n* When the taxonomy list is fetched\/updated, the WordPress server requests a file such as:\n  https:\/\/raw.githubusercontent.com\/Shopify\/product-taxonomy\/main\/dist\/ja\/categories.txt\n* No user\/customer data is intentionally sent for this action, but the WordPress server\u2019s IP address and user agent may be included in the request.<\/p>\n\n<p>Terms \/ Privacy:\n* GitHub Terms of Service: https:\/\/docs.github.com\/site-policy\/github-terms\/github-terms-of-service\n* GitHub Privacy Statement: https:\/\/docs.github.com\/site-policy\/privacy-policies\/github-privacy-statement<\/p>\n\n<!--section=installation-->\n<ol>\n<li>From the WordPress admin panel, go to \u201cPlugins\u201d \u2192 \u201cAdd New\u201d.<\/li>\n<li>Search for \u201cEC RELATE BLOCKS\u201d.<\/li>\n<li>Install and activate the plugin.<\/li>\n<\/ol>\n\n<p>OR\u2026<\/p>\n\n<ol>\n<li>Download the plugin .zip.<\/li>\n<li>In WordPress admin, go to \u201cPlugins\u201d \u2192 \u201cAdd New\u201d.<\/li>\n<li>Click \u201cUpload Plugin\u201d, select the .zip file, then \u201cInstall Now\u201d.<\/li>\n<li>Activate the plugin.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20plugin%20process%20credit%20card%20data%20on%20my%20wordpress%20site%3F\"><h3>Does this plugin process credit card data on my WordPress site?<\/h3><\/dt>\n<dd><p>No. Checkout is handled by Shopify Checkout. This plugin does not process or store card data.<\/p><\/dd>\n<dt id=\"where%20are%20api%20tokens%20stored%3F%20are%20they%20exposed%20to%20visitors%3F\"><h3>Where are API tokens stored? Are they exposed to visitors?<\/h3><\/dt>\n<dd><p>Tokens are stored server-side in WordPress options. They are not embedded into post content and are not printed into front-end HTML.<\/p><\/dd>\n<dt id=\"do%20i%20need%20shopify%20webhooks%3F\"><h3>Do I need Shopify Webhooks?<\/h3><\/dt>\n<dd><p>Not in the current version.\nThis plugin is designed so that Shopify remains the source of truth for inventory\/checkout, and the site can fetch the latest values from Shopify when needed.\nWebhooks may be added later as an optional feature (e.g., cache invalidation or advanced sync).<\/p><\/dd>\n<dt id=\"can%20shopify%20changes%20%28inventory%2Fprice%29%20instantly%20update%20wordpress%20pages%3F\"><h3>Can Shopify changes (inventory\/price) instantly update WordPress pages?<\/h3><\/dt>\n<dd><p>By default, Shopify remains the source of truth. If you need near real-time reflection on WordPress pages, you typically use short-lived caching or add Webhooks (advanced setup).<\/p><\/dd>\n<dt id=\"what%20do%20i%20need%20from%20shopify%20to%20enable%20customer%20login%20%28headless%29%3F\"><h3>What do I need from Shopify to enable customer login (Headless)?<\/h3><\/dt>\n<dd><p>You need the Customer Account API (new Customer Accounts) enabled and a Headless Client ID. The login flow uses OAuth 2.0 Authorization Code with PKCE.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<li>Product block (post type linking + Shopify integration).<\/li>\n<li>Cart block (Storefront Cart + Checkout redirect).<\/li>\n<li>Customer Accounts (Headless) integration support.<\/li>\n<\/ul>","raw_excerpt":"Gutenberg blocks that connect WordPress product pages to Shopify (inventory + checkout) using Shopify APIs.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/273251","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=273251"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/itmaroon"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=273251"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=273251"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=273251"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=273251"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=273251"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=273251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}