Changeset 3197570
- Timestamp:
- 11/26/2024 04:09:14 PM (16 months ago)
- Location:
- checkout-file-upload-for-woocommerce/trunk
- Files:
-
- 1 added
- 3 edited
-
add-ons.php (added)
-
backend/index.php (modified) (1 diff)
-
checkout-file-upload-for-woocommerce.php (modified) (2 diffs)
-
frontend/index.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
checkout-file-upload-for-woocommerce/trunk/backend/index.php
r3149854 r3197570 89 89 <th scope="row" class="titledesc"><?php esc_html_e("Checkout Block",'checkout-file-upload-for-woocommerce') ?></th> 90 90 <td class=""> 91 Go to Pages->Checkout->Edit Remove the checkout block and replace it with the shortcode [woocommerce_checkout]91 update soon 92 92 </td> 93 93 </tr> -
checkout-file-upload-for-woocommerce/trunk/checkout-file-upload-for-woocommerce.php
r3149854 r3197570 4 4 Description: Easily enable customers to upload patterns, images,...before adding to checkout. 5 5 Author: add-ons.org 6 Version: 2. 1.56 Version: 2.2.0 7 7 Requires Plugins: woocommerce 8 8 Author URI: https://add-ons.org/ … … 21 21 } 22 22 add_action( 'woocommerce_loaded', 'Superaddons_Checkout_Uploads_Init', 10, 1 ); 23 if(!class_exists('Superaddons_List_Addons')) { 24 include SUPERADDONS_WOO_CHECKOUT_UPLOADS_PLUGIN_PATH."add-ons.php"; 25 } -
checkout-file-upload-for-woocommerce/trunk/frontend/index.php
r3149854 r3197570 22 22 } 23 23 function add_pdf( $attachments, $email_id, $order, $email ) { 24 $files = ""; 25 foreach ($order->get_meta_data() as $object) { 26 $object_array = array_values((array)$object); 27 foreach ($object_array as $object_item) { 28 if ('_woo_checkout_upload_files' == $object_item['key']) { 29 $files = $object_item['value']; 30 if($files != ""){ 31 $wp_upload_dir = wp_upload_dir(); 32 $path = $wp_upload_dir['basedir'] . '/woocommerce/checkout/uploads/'; 33 $list_fields = explode("|",$files); 34 foreach($list_fields as $new_f ){ 35 $file_array = explode("checkout/uploads/",$new_f); 36 $file = $path.$file_array[1]; 37 $attachments[] = $file; 38 } 39 } 40 break; 41 } 42 } 43 } 24 44 return $attachments; 25 45 }
Note: See TracChangeset
for help on using the changeset viewer.