April 17, 2014

How to set cusutom favicon to WordPress admin?

How to set cusutom favicon to WordPress admin? function wdwd_admin_area_favicon() { $favicon = ‘path to favicon’; echo ‘ ‘; } add_action(‘admin_head’, ‘wdwd_admin_area_favicon’); add_action(‘login_head’, ‘imed_admin_area_favicon’ );

Fix for: Canada Shipping Post Add-on for Marketpress

Fix for: Canada Shipping Post Add-on for Marketpress !important: Make sure that you are testing with a product having weight. Filename: mp-canada-post.php Line Number: 613 (or near) Find the following code snippet: $shipping_meta[‘weight’] = (is_numeric($shipping_meta[‘weight’]) ) ? $shipping_meta[‘weight’] : 0; Now observe it that shouldn’t it be inside the foreach? See here foreach ($cart as […]

How to check parent function from the function called?

How to check parent function from the function called? function backtrace($i=1){ $callers=debug_backtrace(); return $callers[$i][‘function’]; }

How to mute WordPress Plugins updates?

How to mute WordPress Plugins updates? add_filter(‘site_transient_update_plugins’, ‘wdwd_remove_update_nag’); function wdwd_remove_update_nag($value) { unset($value->response[ plugin_basename(__FILE__) ]); return $value; }

How to hide WordPress plugins from list?

How to hide WordPress plugins from list? Objective: We have to hide this plugin from activated plugins list. e.g. Plugin Name: marketpress function wdwd_plugins_filter() { global $wp_list_table; $hidearr = array(‘marketpress/marketpress.php’); $myplugins = $wp_list_table->items; foreach ($myplugins as $key => $val) { if (in_array($key,$hidearr)) { unset($wp_list_table->items[$key]); } } } add_action( ‘pre_current_active_plugins’, ‘wdwd_plugins_filter’ );

How activate a WordPress plugin from your php script?

How activate a WordPress plugin from your php script? e.g. Plugin Name: marketpress if(is_admin()){ include_once( ABSPATH . ‘wp-admin/includes/plugin.php’ ); if ( !is_plugin_active( ‘marketpress/marketpress.php’ ) ) { do_action( ‘activate_’ . trim( ‘marketpress’ ) ); } }

No valid shipping options found. Please check your address carefully.

No valid shipping options found. Please check your address carefully. Hi Developers, Make sure two things: Products have weights Base zip code is entered If still not working? Debugging: Now if you are familiar with your favorite browser’s console then try this command there jQuery(‘input[name=”no_shipping_options”]’) You will see that there are two input elements with […]