replace text in Sort Box

There is a filter for sort options that you can use, but it looks like there is already a Sort By: Popularity option there. You can see the filter here. You may want to check to see if other plugins or your theme are defining where the Sort By text is coming from. WooCommerce also … Read more

Problem with add_action

Yo don’t properly call the callback function. If you want to code on oriented object programmation, you have to create your class, and construct function with add_action… Here more informations about it : https://wordpress.stackexchange.com/a/48094/9716 or you do something like this (its no POO but its working as well). add_action( ‘woocommerce_subscription_status_active’, ‘add_subscription_course_access’ ) ); function add_subscription_course_access( … Read more

Woocommerce Backend Search by Title and SKU

Please try this code function search_by_sku( $search, &$query_vars ) { global $wpdb, $pagenow; if ( ‘edit.php’ != $pagenow || ! is_search() || ! isset( $query_vars ->query_vars[‘s’] ) || ‘product’ != $query_vars ->query_vars[‘post_type’] ) { return $search; } if(isset($query_vars->query[‘s’]) && !empty($query_vars->query[‘s’])){ $args = array( ‘posts_per_page’ => -1, ‘post_type’ => ‘product’, ‘meta_query’ => array( array( ‘key’ => … Read more

WordPress Stock Update Programatically

WordPress stores three levels of stock information on the wp_postmeta. Each product has manage stock enabled Stock Quantity Stock Status Since the products on the above questions were imported, few of them didn’t had manage stock enabled so updating the stock quantity to 0 didn’t work well. Solution: I forcefully updated the manage stock to … Read more

WooCommerce pages looks unstyled

In my experience with woocommerce, there are two ways. 1 – Add some extra css to your current theme. For example I want to modify the title of the product : I open the chrome inspector, I see that the product page has a class css for body.single-product. The product container has a class css … Read more