Woocommerce quick checkout form [closed]

I got it by using wc_create_order here is the full code `if ( isset( $_POST[‘submitted’] ) ) { $address = array( ‘first_name’ => $_POST[‘fullname’], ’email’ => $_POST[’email’], ‘phone’ => $_POST[‘phone’], ‘address_1’ => $_POST[‘address’], ‘city’ => $_POST[‘city’], ); $order = wc_create_order(); $order->add_product( get_product( get_the_id() ), $_POST[‘quantity’] ); $order->set_address( $address, ‘billing’ ); $order->set_address( $address, ‘shipping’ ); $order->set_payment_method( … Read more

Where do I insert   to? [closed]

Classes can be added to the ‘li’ tag of each menu item. This field is hidden by default. To show the classes field, navigate to Appearance > Menus. Then click the Screen Options tab at the top the screen. Click the checkbox next to CSS Classes. When specifying class names it is not necessary to … Read more

How-To: Get meta data from the users last order in woocommerce

First thing is to grab the last order ID, you can do it with a simple WP_Query $args = array(‘post_type’=>’product’, ‘posts_per_page’=>1, ‘orderby’=>’ID’, ‘orderby’=>’DESC’); $query= WP_Query($args); As this will only give only one result, you don’t need to loop the result, $order_id= $query->posts[0]->ID; Now, you can reach the order data, $order = WC_Order($order_id); You can use … Read more

help me remove this additional parameter in url

The issue is caused by woocommerce. Woocommerce has a setting called Geolocate (with page caching support) which adds this parameter to every your url. The said option can be found in your dashboard at: Woocommerce → Settings → General → Default Customer Location Selecting any option apart from Geolocate (with page caching support) should resolve … Read more

Question about do_shortcode

There are number of ways to do it. The specific one for your case is that you have to find the function which that shortcode “calls”. For this, you can download your theme and plugin files and search add_shortcode or better product_categories(your shortcode name) term in all files using some notepad software. Notepad++ has a … Read more