after wordpress update to 3.5+ i get many errors in plugin wpdb::prepare()

prepare() takes at least 2 parameters. Most of your calls to prepare() are not needed. For example: $blogids = $wpdb->get_col($wpdb->prepare(“SELECT blog_id FROM $wpdb->blogs”)); In this code, if the call to $wpdb->prepare() were valid, it wouldn’t do anything. The function doesn’t do anything to the first parameter. It manipulates the values in the other parameters passed … Read more

Free shipping for certain items only – or get local pickup as option if item is set to virtual

Well I dug a little deeper and found that in the abstract WC_Product class, there is the needs_shipping() method: /** * Checks if a product needs shipping. * * @access public * @return bool */ public function needs_shipping() { return apply_filters( ‘woocommerce_product_needs_shipping’, $this->is_virtual() ? false : true, $this ); } and it is filterable, which … Read more

Insert Array in Plugin Database

You should pass data as an array, not a json encoded string. So changing these line would work. Just remove the following line – $formDATA = json_encode($formDATA); if you want to see the reference, prepare sql this way $sql = “INSERT INTO `”.$table_name .”` (`paid_arr`) VALUES ‘”.json_encode($formDATA).”‘”;

How to customize a plugin?

If the plugin has action hooks or filters you can make your changes from your theme without modifying the plugin itself. an action hook: do_action( ‘my_plugin_do_something’ ); a filter: apply_filters( ‘my_plugin_filter_something’, $something ); If the plugin doesn’t have those where you need them, you could try suggesting them to the author. For example if the … Read more

Plugins in WP_Options but not Active

Yes you will need to activate the plugins on the plugins page. A side note: For future reference if you need to disable plugins during a migration. Don’t migrate the plugins across and wordpress will automatically disable them. Then you would copy them to the plugins folder and active as usual. This would also keep … Read more

WordPress Jquery UI Spinner

Just found it here http://codex.wordpress.org/Function_Reference/wp_register_script Here is an example how to load it on a plugin: function load_jquey_spinner() { wp_enqueue_script( ‘jquery-ui-spinner’ ); } add_action(‘wp_enqueue_scripts’, ‘load_jquey_spinner’);

add_action into another add_action not working

The preferred method of creating a settings page is to use the WordPress Settings API. From your code example, it looks like it’s too late to remove the admin_notices hook inside your callback in the admin_menu hook. You should try to move the logic from the customfunc() callback into another callback activated from some earlier … Read more