Category "php"

Woocommerce Checkout - Add conditional field required if one field is filled

I want to add a conditional requirement on the Checkout page. Because a lot of people fill the Name of Company without they are a company. And I want to add to

open(/var/lib/php/session/...sesionid, O_RDWR) failed: Permission denied (13)

I am running my website on using ec2 nginx. I have done a update on the instance and now I getting this error when the site loads. open(/var/lib/php/session/ses

Get NPM Package README via API

I need to get NPM Package README files in PHP. Does anyone know an API that I can use to grab this? I've tried to use registry.npmjs.org, although the latest ve

Difference between an HTML and a PHP file

I have to query a mysql database using php, but a file with the .html extension for example my index.html does not recognize the <?php ?>. Now I have inde

If you intend you use SMTP, add your SMTP Code after this Line

When I do a test email for a contact form in Live Server and press 'Send' nothing happens, no email goes through and no success message. Am I missing something

How to redirect to another page and call a Function there on Angular ng-click

I have a page where I toggle between areas using angular functions onclick at home.php like <button class="btn btn-success btn-lg span6" ng-click="settingMa

Symfony Mercure "Failed to send an update"

I am having an issue sending updates to the Caddy-based Mercure Hub with both the Symfony Mercure\HubInterface and the "pure" PHP example. When attempting to pu

How to Change TablePress row length for admin page

I am using a TablePress of wordpress library and try to display 100 rows per page in admin account , Not user page. How can i do that ?

How to loop sql table data inside a html table

I have a table for all orders made by users and I would like to send them their order summary in email. However I have managed to create a table showing the cu

Put content of wordpress page inside div

I am trying to put content of wordpress page content inside div but that does not work , simply trying ot do that echo '<div style="display:none">' . the_

Access Firebase access token through Firebase Admin PHP SDK

I have generated myself a service account with .json file for Firebase Admin PHP SDK authorization. Aside from that, I would want to use the same service accoun

Need script to access several tables having 1 common field, all other fields have different names and number of fields per table is different

I am using several tables that have 1 common field ($cust_id) all the other fields have different names and the number of fields per table varies. example: tab

How to correctly handle Timestamps and Timezones in AWS's Timestream?

I have a timestamp field that carries a timezone offset, which I'm trying to insert into Timestream but it's adding 9 zeroes at the end, like the example beneat

Display specific shipping method if woocommerce product has specific acf field value

I need display specific shipping methods only if specific acf checkbox in product is checked. I created custom field viac ACF plugin with name "zpusob_prepravy"

Symfony autowiring issues since docker update

I'm having autowiring issues within symfony since I have updated my Docker to the latest version. I am not entirely sure of the causality here but certainly, my

Laravel Command Schedule Not Working Properly

I'm building a project with Laravel 7.28 on localhost. I need to update a PDF every hour. For the beginning I created a command: <?php namespace App\Console

Add restriction to WooCommerce coupons by allowed user ID

Let's say i'm using this code to create a coupon: $coupon_code = 'CODEOFF'; $amount = '10'; $discount_type = 'percent'; $coupon = array(

Laravel Command Schedule Not Working Properly

I'm building a project with Laravel 7.28 on localhost. I need to update a PDF every hour. For the beginning I created a command: <?php namespace App\Console

Why can't I access the response content when the Symfony HTTP Client encounters an error, and an exception is thrown instead?

I want to make a request to retrieve user info from OAUTH server with Symfony HttpClient but I can't fetch fetch the response directly when encountering an erro

phpmyadmin : Depends: php-twig (>= 2.9) but 2.6.2-2 is to be installed. WHAT?

I need help figuring out what's wrong. I want to install phpmyadmin on a server to import a wordpress DB but when I install it I have a problem with php-twig I