How to get a notification when the plugin is installed?

I do not recommand using is_plugin_active() because if you rename your plugin directory which is done sometimes for security needs you’re screwed. If I were you I’d look into plugin you want to detect and select a core class or a core function of the plugin and test it with if(class_exists(‘name_of_the_class’)) or if(function_exists(‘name_of_the_function’)). Hope this … Read more

count the number of views of a post excluding own views

The plugin appears to be processing the view on the wp_head hook. That means you ought to be able to do something like this: function remove_view_counter_wpse_102637() { global $post; $current_user = wp_get_current_user(); if ( is_single() && !empty($current_user) && $post->post_author == $current_user->ID ) { remove_action(‘wp_head’, ‘process_postviews’); } } add_action(‘wp_head’, ‘remove_view_counter_wpse_102637′,1); No guarantees. I don’t use that … Read more

Woocommerce Product Page edit “from” text [closed]

You can use a filter to change the text or the min price, this will affect all variable products. add_filter(‘woocommerce_variable_price_html’, ‘custom_price_text’, 10, 2); function custom_price_text( $price, $product ) { $price=””; $price .= ‘<span class=”from”>’ . _x(‘A4 Sample’, ‘min_price’, ‘woocommerce’) . ‘ </span>’; $price .= woocommerce_price($product->get_price()); return $price; }

Nonce failing with second argument

PHP variables inside single quotes — ‘ — won’t be expanded. So in your first code snippet, unless you literally mean to pass the string $pluginmaker_nonce to the check_admin_referer() function as the action, you should probably rewrite your code as check_admin_referer( ‘action_name’, $pluginmaker_nonce );.

plugin inside a wordpress theme

This question is misleading, I’m not sure you understand how Themes/Plugins work. It’s not that you have a plugin inside the theme. Rather the theme has plugin like features (or custom functionality). I personally find this to be bad practice and prefer when themes come with plugins instead of trying to bundle it all together. … Read more

WordPress get the latest plugin installed details

I recommand you to use DEBUG in wp-config.php : define( ‘WP_DEBUG’, true ); define( ‘WP_DEBUG_LOG’, true ); define( ‘WP_DEBUG_DISPLAY’, false ); ini_set( ‘display_errors’, 0 ); This will log errors and put all of them in a log file you will find in wp-content/debug.log