Closed bobbingwide closed 4 years ago
The quick hack took a little longer than expected. I needed to add two rows to the oik-loader.10.csv file
/wp-json/wp/v2/download_category,0,edd-blocks/edd-blocks.php,easy-digital-downloads/easy-digital-downloads.php
/wp-json/wp/v2/download_tag,0,edd-blocks/edd-blocks.php,easy-digital-downloads/easy-digital-downloads.php
This was to satisfy the requests for when the block wanted to display Download Categories or Download Tags
AND also needed to extend the solution for #7 to also include edd-blocks/edd-blocks.php
as as dependent plugin. This alowed the meta data to be returned in the REST request.
When edd-blocks was not explicitely loaded the block only showed the Title and Full Content.
When loaded it would also display: Buy Button, Price and Thumbnails.
Related to #7, when Easy Digital Downloads is not activated then the taxonomies associated with the Products ( download post type) are not registered ( download_category and download tag). It appears that the Downloads block depends on a response from a REST request in order to correctly display the block in the editor.
Would it be possible to include the request URL in the
oik-loader.site.csv
file for the site? How easy would it be to build these URLs automatically from the WordPress registry?Workaround
Try quick hack to see if the existing logic will actually work. ie. append the following to the file