How to Change the File Upload Chunk Size in PPOM
PPOM splits each upload from a File Upload or Image Cropper field into smaller pieces before sending them to your server. By default, PPOM uploads files in 1mb chunks. If your hosting environment needs smaller or larger pieces for uploads to complete reliably, you can adjust this with the ppom_file_upload_chunk_size filter.
Change the chunk size
1. Go to Appearance > Theme File Editor in your WordPress admin dashboard and open your theme's functions.php file. You can also add the snippet with a code snippets plugin.
2. Add the following code:
add_filter( 'ppom_file_upload_chunk_size', function ( $chunk_size ) {
return '512kb';
} );3. Save your changes.
The filter accepts Plupload-compatible size values such as 512kb, 1mb, or 2mb. The value you return applies to every File Upload and Image Cropper field on your store.
Chunk size vs. maximum file size
The chunk size only controls how PPOM breaks a file into pieces while it uploads. It does not change the largest file a customer is allowed to upload.
To change the maximum allowed file size, edit the File size option under the Advanced settings of the File Upload or Image Cropper field in your PPOM field group.
Verify the change
Open a product that uses a File Upload or Image Cropper field and upload a test file to confirm uploads still complete successfully.
