Categories
CMS Development Wordpress

Import client with custom “money_spent” value

I try do code a custom tool to import many clients from a custom CSV file. This CSV file is NOT generated by woocommerce, but contain a “money spent” column. How to store this “money_spent” value to conserve client history in fresh install of WooCommerce ? I’ve tried to manualy update the “_money_spent” user meta […]

Categories
CMS Development Wordpress

Set Product display price as default variation price

Im using code to display the default variation price. add_filter(‘woocommerce_variable_price_html’, ‘custom_variation_price’, 10, 2); function custom_variation_price( $price, $product ) { foreach($product->get_available_variations() as $pav){ $def=true; foreach($product->get_variation_default_attributes() as $defkey=>$defval){ if($pav[‘attributes’][‘attribute_’.$defkey]!=$defval){ $def=false; } } if($def){ $price = $pav[‘display_price’]; } } return woocommerce_price($price); } Problem is its showing the sales price only. I would like to show the regular and […]

Categories
CMS Development Wordpress

Plugin development and composer

I’m developing a plugin and I’m quite new in that, so I trying to find the best solution for how to integrate composer with my plugin. The problem is that the SDK which I need is quite big, and when I integrate it on the plugin, the plugin has more than 50mb which is very […]

Categories
CMS Development PHP Wordpress

How can I port class-phpass.php in Java?

I have a Java app that needs to check with a WordPress MariaDB database for usernames and passwords. To do authentication into the WP framework, I need the password hashing for WordPress; my app is using class-phpass.php. At the top of the file, I see: https://www.openwall.com/phpass/ but there’s no Java port. Does anyone have this […]

Categories
CMS Development Wordpress

New Images Folder

Is there a way in WordPress to upload certain images to their own folder? Ex: Can I create a new folder named “Products” and upload certain images to that folder? And where would I put that folder? I need to access these images in this type of path: www.sample.com/poducts/image.png

Categories
CMS Development Wordpress

List all categories that have results in a query

I have an archive page that I am building multi-filtering for. The archive page lists paginated results from a custom post type, and there are 3000 posts within it. I would like to be able to filter this post type by two taxonomies, but importantly the page should only show an option to filter by […]

Categories
CMS Development Wordpress

List all categories that have results in a query

I have an archive page that I am building multi-filtering for. The archive page lists paginated results from a custom post type, and there are 3000 posts within it. I would like to be able to filter this post type by two taxonomies, but importantly the page should only show an option to filter by […]

Categories
CMS Development Wordpress

How to separate post titles with a comma in the loop?

How do I list all my posts with a comma (but not after the last post)… <?php // WP_Query arguments $args = array( ‘post_type’ => array( ‘post’ ), ‘tax_query’ => array( array ( ‘taxonomy’ => ‘day_time’, ‘field’ => ‘slug’, ‘terms’ => ‘mon-night’)), ‘post_status’ => array( ‘publish’ ), ‘nopaging’ => false, ‘posts_per_page’ => ’20’, ‘ignore_sticky_posts’ => […]

Categories
CMS Development Wordpress

How to separate post titles with a comma in the loop?

How do I list all my posts with a comma (but not after the last post)… <?php // WP_Query arguments $args = array( ‘post_type’ => array( ‘post’ ), ‘tax_query’ => array( array ( ‘taxonomy’ => ‘day_time’, ‘field’ => ‘slug’, ‘terms’ => ‘mon-night’)), ‘post_status’ => array( ‘publish’ ), ‘nopaging’ => false, ‘posts_per_page’ => ’20’, ‘ignore_sticky_posts’ => […]

Categories
CMS Development Wordpress

How to allow URL with filename & extension in wordpress?

How to create custom URL routes? I wanted to generate csv using specific url for ex. https://www.example.com/exportcsv.csv Is this possible via WordPress? I have tried with querystring and all the otherways but my requirement is to do it with the above URL.