For WP-a2z we need Easy Digital Download products in multiple sites.
They’re needed to give live examples for blocks which use them.
The existing cloning logic is not enough.
Expected result
When a post of type download is cloned:
the post content is cloned,
the taxonomy terms in download_category and download_tag are cloned.
post meta data and attachments are also cloned.
Example meta data for a 'download' with post ID 3089 is:
meta_key
example meta_value
notes
_edd_bundled_products
serialised
_edd_bundled_products_conditions
serialised
_edd_download_earnings
0.00
price
_edd_download_sales
0
integer
edd_download_files
see below
serialised
edd_price
0.99
price
edd_product_notes
These are special notes...
textarea
edd_variable_prices
serialised
Download files is a serialised array. EDD moves the files to a special subdirectory of the uploads folder ( default name edd ) where it protects them from direct access.
For WP-a2z we need Easy Digital Download products in multiple sites. They’re needed to give live examples for blocks which use them. The existing cloning logic is not enough.
Expected result
When a post of type
download
is cloned:download_category
anddownload_tag
are cloned.Example meta data for a 'download' with post ID 3089 is:
Download files is a serialised array. EDD moves the files to a special subdirectory of the uploads folder ( default name edd ) where it protects them from direct access.
Actual result
Attachments are not cloned. Also need to check what else doesn't get cloned correctly!
Proposed solution
This is similar to #44 and may share a similar solution.
Note: The EDD 'download' CPT does not support
show_in_rest
out of the box.