WooCommerce: Bulk Quantity in Cart

Problem is on cart page has_term is false because it is checking if cart page have terms 12-pack or 6-pack. You also need to provide post object/ID to has_term() as a third parameter. Updated code:- function input_set_all_values( $args, $product ) { if (( has_term(‘6-pack’, ‘criteria’, $product->post ) ) ) { $args[‘step’] = 6; $args[‘min_value’] = … Read more

Display x number of terms and exclude hidden

Googling get_terms gives the WP developer hub page for get_terms as the first result, for which the first example is this: $terms = get_terms( ‘post_tag’, array( ‘hide_empty’ => false, ) ); Using this as a basis we get: $args = array( ‘taxonomy’ => ‘product_cat’, ‘number’ => 5, ‘orderby’ => ‘name’, ‘parent’ => 11, ‘hide_empty’ => … Read more

Vendor Listing by Location

Solution provided by Randall – http://www.wcvendors.com/help/topic/sort-vendor-by-shop-setting-field/ Overall, here is the concept. I needed a shortcode that would allow me to separate vendors by location. To do this, I required users to select a location during their registration and in their store settings. Then I pulled that meta info into a shortcode which filtered and displayed … Read more

Get WP All Export row ID

We’ve got a solution from plugin’s developers: Add this code to theme’s functions.php file // run a function before export starts, it deletes counter value from DB add_action(‘pmxe_before_export’, ‘wp_all_export_pmxe_before_export’, 10, 1); function wp_all_export_pmxe_before_export($export_id) { delete_option(‘wp_all_export_current_row’); } Add this to All Export plugin’s Edit Export screen under ” Export the value returned by a PHP function” … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)