woothemes

On Woocommerce order complete, activate woosensei course

自古美人都是妖i 提交于 2019-12-23 03:44:11
问题 I'm developing a plugin with Woocommerce and Woosensei I can't seem to get the process working of creating an order programmatically, mark the order completed and activate the woosensei course for that particular person. // create a new checkout instance and order id $checkout = new WC_Checkout(); $this_order_id = $checkout->create_order(); // add some data to the order here // [ ......... ] // execute order $order = new WC_Order($this_order_id); $order->update_status('completed'); $learning

Woocommerce - external/affiliate product image to external link (buy URL)

你说的曾经没有我的故事 提交于 2019-12-22 00:40:30
问题 (Warning: I'm not a programmer) Straight to the point. I have a product catalogue http://adidassuperstar.cz, and I want images (thumbnails) point to the affiliate link - the same link as the link of a buy button under the image. I googled everything, but none of the answers actually worked for me. However, I found something which helped me just half the way. When I insert this code to functions.php it makes this: Every link point to the affiliate link - I mean even a title of a product. I

add additional button on product page for woocommerce

旧巷老猫 提交于 2019-12-21 05:31:15
问题 I have spent the majority of the day trying to figure out how to adjust the single product page using woocommerce. I would like to add a custom button next to the "Add to cart" button that would be a custom link that says "Next". I am working on an invitation website where there are numerous components to an invitation, so after a user adds a product to their cart, I want there to be an option that says "Next" so they can go ahead and customize the next piece of the invitation. (I will have

Wordpress (Woocommerce extension) - Create new order programmatically

你。 提交于 2019-12-20 08:53:16
问题 I want to create a new order programmatically. Workflow is simple: After submitting simple form, user will be created and along with that, a new order. I managed to create a new user and user_id is returned, now I need to assign a new order all in one step. How can I accomplish this? 回答1: Here's how I programmatically create my orders. I largely followed WC_Checkout::create_order() from @pavel's suggestion above. This is directly from a plugin I'm writing so you'll have to adjust where the

Flexslider is not working in IE

怎甘沉沦 提交于 2019-12-13 02:51:15
问题 I am trying to implement the basic flexslider on our website. It works well with chrome, Firefox and safari. But in all versions of IE, it just blows out the entire width and height of the page. Here is the link. Please advise 回答1: I tried this one it work for me. Add following line in the header tags to force IE to render in the latest document mode. <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 回答2: Had similar problem in ie9 - solved by setting fixed width for div, containing

Woothemes Flexslider - one unique flexslider inside another flexslider - is it posible?

回眸只為那壹抹淺笑 提交于 2019-12-12 09:59:16
问题 I am using the newest flexslider from Woothemes, and I am trying to init one flexslider inside another. Like this: function initFrontpageSliders() { $('#flexsliderFrontpage01').flexslider({ animation: "slide", animationLoop: false, pauseOnHover: true, start: function(slider) { //Fires when the slider loads the first slide $('#flexsliderFrontpage02').flexslider({ animation: "fade", directionNav: false, animationLoop: false, pauseOnHover: true }); } }); } but when I call the script, is

WooCommerce - external/affiliate product title and Image on archive page to external link (New Tab)

烂漫一生 提交于 2019-12-11 10:37:19
问题 I have added the following code to my function.php file in an attempt to have my external/affiliate product title and images on the product archive page link to the external link (opening in a new tab) - provided by Oleg Apanovich. remove_action('woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open'); add_action('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_link_open', 15); add_action('woocommerce_before_shop_loop_item', 'woocommerce

Woocommerce product custom price is not accepted by woocommerce coupon

丶灬走出姿态 提交于 2019-12-11 07:37:34
问题 In our woocommerce shop , customer can enter the custom width and height of the product and product price calculated based on this details . For example if the initial price for a product is 50 . And customer add width =2, height=3 , then the price for this product is going to 50*2*3=300 for this we are using following code // Save custom field value in cart item as custom data add_filter( 'woocommerce_add_cart_item', 'calculate_custom_cart_item_prices', 30, 3 ); function calculate_custom

Call a function of Woocommerce plugin from my plugin

拟墨画扇 提交于 2019-12-11 04:00:05
问题 I am new to wordpress, trying to develop a wordpress plugin where I need to call a woocommerce method add_to_cart from the class woocommerce/includes/class-wc-cart.php . Is there any way to do that ? 回答1: WooCommerce declares a handy globlal WC() that you can use inside your plugin to call its functions. Add the following code to your plugin add_action('woocommerce_after_single_product', 'woo_foo'); function woo_foo() { WC()->cart->add_to_cart( 254, 1 ); //ensure to change 254 with product ID

offcanvas menu link broken

萝らか妹 提交于 2019-12-09 23:52:01
问题 I'm working on a project for school, and I'm having an issue that I hope someone will be able to help with (and possibly curb my festering hatred for joomla, but that's beside the point :) First, here's the URL: http://edcc3.cloudaccess.net The issue is, when you resize the browser or use an emulator to see the rendering on 480px devices, the offcanvas menu links won't work. Meaning they don't scroll to the targetted sections within the one page layout, and I cant figure out why. I'm betting