How to apply a custom coupon to a WooCommerce Subscription recurring amount?

I have managed to find a way, but welcome a better one. As mentioned in the OP comments, the function remove_coupons() in class WC_Subscriptions_Coupon in file woocommerce-subscriptions/includes/class-wc-subscriptions-coupon.php is removing coupons that are not ‘recurring_fee’ or ‘recurring_percent’. There is no filter added we can tap into to assign our own custom coupon types, so there does … Read more

Woocommerce new shop page

Personally i would create a custom template and not use page.php and add a simply product loop Quick break down create new template called customshop.php <?php /* Template Name: Custom Shop */ ?> add your shop loop <ul class=”products”> <?php $args = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => 12 ); $loop = new WP_Query( $args … Read more

“error_message”: “Sorry, you cannot list resources.” using WooCommerce API

Here ya go The original .htaccess looked like this: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> Then I changed it to the following <IfModule mod_rewrite.c> RewriteEngine On RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond … Read more

Change WooCommerce state and city checkout fields to dropdowns related to the chosen country

although it’s true that you can search on google, that’s probably why you’re here in the first place. The plugins mentioned are alternatives, but if you still wanna do it, here’s how to turn the city field into a dropdown: /** * Change the checkout city field to a dropdown field. */ function jeroen_sormani_change_city_to_dropdown( $fields … Read more