Limit to Specific Products Using functions.php
-
Hi there,
I understand that in a previous reply you was able to add:
function addon_uploads_section(){
global $product;
$products = array( ‘675’ );
$addon_settings = get_option( ‘wau_addon_settings’ );
if( isset($addon_settings[‘wau_enable_addon’]) && $addon_settings[‘wau_enable_addon’] === ‘1’ && in_array($product->get_id(), $products) ){
$file_upload_template =
‘<div>’ . _e( ‘Upload an image:’, ‘woo-addon-uplds’ ) . ‘<input type=”file” name=”wau_file_addon” id=”wau_file_addon” accept=”image/*” class=”wau-auto-width wau-files” /></div>’;
echo $file_upload_template;
}}
In order to limit to specific product IDs. Do you have an add_filter() that you can use in functions.php instead of editing the plugin files?
Thanks
The topic ‘Limit to Specific Products Using functions.php’ is closed to new replies.