Hello Sietser,
Thanks for reaching out to us.
It might change something during the changes and your site breaks.
To resolve it, again upload the fresh latest plugin and replace the attached file to make it work.
File path: wp-content\plugins\woo-checkout-for-digital-goods\woo-checkout-for-digital-goods.php
Click here to download the file.
Best Regards,
Hitendra & Dotstore Team
You don’t understand. The plugin does not work on a multisite. It gives the error that Woocommerce is not installed. That’s why I tried the solution in the other post, but that one breaks the site.
So I need a different line of code that works on multisite, but does not break the whole site.
Hello Sietser,
Thanks for your feedback.
Yes, that’s why we have removed that condition in the above-attached file and it will allow activating the plugin on Multisite.
Click here to download the PHP file that you need to replace.
Let us know after replacing the above file, still, you get a fatal error on Multisite.
Best Regards,
Hitendra & Dotstore Team
Note: We will check and fix the multisite plugin activation issue in our upcoming version.
Thanks for the new file, the previous one was not available for download. But it still breaks my site completely.
Even when I just alter this line in the original file:
From: $wc_active = in_array( ‘woocommerce/woocommerce.php’, get_option( ‘active_plugins’ ), true );
to: $wc_active = true );
Any idea?
Okay, you have added an extra bracket.
Only add the below code and remove “)”
$wc_active = true;
If possible then, please share a short video to get more idea about your current code.
Nope, doesn’t help… Still critical error.
I haven’t changed any code, apart from the file you sent and the attempt to change just the one line –> $wc_active = true;
Getting desperate here…
I’ve tried a different approach, by using a snippet. And this works fine. Would have liked to keep using your plugin, but this is even easier.
add_filter( 'woocommerce_checkout_fields' , 'bbloomer_simplify_checkout_virtual' );
function bbloomer_simplify_checkout_virtual( $fields ) {
$only_virtual = true;
foreach( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
// Check if there are non-virtual products
if ( ! $cart_item['data']->is_virtual() ) $only_virtual = false;
}
if( $only_virtual ) {
unset($fields['billing']['billing_company']);
unset($fields['billing']['billing_address_1']);
unset($fields['billing']['billing_address_2']);
unset($fields['billing']['billing_city']);
unset($fields['billing']['billing_postcode']);
unset($fields['billing']['billing_country']);
unset($fields['billing']['billing_state']);
add_filter( 'woocommerce_enable_order_notes_field', '__return_false' );
}
return $fields;
}