Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago. Improve this question I have a WooCommerce site where products are considered as trade/deal. The…
Exclude WooCommerce virtual product from counting towards free delivery
On my WordPress/WooCommerce website we offer free delivery for all orders over 500 DKK. This is working perfectly fine. We have made a giftcard as a virtual product, seeing as we sent all of our …
Hook woocommerce price in backend order edition
I need to change item product prices in Woocommerce Backend Order. I tried tu use the following hook, but I have a problem trying to obtain the order id. Any suggestion? Thanks in advance! Complete problem: The complete problem is as follows. I am using a plugin that adds a field to the product called wholesa…
How to mock properly IlluminateHttpRequest class from Laravel
I’m trying to test a method from a class which contains a method using the request() helper from Laravel. This is the method: Category class The test should make this helper to catch properly the URI when doing getRequestUri() but it’s actually returning an empty string. This is one of the thousan…
Symfony Lock Component does not lock – how to fix?
i upgraded recently to Symfony 3.4.x, refactor LockHandler because of deprecation warning and fall into strange behaviour. Code in command before refactoring: class FooCommand { protected …
How to set a default active/open tab in html
I’m currently working on a Skill Test project that displays one question on each tab. How can I set the default active tab? I have code for default open tab which I just copied form w3schools.com, but …
Enabling php ext-xml?
While trying to use Composer to create a Symfony 4 project I got the following error: I did search in php.ini for ext-xml to see if I could uncomment it in order to enable it but I did not find any mention of ext-xml. I have not searched anywhere else because I am very unsure about what I am doing.
Get all Product Variations based on one default attribute value in WooCommerce
Following Loic’s workflow here Can I get all the variations related to the product basing on one particular variation in default value. Example: Get all variations with attribute_pa_sizes similar to the default value’s attribute_pa_sizes echo $variation_values[‘attributes’][‘attr…
SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘payments’ already exists (SQL: create table `payments`
When I migrate a table I see this error, SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘payments’ already exists (SQL: create table payments Error Answer If you want to recreate the table, run php migrate:rollback first to delete the existing one. This command will run the down() …
Sufficient API Response for Mobile App
I’m creating an API for my mobile app with Laravel – Lumen and i have the following scenario which i don’t know what is the most sufficient way to return the response to my Android / IOS App, lets assume that the user is trying to sign in (same end point): Case 1 : the user provide the corre…