Category "php"

ACF Pro - Field showing up in backend, but it's not saving (disappear on refresh)

I have a website with more than 15 ACF groups. On one of them, there's a repeater and the last of 6 fields is a URL (I tried switching it to Text, same result).

Replace substring till space is found after specified position in PHP

I have this main string $string = "This is a sample text"; $substring = substr_replace($string, "", 11 , 6); Output: This is a text I'm passing $string varia

Ajax not properly sending Session variables

I am very new to AJAX and PHP and am currently working on a small website where I initialize php objects as session variables. The functions and objects are all

Remove billing address (only show shipping address) in certain WooCommerce email notifications

The action 'woocommerce_email_customer_details' includes both the billing and shipping address data. I only need the shipping address. How can I achieve this? B

download file to my server with php with a url without file name

I can download a csv file via a fixed url. The url just doesn't have a file name. When I open the url in a browser, the file export.csv is generated and after a

Display of product attributes the same attributes group into two sections

I would like to divide the display of product attributes into two sections (front). Create two arrays, one with attributes with "premium" in the name and the ot

Get order list filtered by greater than by specific order id in Prestashop rest API

I am newer in Prestashop, I need to get the order list in which orders should be greater than a specific order_id using Rest API. Let suppose there are 100 orde

Change options when I select a category using Javascript (Country/State)

Im trying to hide some options when I select a different country. These options are the states of this country. But, when I select the country, it doesnt showin

How do you make button save form data on a csv file and redirect you to a new page at the same time?

I am trying to make a button that saves form data on a file and redirects you afterwards, but although the save function works just fine, the redirection doesn

Placeholder is not showing up

echo "<label class=\"control-label col-sm-5\" for=\"badgeid\" style=\"margin-left: -50px;\">Recipient:</label>"; echo "<div class=\"col-s

Add a custom fee for percentage and fixed cost to specific payment gateway in WooCommerce

In WooCommerce I need to apply a custom handling fee for a specific payment gateway. A custom handling fee for percentage cost and a custom handling for per fix

Youtube Google API Caught Google service Exception 0 message is refresh token must be passed in or set as part of setAccessTokenStack

I am currently facing this problem: once I authorized youtube to access my account and after saving the token in a file called "token.txt," everything runs smoo

Dynamic Text under Product Price on Product page in case a variation is selected

How can I create a text A under the product price on the product page in case a variation is not selected. When a variation is selected I would like to have ano

How do I hide '#StandWithUkraine' in PHPUnit 9.5.20?

I have recently upgraded to PHPUnit 9.5.20 and noticed that it is printing #StandWithUkraine for every test run. Eg. Testing started at 10:01 am ... Running in

CodeIgnititer 4: Unable to send email using PHP SMTP

I read all the other answers related to that question, but none of them help. When I try to run the following setup either on my localhost or my production serv

Rest API GET Query working fine in Browser but why is it not working in Client software?

I made my own REST API with php coding and mySQL database. There is no Authentication. Just a GET call should retrieve mySQL table rows. <?php header("Acces

how to load the php file in the form action only after php submit button was executed

I am not a PHP expert. I have a form that has Captcha validation image. the form has a button "submit", and the code for the submit is within the same page (let

How to report ModelNotFoundException with stacktrace to Sentry.io in Laravel 6?

I am using below laravel 6 code to report exceptions to Sentry.io: public function report(Exception $exception) { if ($this->shouldReport($exception) &am

mysqli::real_connect(): (HY000/1049): Unknown database error in codeigniter

I'm new to Codeigniter PHP framework. When I'm testing my application I get 'Unknown database db_name' error. I have browsed through several sites but didn't fo

Add custom text 'per item' based on product category in WooCommerce email notifications

How to add a custom text 'per item' based on product category on all WooCommerce emails? Therefore I tried to modify Add a custom text for a particular product