Variations Javascript not working when product display on Quick view via ajax
Variations Javascript not working when product display on Quick view via ajax
Variations Javascript not working when product display on Quick view via ajax
There’s two ways. Firstly you can use XML feed from WP-Site1 on WP-Site2. thought this is a simple method and there’s a builtin plugins out there in WP Plugin Directory. but if you are looking for more advanced and robust way (like data in json ) you can play with woocommerce REST API. here are … Read more
Possible through backend, but you’ll have to use 2 shipping methods. Flat rate with your shipping cost and free shipping with minimum order amount. Adjust according to your zones. Zone A: http://puu.sh/tJDpg/be34c5739d.png http://puu.sh/tJDsJ/7aae204650.png And zone B will be just flat rate Edit: To hide other shipping methods when free shipping is available: You’ll need to … Read more
Try this code. add_action( ‘woocommerce_after_shop_loop_item_title’, ‘add_product_cat’, 25); function add_product_cat() { global $product; $product_cats = wp_get_post_terms($product->id, ‘product_cat’); $count = count($product_cats); foreach($product_cats as $key => $cat) { echo ‘<span class=”category-title”> <a href=”‘. get_term_link( $cat->term_id ) .'”><span class= “category-title_’.$cat->slug.'”>’.$cat->name.’ </span></a> </span>’; if($key < ($count-1)) { echo ‘ ‘; } else { echo ‘ ‘; } } } Updated … Read more
If I understood the question correctly, what you want can be achieved by storing serialised array of post_id and ACF value as key value pair. So for each user, there will be user_meta which will contain post_ids and collectible_status.
Sorry, I wasn’t able to retrieve the $_GET variables. The solution was to retrieve the values from the database, and insert them into the proper places in the template file (form-edit-address.php) This works 🙂 <?php $user_id = get_current_user_id(); $user_info = get_userdata( $user_id ); $first_name = $user_info->first_name; $last_name = $user_info->last_name; ?> <?php do_action(“woocommerce_before_edit_address_form_{$load_address}” ); ?> <?php … Read more
If you look at the documentation for add_action, you see that it accepts 4 parameters. The first 2 are required for adding any actions. If you want to change the priority of your action, you use the third parameter. If you want to change the number of arguments the function accepts, you use the fourth … Read more
In the end I used substr to deal with the excerpt length inside the slider function. Set is at 140 chars from the beginning. This works quite well: function featured_products_slider() { $args = array( ‘post_type’ => ‘product’, ‘meta_key’ => ‘_featured’, ‘meta_value’ => ‘yes’, ‘post_status’ => ‘publish’ ); $featured = get_posts($args); foreach ($featured as $post) { … Read more
Thank you for all people that help me to find an answer (0 helpers)! I found a solution on my own. function wpa_120656_convert_paying_customer( $order_id ) { $order = new WC_Order( $order_id ); $user_id = $order->user_id; $customer_orders = get_posts( array( ‘numberposts’ => -1, ‘meta_key’ => ‘_customer_user’, ‘meta_value’ => $user_id, ‘post_type’ => ‘shop_order’, ) ); if ( … Read more
With thanks to stillatmylinux for the steer. Here’s the code I used in the end should anyone need something similar // Woocommerce Percentage Saved function percentager_shortcode($atts) { // override default attributes with user attributes $percentager_atts = shortcode_atts([ ‘reg’ => ‘500’, ‘sale’ => ‘200’ ], $atts); $added_up = round( ( ( $percentager_atts[‘reg’] – $percentager_atts[‘sale’] ) / … Read more