Skip to content

Instantly share code, notes, and snippets.

@corsonr
Created December 20, 2019 08:37
Show Gist options
  • Save corsonr/ab14b645d318d2ed9e5043fa1ff53635 to your computer and use it in GitHub Desktop.
Save corsonr/ab14b645d318d2ed9e5043fa1ff53635 to your computer and use it in GitHub Desktop.
Restrict WooCommerce Subscriptions Creation Process
<?php
if ( current_user_can( 'edit_pages' ) ) { // Edit capability here.
remove_filter( 'product_type_selector', 'WC_Subscriptions_Admin::add_subscription_products_to_select' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment