Disable Redirect to Product Page on Search Results Page in WooCommerce [closed]

Yes, this is totally possible. WooCommerce includes a handy filter that you can manipulate to disable that redirect so the user will continue onto the search results page as per normal. If you add this line of code to your functions.php file it will disable the redirect functionality. add_filter( ‘woocommerce_redirect_single_search_result’, ‘__return_false’ ); Permalink to gist: … Read more

Get Latest Plugin Version from WP API

Ok – here is a method – thanks to @Rarst for pointing me in the right direction. Include the require file if the plugins_api function is not found: if ( ! function_exists( ‘plugins_api’ ) ) { require_once( ABSPATH . ‘wp-admin/includes/plugin-install.php’ ); } Then, prepare a query to pass to plugins_api(): // set the arguments to … Read more

Selling WordPress sites?

Please read through the following: http://codex.wordpress.org/License http://wordpress.org/about/license/ http://en.wikipedia.org/wiki/GPL http://www.gnu.org/licenses/gpl.html You can’t can sell it as software or development, although and/or you can also charge for maintanance and install. Anyway, you should at least donate to the plugin developers, if you make money with their work somehow. EDIT I’m am sorry for my previous lines: I … Read more

Automating deprecated call checks?

I was inspired by your question to create a plugin that I’ve been kicking the can on for several months. I’m calling it Deprecation Checker. By default, it scans the plugin and theme directories (recursively) to find deprecated functions. The functions list is sourced directly from the WP deprecated files. It then outputs a nice … Read more

Displaying a WooCommerce product via PHP

Use do_shortcode(). For example, in a template, if you were wanting to display products specifically by ID: <?php echo do_shortcode(‘[products ids=”1, 2, 3, 4, 5″]’); ?> WooCommerce comes with several shortcodes which can be used to insert content inside posts and pages: http://docs.woothemes.com/document/woocommerce-shortcodes/ You can add shortcodes to a post or page easily via the … Read more