How to disable the “Upgrade or Downgrade” button in “My account” of WooCommerce Subscriptions

I have found/made the code that works. Maybe it helps somebody else. /** * Remove the “Upgrade or Downgrade” button from the My Subscription table if user role is “subscriber_plus”. */ add_filter(‘woocommerce_subscriptions_switch_link’, ‘remove_switch_button’, 10, 4); function remove_switch_button($switch_link, $item_id, $item, $subscription) { $user = wp_get_current_user(); if ( in_array( ‘subscriber_plus’, (array) $user->roles ) ) { return ”; … Read more

How to set different users for different pages?

Create a subfolder in plugins folder, name it ‘MyRestict’. In This folder put the following php: <?php /** * Plugin Name: My Restict * Plugin URI: http://wordpress.stackexchange.com/questions/112566/how-to-set-different-users-for-different-pages * Author: G.M. */ function my_restict_template_filter( $template ) { if ( is_page() ) { $post = get_queried_object(); $allowed = (string) get_post_meta($post->ID, ‘allowed_users’, true); if ( $allowed ) $allowed … Read more

How do I replace the e-mail form to functional e-mail subscription? [closed]

For sending mass emails I wouldn’t recommend sending them from your email program nor from WordPress; instead, I would recommend a third-party service that specializes in sending emails – in particular, I usually recommend MailChimp as they offer a free subscription level that is usually sufficient. They also provide a easy-to-use WP plugin that allows … Read more