I’m working on this project:
Tag: php
Woocommerce: function to update all products
I have an issue with my Woocommerce products. This issue is fixed if I just update the product (edit the product and click in the Update button) with no changes at all. I have around 2000 products in my site, then I am thinking of doing this using a function in my function.php file. It should be something lik…
Running virtual hosts in apache docker container
I have two php applications in the same apache container and I’m trying to run one of them on a port since it needs to be accessible via a root domain and not a subfolder. I want to run the …
How to inject global variables into all templates?
In my twig template there are some variables that are required on each page like userName, userId or userImage. What is the best way to inject them into the template? I already read the article How to Inject Variables into all Templates but how could I write a variable (e.g. current user) into the config/pack…
How can I set an rgba background-color from Redux Framework color_rgba-type?
I’m trying to add an options in my theme settings to set the background-color of my mobile-menu using Redux Framework. I used the color_rgba type so I can pick a color with opacity. I see my background-color set on my menu with class ‘mobile-menu’, but only a HEX value. How can I make sure I…
Typo3 tx_news extend with custom Fields – Content disappears sometimes, caching Issue?
I’m using Typo3 9.5.5 and I extended the extension tx_news with some custom fields. Everything works fine in front-end and back-end, but sometimes the custom content disappears in front-end and is not shown. Also the debug doesn’t show the content. In my opinion it could be a caching problem, beca…
How to make Laravel’s Notification throw an Exception in test
I have a few laravel commands that inherit from my own class to send slack messages if they fail. However if the slack notification fails I still want the original exception thrown so that the error still ends up in the logs if slack is unavailable or misconfigured. I have this and it works, but I can’t…
Can a PDF file have 0 pages defined or otherwise result in 0 as page size?
I have a PHP script using Imagick, but there is the risk of a NAN error, should a PDF file provided by a user contain no pages or have a page with no height or no width. I am not sure if this is possible in a PDF structure. Also making a jpeg from a page number larger than the
How to intercept a new file on S3 using Laravel Queues?
I have an S3 bucket, mybucket, and I want to execute something when a new file is copied into that bucket. For the notifications, I want to use an SQS queue, notifiqueue, because my goal is to access that queue with Laravel Since I am creating my infrastructure in CloudFormation, the resources are created lik…
Enable user local time in Woocommerce Cart and Checkout date time display
For a bookings website I have activated ‘Timezones’. The visitor’s local time should be displayed. In the booking form everything is working fine. The cart data ($start_time, $end_time) is not being …