Plugin's Settings
The settings are located under WooCommerce -> UniCPO General Settings admin menu item.
Standard settings
Add product to the cart via AJAX Pro
Default: no
Enables adding to cart via AJAX for all the products which use custom options and price calculation.
Custom selector (id | class) for a product price html tag
Default: .summary.entry-summary .price > .amount, .summary.entry-summary .price ins .amount
It is quite important to tell the plugin's script where the price is displayed. The default value works for standard theme like Twentyseventeen as well as for themes which use standard, unmodified markup from that comes from WC templates. The actual html markup of the price tag depends on the theme and you may need to define yours. Please, read the FAQ section if you have got an issue with displaying price calculated.
Custom selector (id | class) for a product image wrapper html tag
Default: figure.woocommerce-product-gallery__wrapper
It is quite important to tell the plugin's script where the main product image is displayed. The default value works for standard theme like Twentyseventeen as well as for themes which use standard, unmodified markup from that comes from WC templates. The actual html markup of the image tag depends on the theme and you may need to define yours.
Image size that is used for single product main image Pro
Default: shop_single
It is important to set a proper default size for the main product image on a product single page so it will not be stretched or modified in any case during using change image functionality
Custom selector (id/class) for a product thumbnails wrapper html tag Pro
Default: figure.woocommerce-product-gallery__wrapper
By default, the selector for a product thumbnails wrapper html tag on a single product page is "ol.flex-control-thumbs". However, the actual html markup of the thumbnails block depends on the theme and you may need to define yours custom selector.
Display weight in the cart Pro
Default: no
Enables displaying ordered item weight in the cart. Will be shown next to cart item name.
Display dimensions in the cart Pro
Default: no
Enables displaying order item dimesions in the cart. Will be shown next to cart item name.
Style for range sliders Pro
Default: HTML5
Default style is "HTML 5". This style will be applied for all range slider option instances in the store.
Google Map API Key Pro
Default:
Add Google Map API key in order to use Google Map option
The delimiter used in your CSV import files Pro
Default: ;
Default is ";". You can export to CSV with ";" delim in Libre Office. On macOS you are probably using Numbers, so pick "," as delimiter as it is the only option in this case.
User role when edit orders
Default: administrator
This setting impacts price calculation on edit order screen. Very useful when you, as admin, would like to edit order and set price as for guests or other special role.
File upload settings Pro
Pro
Upload max file size (Mb)
Default: 2
Global setting: max file size that is allowed to be uploaded through File Upload option. This setting can be overridden on per option basis.
Allowed mime types
Default: jpg,zip
Global setting: a comma separated list of allowed mime types as extension names. Important: file types defined here still must comply with allowed MIME types by WP itself. More info here: https://codex.wordpress.org/Function_Reference/get_allowed_mime_types
Files storage
Default: local
Available options: 'Local', 'Dropbox' and 'Google Drive'.
Enable custom local folder for file uploads
Default: no
By default, all the files are handled by the standard WP functions and are stored in the same folder as any regular attachments. This setting is called to separate file uploads uploaded via the plugin's File Upload option from regular attachments and store them in different folder (with an opportunity to set custom folder structure scheme).
Custom folder structure scheme
Default:
This setting works only if using a custom local folder is enabled. The path always starts in the standard uploads folder. {{{POST_ID}}} and {{{DATE}}} variables may be used in a folders structure scheme.
UPLOAD FILES FLOW
a) User can use File Upload or Multi File Upload options and upload files on teh product page. Regardless of the chosen File Storage setting these files will be saved locally at this point.
b) User adds customized product to the cart and proceed to checkout, makes an order - at this point tehre are variations in the flow:
1) If "Local" file storage setting is chosen - no changes
2) If "Dropbox" or "Google Drive" is chosen - the file will be uploaded to the chosen cloud storage and REMOVED from media library/locally.
DROPBOX INTEGRATION SPECIFIC SETTINGS

Dropbox App Key
Default:
Insert Dropbox App key
Dropbox App Secret
Default:
Insert Dropbox Secret key
HOW TO CONFIGURE DROPBOX APP AND INTEGRATION
1) Login to your Dropbox account and visit this page https://www.dropbox.com/developers. Click on "My Apps" sidebar menu item. Click on "Create App" button and begin the process of creating the app. Check these screenshots:

Of course, you can name your app as you wish. The app name on the screenshot is for reference only. Finally, click on "Create app" button.
2) Open "Permissions" tab and set `files.content.write` permission for your application. Then save changes.

3) Got to your newly created app and find App Key and App Secret. Grab them and save into plugin's settings.
4) Check callback URL shown on the plugin's setitngs page and insert it into Dropbox application setting "Redirect URIs"

5) After saving the settings you should see button "Authorize" one the plugin setitngs page. Click it and authorize the integration.
GOOGLE DRIVE INTEGRATION SPECIFIC SETTINGS

Google Drive Client ID
Default:
oAuth Client ID
Google Drive Client Secret
Default:
oAuth Client secret key
HOW TO CONFIGURE GOOGLE DRIVE APP AND INTEGRATION
Step 1: Create a Google Cloud Project
Go to the Google Cloud Console
Sign in with your Google account
Click on the project dropdown at the top of the page
Click "New Project"
Enter a project name (e.g., "WordPress Google Drive Integration")
Select your organization (if applicable)
Click "Create"
Step 2: Enable Google Drive API
In the Google Cloud Console, ensure your new project is selected
Navigate to "APIs & Services" > "Library" from the left sidebar
Search for "Google Drive API"
Click on "Google Drive API" from the search results
Click the "Enable" button
Wait for the API to be enabled (this may take a few moments)
Step 3: Configure OAuth Consent Screen
Navigate to "APIs & Services" > "OAuth consent screen"
Select "External" user type (unless you have a Google Workspace account, then you can choose "Internal")
Click "Create"
Fill in the required fields:
App name: Your application name (e.g., "WordPress Site")
User support email: Your email address
Developer contact information: Your email address
Click "Save and Continue"
Step 4: Create OAuth 2.0 Credentials
Navigate to "APIs & Services" > "Credentials"
Click "Create Credentials" > "OAuth 2.0 Client IDs"
Select "Web application" as the application type
Enter a name for your OAuth client (e.g., "WordPress Google Drive Client")
Under "Authorized redirect URIs", add your WordPress site's callback URL:
Format:
https://yourdomain.com/wp-admin/admin.php?page=uni_cpo_settings&tab=gdrive_settings&action=oauth_callbackReplace
yourdomain.comwith your actual domain
Click "Create"
Step 5: Get Your Client ID and Client Secret
After creating the OAuth client, you'll see a dialog with your credentials
Copy the Client ID - this is your
gdrive_client_idCopy the Client Secret - this is your
gdrive_client_secretYou can also find these later by clicking on your OAuth client name in the Credentials list
Step 6: Configure WordPress Plugin Settings
Log in to your WordPress admin panel
Navigate to the plugin settings page (usually under a custom menu or Settings)
Find the Google Drive integration section
Enter the Client ID and Client Secret you copied in Step 5
Save the settings
Step 7: Authorize Your Application
In the plugin settings, look for an "Authorize" or "Connect to Google Drive" button
Click this button to start the OAuth flow
You'll be redirected to Google's authorization page
Sign in with the Google account that has access to the Drive you want to use
Review the permissions and click "Allow"
You'll be redirected back to your WordPress site
If successful, you should see a confirmation message and your access tokens will be saved
Step 8 (optional): Steps to Add Yourself as a Test User
Go to Google Cloud Console
Navigate to console.cloud.google.com Select your project
Access OAuth Consent Screen: In the left sidebar choose Audience
Add Test Users: Scroll down to the Test users section
Click + ADD USERS
Enter your Google account email address (the one you're trying to sign in with)
Click SAVE 5Verify Settings
Make sure Publishing status shows "Testing" Confirm your email appears in the Test users list
Step 9: Test the Integration
Try uploading a file or performing whatever Google Drive operation your plugin supports
Check that files are being created/accessed in your Google Drive
Monitor the plugin's logs for any errors
Files are getting uploaded just after order is created! In GDRIVE there will be automatically created folder "UniCPO-Uploads", inside this folder there will be folders like "order-XX" and files inside them.
Important Security Notes
Never share your Client Secret publicly
Store your credentials securely
Consider using environment variables for sensitive data in production
Regularly review and rotate your credentials
Monitor your Google Cloud Console for any unusual API usage
Troubleshooting
"redirect_uri_mismatch" error: Ensure your redirect URI in Google Cloud Console exactly matches your WordPress callback URL
"access_denied" error: Check that you've properly configured the OAuth consent screen and added necessary scopes
Token refresh issues: Ensure your server time is synchronized and your refresh token is properly stored
API quota exceeded: Check your Google Cloud Console for API usage limits and quotas
Required Google Drive API Scopes
https://www.googleapis.com/auth/drive.file- Create, read, update, and delete files that this app has worked withhttps://www.googleapis.com/auth/drive.readonly- View files and metadata in your Google Drive (optional, for read-only operations)
After setting app the Google drive APP - get the client ID and secret key, insert in plugin settings, save the settings. After that yo ushould see teh button "Authorize" - click it and authorize your app for integration with the plugin/site.
"Free Sample" Functionality Pro
ProEnable "Free sample" functionality
Default: no
Enables so called "Free Sample" functionality (adding to cart free products (zero price)) and limits the total number of free products (if set).
"Free sample" products limit
Default:
Sets the maximum total number of free products which can be added to a single order. Set to "0" or leave it empty to allow unlimited samples.
Last updated
Was this helpful?