Articles of woocommerce

Customizing $product->get_title() function

i’m customizing a popular CSV exporting tool for Woocommerce. I’ve got an issue on extracting names for products. Look at this line of code: $product->name = get_the_title($product->ID); This returns a string like Variation #4923 of ProductName I would like to remove “Variation #Number of ” from every export that i make. I do not want […]

How to add category and subcategory in WordPress custom code?

I create custom plugin for import categories. now i have categories array from api.but when import categories into my wordpress woo commerce means not working. My code is given below. public function sample_insert_category() { if(!term_exists(‘sample-category’)) { wp_insert_term( ‘Sample Category’, ‘category’, array( ‘description’ => ‘This is an sample category.’, ‘slug’ => ‘sample-category’ ) ); } } […]

Move payment options at checkout in WooCommerce

I’m using WooCommerce and i’m new to both WordPress and this plugin. I have downloaded a free theme which I will configure, however I can’t figure out how I can change the checkout template. What I want to do is moving payment options from bottom, to the top right column. http://bildr.no/image/SWtmTlZo.jpeg Which files do I […]

Show woocommerce products in author archive

I’ve added permissions to authors to add products in woocommerce. I would like to know if there is a way to display products by current user in archives. Is this possible?

woocommerce with custom post type

I create new post type suppose “custom_type” and i want to use that post type with Woocommerce function. so Woocommerce will work with “product and custom_type”. i searched everywhere and don’t find any answer also i have found how to customize current post type names etc but i want both post type. so both post […]

How to order WP_Query to group results?

I have a list of products in WooCommerce that have titles like so: Please note: The “groups” are just for myself, they are not categories etc. All products are the same type of product, just two types of products have different codes (Z and UK) “Group 1” – Unique numbers 5000 4999 4998 4997 4996 […]

Using Cookie Data For WP_Query Loop

I’m trying to retrieve data set in a cookie and use this to run a query. I’ve set the cookie in functions.php like so; add_action( ‘init’, ‘resultsCookie’ ); function resultsCookie() { setcookie( ‘your-results’, ‘18,17,11,8,10,27,26’, time() + 3600, COOKIEPATH, COOKIE_DOMAIN ); } While I can echo the string, I can’t seem to get this functioning within […]

I want to filter my products with attributes

I have ebook store, where all the books are listed, everything is done.. In products, publisher and author added as a custom attributes. Now I want to filter the products on the basis of attributes…, Need: Just need to set its links, because I create a publisher page in which all the book publishers name […]

Query Products & Store IDs in array

I’m attempting to query Products in WooCommerce and return their IDs as an array that can be used to filter conditionally. I’m using ACF Pro to add custom fields into the product, for which I’m then using conditional code. I spoke to my developer friend, who suggested this approach which should store the array in […]

WooCommerce “Checkout Now” button

Okay so I want to add an additional button to the single product page that says “Checkout Now”. This checkout now button should go directly to the checkout page, not the cart page (like the regular “add to cart” button). I can’t for the life of me figure out how to get this done. I’ve […]