-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Admin notice add user friendly Error message for non Dual CC-Woo Install #152
Comments
Probably a better way to handle this is to stop Classic Commerce from loading just before the declaration of the function function cc_wc_already_active_notice() {
echo '<div class="error"><p>';
echo __( 'You must deactivate WooCommerce before activating Classic Commerce.', 'classic-commerce' );
echo '</p></div>';
}
if ( function_exists( 'wc' ) ) {
// The main wc() function already exists, which means WooCommerce is active.
// Show an admin notice.
add_action( 'admin_notices', 'cc_wc_already_active_notice' );
// Deactivate Classic Commerce.
deactivate_plugins( array( 'classic-commerce/classic-commerce.php' ) );
// Do not proceed further with Classic Commerce loading.
// (may need tweaking depending on code structure)
return;
}
function wc() {
// ... (existing code) |
This looks good to me. |
Looks like this was closed by mistake? The PR #154 does something else. |
Good catch. |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think we need to add an admin notice to make this Error message for meaningful for the ordinary user who might have skipped the documentation and also reduce the support call.
Suggestion:
I know Woocommerce won't be supporting any forks after < WP 5.0. However someone might migrate with an older version of Woo. We have to have this in mind as we move with this ticket.
Originally posted by @bahiirwa in #136 (comment)
The text was updated successfully, but these errors were encountered: