File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -973,7 +973,7 @@ public function wp_ajax_reset_order_pdfs()
973973 // remove downloadable files
974974 $ this ->unset_downloadable_files ( $ order );
975975
976- // refilling is necessary only if PDFs are being saved in wp-uploads
976+ // refilling is necessary only if PDFs are being saved in wp-uploads or there are downloadable files
977977 $ product_settings = $ this ->get_order_metadata ( $ order , 'product-settings ' );
978978 if ( is_array ( $ product_settings ) && ! empty ( $ product_settings ) )
979979 {
@@ -1004,8 +1004,8 @@ public function wp_ajax_reset_order_pdfs()
10041004 {
10051005 if ( isset ( $ attachment ['options ' ] )
10061006 && is_array ( $ options = $ attachment ['options ' ] )
1007- && isset ( $ options ['save_directory ' ] )
1008- && $ options ['save_directory ' ] !== "" )
1007+ && ( ( isset ( $ options ['save_directory ' ] ) && $ options [ ' save_directory ' ] !== "" )
1008+ || ( isset ( $ options [ ' download_id ' ] ) && $ options ['download_id ' ] !== "" ) ) )
10091009 {
10101010 $ this ->fill_pdfs ( $ settings , $ placeholder_processor );
10111011 break ;
You can’t perform that action at this time.
0 commit comments