Custom sorting of reviews in Elementor

I am trying to set up custom filtering of the reviews widget in Elementor. Basically what ‘d like to do is add a new ACF field for product model, and then have my loop carousel template populate with the relevant reviews (e.g. reviews with that product tag) on pages dynamically. How would I go about doing this?

I’ve added a new field but can’t figure out how to get around manually adding/inserting all of these reviews depending on the page.

here’s the code i’ve tried so dar:

add_action('elementor/query/custom_review_filter', function($query) {
    if (is_page() && get_field('product_model')) {
        $product_model = get_field('product_model');
        $query->set('meta_key', 'product_model');
        $query->set('meta_value', $product_model);
    }
});

How to get only keys from a nested array in php?

{
    "numberOfResults": 1,
"items": [
    {
        "asin": "B089SMNFZJ",
        "attributes": {
            "model_name": [
                {
                    "language_tag": "en_US",
                    "value": "Arko",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "age_range_description": [
                {
                    "language_tag": "en_US",
                    "value": "Adult",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "bullet_point": [
                {
                    "language_tag": "en_US",
                    "value": "After washing with hand soap, use Arko Nem Cream give dry hands the soothing care they deserve",
                    "marketplace_id": "ATVPDKIKX0DER"
                },
                {
                    "language_tag": "en_US",
                    "value": "Intensive Cream",
                    "marketplace_id": "ATVPDKIKX0DER"
                },
                {
                    "language_tag": "en_US",
                    "value": "Fast absorbing",
                    "marketplace_id": "ATVPDKIKX0DER"
                },
                {
                    "language_tag": "en_US",
                    "value": "Delivers lng lasting moisture",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "scent": [
                {
                    "language_tag": "en_US",
                    "value": "Classic",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "material_type_free": [
                {
                    "language_tag": "en_US",
                    "value": "Alcohol Free",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "item_dimensions": [
                {
                    "width": {
                        "unit": "centimeters",
                        "value": 10.0
                    },
                    "length": {
                        "unit": "centimeters",
                        "value": 15.0
                    },
                    "height": {
                        "unit": "centimeters",
                        "value": 10.0
                    },
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "product_description": [
                {
                    "language_tag": "en_US",
                    "value": "<br>Arko Nem<br><br>Shine like your skin!<br>Protects and vivifies your skin.<br><br>Arko Nem Classic Oily Cream<br>&nbsp;<br>This efficient moisturizer that contains the clean and nostalgic scent of classic Arko creams, is a guaranteed solution to the dryness that your skin experience in the cold of winter, wind of spring and the glowing days of the summer. Despite it has an oil-based formula, Arko Nem Classic easily absorbs and provides a comfortable use.&nbsp;<br>It has been dermatologically tested and can be used safely on children's skin.&nbsp;<br>During the day, weather changes and various other external factors cause your body the lose its natural moisture balance.&nbsp;<br><br>It moisturizes without leaving a greasy feeling on your skin and allows it to reach the natural moisture balance.<br>Its effect lasts 24 hours and meets your skin’s moisture needs all day.&nbsp;<br>300ml, 100ml, 20cc<br>With 3 sizes of 20cc, 100ml and 300ml, you can easily put Arko cream in your bag, take it to your travels and share it with your loved ones at home.<br><br>RECCOMENDATIONS FOR USE<br><br>Massage to your hands and face and apply all areas that need moisture until the cream is absorbed.&nbsp;<br>Massage and let your skin absorb the cream until it disappears.<br>Arko Nem Classic moisturizing cream is with you everywhere!&nbsp;<br>It provides your skin's natural moisture balance and does not leave a greasy feeling.&nbsp;<br><br>DISCOVER THE ARKO NEM SERIES!<br><br>SOFT TOUCH<br>GLYCERIN<br>CLASSIC<br>PEARL ESSENCES<br>OLIVE OIL&nbsp;<br><br>250ml&amp;60ml Features, benefits, areas of usage<br><br>For normal and combination skins<br>With its formula that absorbs quickly and does not leave a greasy feeling, it gives moisture to your skin.<br><br>For severe dry skins<br>It traps moisture in your hands and provides an ideal moisture balance for severe dry hands.<br><br>For dry skins",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "brand": [
                {
                    "language_tag": "en_US",
                    "value": "Arko",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "unspsc_code": [
                {
                    "value": "53130000",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "item_display_weight": [
                {
                    "unit": "grams",
                    "value": 200.0,
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "externally_assigned_product_identifier": [
                {
                    "value": "091952669056",
                    "type": "upc",
                    "marketplace_id": "ATVPDKIKX0DER"
                },
                {
                    "value": "0091952669056",
                    "type": "ean",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "item_form": [
                {
                    "language_tag": "en_US",
                    "value": "Cream",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "item_type_keyword": [
                {
                    "value": "facial-moisturizers",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "number_of_items": [
                {
                    "value": 5,
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "item_package_dimensions": [
                {
                    "length": {
                        "unit": "centimeters",
                        "value": 3.302
                    },
                    "width": {
                        "unit": "centimeters",
                        "value": 10.16
                    },
                    "height": {
                        "unit": "centimeters",
                        "value": 11.938
                    },
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "recommended_uses_for_product": [
                {
                    "language_tag": "en_US",
                    "value": "Soothing",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "size": [
                {
                    "language_tag": "en_US",
                    "value": "Pack of 5",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "part_number": [
                {
                    "value": "504785",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "target_gender": [
                {
                    "value": "unisex",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "variation_theme": [
                {
                    "name": "SIZE_NAME/SCENT_NAME",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "contains_liquid_contents": [
                {
                    "value": true,
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "item_package_weight": [
                {
                    "unit": "kilograms",
                    "value": 0.136,
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "item_volume": [
                {
                    "unit": "milliliters",
                    "value": 300.0,
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "skin_type": [
                {
                    "language_tag": "en_US",
                    "value": "Oily,Dry",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "manufacturer": [
                {
                    "language_tag": "en_US",
                    "value": "Evyap",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "target_use_body_part": [
                {
                    "value": "hands",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "model_number": [
                {
                    "value": "504785",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "supplier_declared_dg_hz_regulation": [
                {
                    "value": "not_applicable",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "material_feature": [
                {
                    "language_tag": "en_US",
                    "value": "Natural",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "item_name": [
                {
                    "language_tag": "en_US",
                    "value": "Arko Classic Oily Cream 20cc (5 Pack)",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "list_price": [
                {
                    "currency": "USD",
                    "value": 0.0,
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "batteries_required": [
                {
                    "value": false,
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "product_site_launch_date": [
                {
                    "value": "2020-06-16T07:23:07.142Z",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "target_audience_keyword": [
                {
                    "language_tag": "en_US",
                    "value": "Unisex Adult",
                    "marketplace_id": "ATVPDKIKX0DER"
                },
                {
                    "language_tag": "en_US",
                    "value": "Men",
                    "marketplace_id": "ATVPDKIKX0DER"
                },
                {
                    "language_tag": "en_US",
                    "value": "Adults",
                    "marketplace_id": "ATVPDKIKX0DER"
                },
                {
                    "language_tag": "en_US",
                    "value": "People",
                    "marketplace_id": "ATVPDKIKX0DER"
                },
                {
                    "language_tag": "en_US",
                    "value": "Teens",
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ],
            "unit_count": [
                {
                    "type": {
                        "language_tag": "en_US",
                        "value": "Count"
                    },
                    "value": 6.0,
                    "marketplace_id": "ATVPDKIKX0DER"
                }
            ]
        },
        "dimensions": [
            {
                "marketplaceId": "ATVPDKIKX0DER",
                "item": {
                    "height": {
                        "unit": "inches",
                        "value": 3.93700787
                    },
                    "length": {
                        "unit": "inches",
                        "value": 5.905511805
                    },
                    "width": {
                        "unit": "inches",
                        "value": 3.93700787
                    }
                },
                "package": {
                    "height": {
                        "unit": "inches",
                        "value": 1.299999998674
                    },
                    "length": {
                        "unit": "inches",
                        "value": 4.699999995206
                    },
                    "weight": {
                        "unit": "pounds",
                        "value": 0.29982867632
                    },
                    "width": {
                        "unit": "inches",
                        "value": 3.99999999592
                    }
                }
            }
        ],
        "identifiers": [
            {
                "marketplaceId": "ATVPDKIKX0DER",
                "identifiers": [
                    {
                        "identifierType": "EAN",
                        "identifier": "0091952669056"
                    },
                    {
                        "identifierType": "UPC",
                        "identifier": "091952669056"
                    }
                ]
            }
        ],
        "images": [
            {
                "marketplaceId": "ATVPDKIKX0DER",
                "images": [
                    {
                        "variant": "MAIN",
                        "link": "https://m.media-amazon.com/images/I/71OWUn6w2HL.jpg",
                        "height": 1500,
                        "width": 1500
                    },
                    {
                        "variant": "MAIN",
                        "link": "https://m.media-amazon.com/images/I/51vBolkWZkL.jpg",
                        "height": 500,
                        "width": 500
                    },
                    {
                        "variant": "MAIN",
                        "link": "https://m.media-amazon.com/images/I/51vBolkWZkL._SL75_.jpg",
                        "height": 75,
                        "width": 75
                    },
                    {
                        "variant": "PT01",
                        "link": "https://m.media-amazon.com/images/I/31G-MWnA8sL.jpg",
                        "height": 432,
                        "width": 391
                    },
                    {
                        "variant": "PT01",
                        "link": "https://m.media-amazon.com/images/I/31G-MWnA8sL._SL75_.jpg",
                        "height": 75,
                        "width": 68
                    },
                    {
                        "variant": "PT02",
                        "link": "https://m.media-amazon.com/images/I/41fE9c5y2ML.jpg",
                        "height": 479,
                        "width": 494
                    },
                    {
                        "variant": "PT02",
                        "link": "https://m.media-amazon.com/images/I/41fE9c5y2ML._SL75_.jpg",
                        "height": 73,
                        "width": 75
                    },
                    {
                        "variant": "PT03",
                        "link": "https://m.media-amazon.com/images/I/31o+SLhcIpL.jpg",
                        "height": 286,
                        "width": 302
                    },
                    {
                        "variant": "PT03",
                        "link": "https://m.media-amazon.com/images/I/31o+SLhcIpL._SL75_.jpg",
                        "height": 71,
                        "width": 75
                    },
                    {
                        "variant": "PT04",
                        "link": "https://m.media-amazon.com/images/I/31VNiSOl3SL.jpg",
                        "height": 292,
                        "width": 311
                    },
                    {
                        "variant": "PT04",
                        "link": "https://m.media-amazon.com/images/I/31VNiSOl3SL._SL75_.jpg",
                        "height": 70,
                        "width": 75
                    }
                ]
            }
        ],
        "relationships": [
            {
                "marketplaceId": "ATVPDKIKX0DER",
                "relationships": []
            }
        ],
        "salesRanks": [
            {
                "marketplaceId": "ATVPDKIKX0DER",
                "classificationRanks": [
                    {
                        "classificationId": "16479981011",
                        "title": "Face Moisturizers",
                        "link": "https://www.amazon.com/gp/bestsellers/beauty/16479981011",
                        "rank": 4613
                    }
                ],
                "displayGroupRanks": [
                    {
                        "websiteDisplayGroup": "beauty_display_on_website",
                        "title": "Beauty & Personal Care",
                        "link": "https://www.amazon.com/gp/bestsellers/beauty",
                        "rank": 227725
                    }
                ]
            }
        ],
        "summaries": [
            {
                "marketplaceId": "ATVPDKIKX0DER",
                "adultProduct": false,
                "autographed": false,
                "brand": "Arko",
                "browseClassification": {
                    "displayName": "Face Moisturizers",
                    "classificationId": "16479981011"
                },
                "itemClassification": "BASE_PRODUCT",
                "itemName": "Arko Classic Oily Cream 20cc (5 Pack)",
                "manufacturer": "Evyap",
                "memorabilia": false,
                "modelNumber": "504785",
                "partNumber": "504785",
                "size": "Pack of 5",
                "tradeInEligible": false,
                "websiteDisplayGroup": "beauty_display_on_website",
                "websiteDisplayGroupName": "Beauty"
            }
        ]
    }
]
}

I get JSON data for ASINs from Amazon using the SP API, as above.

This data is;

$data = json_decode($DATA_SEC_TXT_1, true);

The sample output is as follows.

Array
(
[0] => Array
    (
        [asin] => B089SMNFZJ
        [attributes] => Array
            (
                [model_name] => Array
                    (
                        [0] => Array
                            (
                                [language_tag] => en_US
                                [value] => Arko
                                [marketplace_id] => ATVPDKIKX0DER
                            )

                    )

                [age_range_description] => Array
                    (
                        [0] => Array
                            (
                                [language_tag] => en_US
                                [value] => Adult
                                [marketplace_id] => ATVPDKIKX0DER
                            )

                    )

                [bullet_point] => Array
                    (
                        [0] => Array
                            (
                                [language_tag] => en_US
                                [value] => After washing with hand soap, use Arko Nem Cream give dry hands the soothing care they deserve
                                [marketplace_id] => ATVPDKIKX0DER
                            )

                        [1] => Array
                            (
                                [language_tag] => en_US
                                [value] => Intensive Cream
                                [marketplace_id] => ATVPDKIKX0DER
                            )

                        [2] => Array
                            (
                                [language_tag] => en_US
                                [value] => Fast absorbing
                                [marketplace_id] => ATVPDKIKX0DER
                            )

                        [3] => Array
                            (
                                [language_tag] => en_US
                                [value] => Delivers lng lasting moisture
                                [marketplace_id] => ATVPDKIKX0DER
                            )

                    )

                [scent] => Array
                    (
                        [0] => Array
                            (
                                [language_tag] => en_US
                                [value] => Classic
                                [marketplace_id] => ATVPDKIKX0DER
                            )

                    )

                [material_type_free] => Array
                    (
                        [0] => Array
                            (
                                [language_tag] => en_US
                                [value] => Alcohol Free
                                [marketplace_id] => ATVPDKIKX0DER
                            )

                    )

                [item_dimensions] => Array
                    (
                        [0] => Array
                            (
                                [width] => Array
                                    (
                                        [unit] => centimeters
                                        [value] => 10
                                    )

                                [length] => Array
                                    (
                                        [unit] => centimeters
                                        [value] => 15
                                    )

                                [height] => Array
                                    (
                                        [unit] => centimeters
                                        [value] => 10
                                    )

                                [marketplace_id] => ATVPDKIKX0DER
                            )

                    )

                [product_description] => Array
                    (
                        [0] => Array
                            (
                                [language_tag] => en_US
                                [value] => Arko Nem
                                [marketplace_id] => ATVPDKIKX0DER
                            )

                    )

                [brand] => Array
                    (
                        [0] => Array
                            (
                                [language_tag] => en_US
                                [value] => Arko
                                [marketplace_id] => ATVPDKIKX0DER
                            )

                    )

                [unspsc_code] => Array
                    (
                        [0] => Array
                            (
                                [value] => 53130000
                                [marketplace_id] => ATVPDKIKX0DER
                            )

                    )
                [supplier_declared_dg_hz_regulation] => Array
                    (
                        [0] => Array
                            (
                                [value] => not_applicable
                                [marketplace_id] => ATVPDKIKX0DER
                            )

                    )

                [material_feature] => Array
                    (
                        [0] => Array
                            (
                                [language_tag] => en_US
                                [value] => Natural
                                [marketplace_id] => ATVPDKIKX0DER
                            )

                    )

                [item_name] => Array
                    (
                        [0] => Array
                            (
                                [language_tag] => en_US
                                [value] => Arko Classic Oily Cream 20cc (5 Pack)
                                [marketplace_id] => ATVPDKIKX0DER
                            )

                    )

                [list_price] => Array
                    (
                        [0] => Array
                            (
                                [currency] => USD
                                [value] => 0
                                [marketplace_id] => ATVPDKIKX0DER
                            )

                    )

                                    [product_site_launch_date] => Array
                    (
                        [0] => Array
                            (
                                [value] => 2020-06-16T07:23:07.142Z
                                [marketplace_id] => ATVPDKIKX0DER
                            )

                    )
        [summaries] => Array
            (
                [0] => Array
                    (
                        [marketplaceId] => ATVPDKIKX0DER
                        [adultProduct] => 
                        [autographed] => 
                        [brand] => Arko
                        [browseClassification] => Array
                            (
                                [displayName] => Face Moisturizers
                                [classificationId] => 16479981011
                            )

                        [itemClassification] => BASE_PRODUCT
                        [itemName] => Arko Classic Oily Cream 20cc (5 Pack)
                        [manufacturer] => Evyap
                        [memorabilia] => 
                        [modelNumber] => 504785
                        [partNumber] => 504785
                        [size] => Pack of 5
                        [tradeInEligible] => 
                        [websiteDisplayGroup] => beauty_display_on_website
                        [websiteDisplayGroupName] => Beauty
                    )

            )

    )

)

I can easily process this php data with the code;

print_r ($data["items"]);

What I want to do is to get the keys of nested arrays in PHP codes.

The output I want to get should be like this.

What I want to do is to get the keys of nested arrays in PHP codes.

So every;

[0] => Array

I want to go over the previous keys.

The output I want to get is;

[asin] => B089SMNFZJ
[attributes] => Array
(
[0] => model_name
[1] => age_range_description
[0] => bullet_point
...
...

How can I do this?

Can’t upload files larger than 8 MB on Azure App Service (Linux) with Laravel v11

I’m having trouble uploading files larger than 8 MB on my Laravel v11 application, which is hosted on Azure App Service running on Linux.

Here’s what I’ve already done to configure the upload limits:

  1. Set the client_max_body_size directive in Nginx, and verified it’s working as expected:

    client_max_body_size 50M;
    
  2. Updated PHP php.ini settings via PHP_INI_SCAN_DIR. Running php -i on the server’s shell (SSH) confirms that the correct parameters are loaded:

    upload_max_filesize = 30M
    post_max_size = 50M
    memory_limit = 256M
    

Despite these settings, I can only upload files smaller than 8 MB. Trying to upload a file around 10 MB results in the following error:

The server returned a "413 Content Too Large".

Interestingly, when I set post_max_size and upload_max_filesize to 1M, I’m still able to upload a 7 MB file successfully.

Here’s the output of php -i | grep max on the server:

    max_execution_time => 0 => 0
    max_file_uploads => 20 => 20
    max_input_nesting_level => 64 => 64
    max_input_time => -1 => -1
    max_input_vars => 1000 => 1000
    max_multipart_body_parts => -1 => -1
    post_max_size => 1M => 1M
    upload_max_filesize => 1M => 1M
    zend.exception_string_param_max_len => 15 => 15
    session.gc_maxlifetime => 1440 => 1440
    unserialize_max_depth => 4096 => 4096

What could be causing this issue? Any help would be greatly appreciated. Thanks in advance!

I’m having trouble receiving payments with Stripe

I used Stripe for payments but Stripe deducts the commission fee from the customer’s bank account

I want the commission fee to be collected from the amount to be reflected to the seller, not from the customer. I tried the fee_source parameter for this but it says you must be Stripe Connect. Can I do it without Stripe Connect?

Laravel Breeze prevent bail for password field, return all errors

Currently, Laravel Breeze seems to use bail default for the password field. So it does not return all errors at once.

Is there a way to prevent the bail for the password field using Breeze?

In my case I want to return all errors for the specific fields (in this case password).

Best would be if I could overwrite it similiar to how I did it for its validation in my AppServiceProvider:

        Password::defaults(function () {
            return Password::min(8)
                ->letters()
                ->numbers()
                ->symbols()
                ->mixedCase()
                ->uncompromised();
        });

Display in fullcalendar title and description PHP JS

i have a problem with full calendar, i can’t display the description in a new line, currently i have created a title which is a concatenations of the title and the description stored in the database mysql, but it is messy, i want to display in the event block in one row the title and in one row the description

calendar

For example in the yellow event i want in the first line Primo Soccorso and in the second line Gruppo A….

Currently the data is load from json from php mysql code using ajax.

$query = "select * from listaeventi";
if($result = mysqli_query($conn,$query)){
  while($row = mysqli_fetch_array($result,MYSQLI_ASSOC)){

      $data[] = [
          'id'              => $row["id"],
          'title'           => $row["titoloEvento"]." , ".$row["descrizioneEvento"],
          'description'     => $row["descrizioneEvento"],
          'type'            => "Corso",
          'start'           => $row["dataInizio"],
          'end'             => $row["dataFine"],
          'durata'          => $row["durataEvento"],
          'address'         => $row["indirizzoEvento"],
          'city'            => $row["paeseEvento"],
          'cliente'         => $row["cliente"],
          'sala'            => $row["sala"],
          'data_successiva' => $row["data_successiva"],
          'iscrizione'      => $row["iscrizione"],
          'borderColor'     => $row["bgcolor"],
          'backgroundColor' => $row["bordercolor"]
      ];

  }

}

The js code for full calendar it is this

document.addEventListener('DOMContentLoaded', function() {
var url ='';

var vista = 'listMonth';
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
  var vista = 'listMonth';
}
    var calendarEl = document.getElementById('calendar');
    var calendar = new FullCalendar.Calendar(calendarEl, {
      initialView: vista,
      locale: 'it',
      headerToolbar: {
        left: 'prev,next,today',
        center: 'title',
        right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth',
      },
      buttonText: {
        today:    'Oggi',
        month:    'Mese',
        week:     'Settimana',
        day:      'Giorno',
        list:     'Agenda'
      },


      navLinks: true, // can click day/week names to navigate views
      editable: true,
      selectable: true,
      eventDisplay: 'block',
      selectMirror: true,
      dayMaxEvents: true, // allow "more" link when too many events
      events: url+'calendar/load.php?filtro='+filtroCorso,
      contentHeight: 1500,
      allDaySlot: false, //evento allday
      firstDay: 1,
      select: function(arg) {

        var options = {'weekday': 'long', 'month': 'long', 'day': '2-digit'};

        var date = arg.start.toLocaleString('it-IT', options);

        // $("#data_inizio").val(arg.start.getFullYear()+"-"+(arg.start.getMonth()+1)+"-"+addZero(arg.start.getDate())+" "+addZero(arg.start.getHours())+":"+addZero(arg.start.getMinutes())+":"+addZero(arg.start.getSeconds()));
        // $("#data_fine").val(arg.end.getFullYear()+"-"+(arg.end.getMonth()+1)+"-"+addZero(arg.end.getDate())+" "+addZero(arg.end.getHours())+":"+addZero(arg.end.getMinutes())+":"+addZero(arg.end.getSeconds()));
        //
        // $("#data_evento").text(date);
        // $("#data_italiana").val(date);
        //
        // $("#ora_inizio").text(addZero(arg.start.getHours())+":"+addZero(arg.start.getMinutes()));
        // $("#ora_fine").text(addZero(arg.end.getHours())+":"+addZero(arg.end.getMinutes()));

        calendar.unselect()
      },

      //eventDrop is triggered when an event is dragged and dropped to another date or time.
      eventDrop: function(arg) {
          var start = arg.event.start.toDateString()+' '+arg.event.start.getHours()+':'+arg.event.start.getMinutes()+':'+arg.event.start.getSeconds();
          if (arg.event.end == null) {
              end = start;
          } else {
              var end = arg.event.end.toDateString()+' '+arg.event.end.getHours()+':'+arg.event.end.getMinutes()+':'+arg.event.end.getSeconds();
          }

          // $.ajax({
          //   url:url+"calendar/update.php",
          //   type:"POST",
          //   data:{id:arg.event.id, start:start, end:end},
          // });
      },
      //eventReize is very similar, this is triggered when an event is manually resized from a week or day view.
      eventResize: function(arg) {
          var start = arg.event.start.toDateString()+' '+arg.event.start.getHours()+':'+arg.event.start.getMinutes()+':'+arg.event.start.getSeconds();
          var end = arg.event.end.toDateString()+' '+arg.event.end.getHours()+':'+arg.event.end.getMinutes()+':'+arg.event.end.getSeconds();

          // $.ajax({
          //   url:url+"calendar/update.php",
          //   type:"POST",
          //   data:{id:arg.event.id, start:start, end:end},
          // });
      },

      eventClick: function(arg) {

        var id = arg.event.id;
        var options = {'weekday': 'long', 'month': 'long', 'day': '2-digit'};

        var date = arg.event.start.toLocaleString('it-IT', options);

        $.ajax({
          url:url+"calendar/getevent.php",
          type:"POST",
          dataType: 'json',
          data:{id:arg.event.id},
          success: function(data) {
            // alert(data[0].city);

              // alert(data[0].idRiferimento);
              $('#tipoEvento').html(data[0].type);
              $('#tipoEvento').css('color', data[0].backgroundColor);

              $('#titoloEvento').html(data[0].title);
              $('#titoloEvento').css('color', data[0].backgroundColor);
              globalID = data[0].id;

              $("#eliminaData").attr("href","https://corsi.gpserviziarco.it/calendario-corsi/index.php?delete="+globalID);

              globalTitolo = data[0].title;
              globalBackgroundColor = data[0].backgroundColor;


              // SETTO MAPPA USCITE PRATICHE

              if(data[0].address.includes("Circolo") || data[0].address.includes("Conca")){
                $('#mappa').attr('src', "https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3324.708097095604!2d10.87475893318616!3d45.86273542875592!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x478210e9aaef5bf7%3A0x2e3475f668003103!2sCircolo%20Vela%20Torbole!5e1!3m2!1sit!2sit!4v1727274256988!5m2!1sit!2sit");
                $('#indirizzo-mobile').attr('href', "https://maps.app.goo.gl/wMCmuxbFp6fCnEog6");
              }else if(data[0].address.includes("Porto")){
                $('#mappa').attr('src', "https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d6647.5929025257!2d10.853839376647468!3d45.87797800573525!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x478210d3a0a6edb3%3A0xd4ecc39b92163d32!2sPorto%20San%20Nicol%C3%B3!5e1!3m2!1sit!2sit!4v1727274370632!5m2!1sit!2sit");
                $('#indirizzo-mobile').attr('href', "https://goo.gl/maps/2gw4jFDzrbML83NE6");
              }else if(data[0].address.includes("San Nazzaro 2/D")){
                $('#mappa').attr('src', "https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3322.6874817366593!2d10.849190576648251!3d45.89651450448972!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x4782114dad8eac25%3A0xec24e7cccdbb556f!2sG%20%26%20P%20Servizi%20Srl!5e1!3m2!1sit!2sit!4v1727274332071!5m2!1sit!2sit");
                $('#indirizzo-mobile').attr('href', "https://goo.gl/maps/2gw4jFDzrbML83NE6");
              }else if(data[0].address.includes("Croseta 39")){
                $('#mappa').attr('src', "https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3321.7411262686323!2d10.862404176648921!3d45.91232830342698!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0xaa3df96f0daec2f7%3A0x9c56bae78c563eac!2sFeelwork%20sicurezza%20verticale!5e1!3m2!1sit!2sit!4v1727274399004!5m2!1sit!2sit");
                $('#indirizzo-mobile').attr('href', "https://maps.app.goo.gl/1iJBxVWkjJTZqxD39");
              }else if(data[0].address.includes("Piazza Maria Contini")){
                $('#mappa').attr('src', "https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3322.7094054490444!2d10.844431726648251!3d45.896148104514396!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x478216c504b123a3%3A0xdb7e711b80b3da0c!2sPiscina%20Comunale%20Coperta%20Enrico%20Meroni!5e1!3m2!1sit!2sit!4v1727274590307!5m2!1sit!2sit");
                $('#indirizzo-mobile').attr('href', "https://maps.app.goo.gl/Eyo5AvC5ZLU2zKTw9");
              }



              // FINE SETTO MAPPA USCITE PRATICHE

              $('#descrizioneEvento').html(data[0].description);
              globalDescrizione = data[0].description;

              $("#indirizzoEvento").html(data[0].address);
              $("#paeseEvento").html(data[0].city);

              $("#iscrizioneEvento").html(data[0].iscrizione);
              if(data[0].iscrizione=="APERTA"){
                $("#badge-iscrizione").removeClass( "badge-danger" );
                $("#badge-iscrizione").addClass( "badge-success" );
                $("#apriIscrizione").prop("disabled",false);
              }else if(data[0].iscrizione=="CHIUSA"){
                $("#badge-iscrizione").removeClass( "badge-success" );
                $("#badge-iscrizione").addClass( "badge-danger" );
                $("#apriIscrizione").prop("disabled",true);
              }

              if(data[0].title.includes("scit")){
                $("#apriIscrizione").hide();
              }else{
                $("#apriIscrizione").show();
              }


              $("#durataEvento").html(data[0].durata);

              $("#sala").html(data[0].sala);


              $("#lezioneSucccessiva").html(data[0].data_successiva);


              $("#dataEvento").text(date);
              $("#oraInizio").text(addZero(arg.event.start.getHours())+":"+addZero(arg.event.start.getMinutes()));
              $("#oraFine").text(addZero(arg.event.end.getHours())+":"+addZero(arg.event.end.getMinutes()));

              globalData = date+" "+addZero(arg.event.start.getHours())+":"+addZero(arg.event.start.getMinutes())+" - "+addZero(arg.event.end.getHours())+":"+addZero(arg.event.end.getMinutes());


              $("#pdf_specifico").attr("href", "docs/"+data[0].pdf+".pdf");

              $("#export-corso").attr("href", "/calendario-corsi/export.php?corso="+globalTitolo+"&data="+globalData);

              // $("#lista-iscritti").attr("href", "/calendario-corsi/lista-iscritti.php?corso="+globalTitolo+"&data="+globalData);
              $("#lista-iscritti").attr("href", "/calendario-corsi/lista-iscritti.php?corso="+globalTitolo+"&data="+data[0].dataOra+"&data2="+globalData); //NUOVO MODELLO DATA LISTA ISCRITTI
              $("#linkIscrizione").attr("href", "/calendario-corsi/iscrizione.php?type=iscrizione&codice="+data[0].id+"&idRiferimento="+data[0].idRiferimento+"&data="+data[0].dataOra);


              $("#pdf_specifico").attr("download", data[0].pdf+".pdf");
              $('#pdf_specifico_span').text(data[0].pdf);
              if(data[0].pdf=="no-file"){
                $( "#pdf_specifico" ).hide();
              }else{
                $( "#pdf_specifico" ).show();
              }

              if(data[0].title=="Corso bagnini" || data[0].title=="Corso Bagnini" || data[0].title=="Corso Bagnini Piscina"){
                $("#selezioneMinorenne").show(); //METTERE SHOW
              }else{
                $("#selezioneMinorenne").hide();
                $("#rigaGenitore").hide();
              }

              if(data[0].title=="Patente nautica" || data[0].title=="Patente Nautica"  || data[0].title=="Patente nautica "){
                $("#rigaNauticaPartecipazione").show(); //METTERE SHOW
              }else{
                $("#rigaNauticaPartecipazione").hide();
              }


              $("#exampleModal").modal();
            }
        });

        /*$.ajax({
          url:url+"calendar/getDateSuccessive.php",
          type:"POST",
          dataType: 'json',
          data:{id:arg.event.id},
          success: function(data1) {


            for(let i = 0; i <= data1.length; i++) {
              // alert(data1[i].dataEvento);
              s = new Date(data1[i].start).toLocaleString('it-IT', options);
              oraI = new Date(data1[i].start).getHours();
              minutiI = new Date(data1[i].start).getMinutes();
              oraF = new Date(data1[i].end).getHours();
              minutiF = new Date(data1[i].end).getMinutes();


              $("#successive").append(s+" 0"+oraI+":"+minutiI+" - "+oraF+":"+minutiF+"<br>");
              $("#tmpDateEvento").val($("#tmpDateEvento").val()+s+" "+oraI+":"+minutiI+" - "+oraF+":"+minutiF+";");
              $("#numero").val(data1.length);
              $("#corsiSuccessivi").val($("#corsiSuccessivi").val()+data1[i].id+";");
            }

          }
        });*/

        $('#delete').on('click', function() {
            if(confirm("Sei sicuro di voler cancellare l'evento?")) {
                $.ajax({
                    url:url+"calendar/delete.php",
                    type:"POST",
                    data:{id:arg.event.id},
                });

                //close model
                $("#modalSlideLeft").modal('hide');

                //refresh calendar
                calendar.refetchEvents();

                if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
                  location.reload();
                }

                // $('body').pgNotification({style:'simple',message:'Evento cancellato correttamente!',type:'success'}).show();
            }
        });

        calendar.refetchEvents();
    }

    });



    calendar.render();

});

Here the link https://corsi.gpserviziarco.it/calendario-corsi/

What i have to do to show the description
Thanks !

Why does the data i enter in the form doesn’t show in my database in phpMyAdmin? [closed]

In the following code, it takes the information of the user while submitting his message in a ‘Contact Us’ form, but when I click on the submit button, the database doesn’t show the data and it only shows me the massage “Message sent successfully.” , but if i upload a file, the file will be downloaded in my web server without it being shown in my db in phpMyAdmin.
I’m sure that the SQL code is perfect, since the db was made in phpMyAdmin. And how can i view a file that was uploaded and view it from phpMyAdmin?

<?php
// Database connection
$servername = "localhost";  
$username = "root";         
$password = "";             
$dbname = "contact_form_db"; 

$conn = new mysqli($servername, $username, $password, $dbname);

if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $name = mysqli_real_escape_string($conn, $_POST['name']);
    $email = mysqli_real_escape_string($conn, $_POST['email']);
    $phone = mysqli_real_escape_string($conn, $_POST['phone']);
    $message = mysqli_real_escape_string($conn, $_POST['message']);
    
    $file_path = '';
    if (isset($_FILES['file']) && $_FILES['file']['error'] == 0) {
        $file_tmp = $_FILES['file']['tmp_name'];
        $file_name = basename($_FILES['file']['name']);
        $file_size = $_FILES['file']['size'];
        $file_type = $_FILES['file']['type'];
        
        $allowed_types = ['image/jpeg', 'image/png', 'application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'];
        $max_size = 5 * 1024 * 1024; 
        
        if (in_array($file_type, $allowed_types) && $file_size <= $max_size) {
            $upload_dir = 'uploads/';
            
            if (!is_dir($upload_dir)) {
                mkdir($upload_dir, 0755, true);
            }
            
            $unique_file_name = uniqid('file_') . "_" . $file_name;
            $file_path = $upload_dir . $unique_file_name;
            
            if (move_uploaded_file($file_tmp, $file_path)) {
                echo "<p>File uploaded successfully!</p>";
            } else {
                echo "<p>There was an error uploading your file.</p>";
            }
        } else {
            echo "<p>Invalid file type or size. Please upload a valid file.</p>";
        }
    }

    $sql = "INSERT INTO contact_info (Name, Email, Phone, Message, FilePath) 
            VALUES ('$name', '$email', '$phone', '$message', '$file_path')";
    
    if ($conn->query($sql) === TRUE) {
        echo "<p>Message sent successfully!</p>";
    } else {
        echo "<p>Error: " . $conn->error . "</p>";
    }

    $conn->close();
}

?>




<!-- Contact Form -->
<div class="contact-form-container">
    <div class="contact-info-left">
        <h2>Contact Us</h2>
        <div class="contact-details">
            <p><i class="fas fa-map-marker-alt"></i> Zone 2, 3rd Floor, KOM4<br>
            Knowledge Oasis Muscat<br>
            PO Box 35, PC 135 Rusayl<br>
            Sultanate of Oman</p><br>
            <p><i class="fas fa-phone-alt"></i> 80077767 / +968 2417 1111</p><br>
            <p><i class="fas fa-clock"></i> from 8 AM - 5:30 PM</p><br> 
        </div>
    </div>
    <form class="contact-form" method="POST" action="" enctype="multipart/form-data">
    <!-- Personal Information Section -->
    <div class="form-section">
        <h3>Personal Information</h3>
        <label for="name">Name</label>
        <input type="text" id="name" name="name" pattern="[A-Za-z]+" title="Only letters are allowed" required>
        
        <label for="phone">Phone Number</label>
        <input type="tel" id="phone" name="phone" pattern="[0-9]{8,15}" title="Phone number should contain only numbers and be 8 to 15 digits long" required oninput="this.value = this.value.replace(/[^0-9]/g, '');">
        
        <label for="email">Email</label>
        <input type="email" id="email" name="email" required>
        <label for="file">Attach File (optional)</label>
        <input type="file" id="file" name="file" accept="image/*,.pdf,.docx,.txt">

    </div>
    
    <!-- Message Details Section -->
    <div class="form-section">
        <h3>Message Details</h3>
        <label for="message">Message</label>
        <textarea id="message" name="message" rows="10" required></textarea>
    </div>

    <button type="submit">Send Message</button>
    
</form>
<script>
function submitForm(event) {
    event.preventDefault(); 
    
    alert("Message sent successfully!"); 
}
</script>
</div>

I don’t know if the HTML code has something to do with it, but I did try to get help from ChatGPT and it keeps saying that there is no problem with the code. And sometimes it changes many things in the code and makes it completely different.
I’ve tried to change the variables names but It still did not work.

Woocommece update mini cart count ajax

I am using following code to add product to cart on my button click. It works fine (product is added to cart), but the count in mini cart is only updated after second add. First time I click add, there is no update visible in cart mini icon (unless I refresh the page).

I use default WordPress theme.

php:

add_action('wp_ajax_map_woo_add_to_cart', 'map_woo_add_to_cart');

function map_woo_add_to_cart(){

    if(isset($_POST['product_id'])){

        $product_id = $_POST['product_id'];
        
            ob_start();

            $quantity          = 1;
            $passed_validation = apply_filters( 'woocommerce_add_to_cart_validation', true, $product_id, $quantity ); 
            $product_status    = get_post_status( $product_id );
            $added             = WC()->cart->add_to_cart( $product_id, $quantity );

            if ( $passed_validation && $added && 'publish' === $product_status ) {
                ob_start();

                woocommerce_mini_cart();

                $mini_cart = ob_get_clean();

                $data = array(
                    'fragments'  => apply_filters(
                        'woocommerce_add_to_cart_fragments',
                        array(
                            'div.widget_shopping_cart_content' => '<div class="widget_shopping_cart_content">' . $mini_cart . '</div>',
                        )
                    ),
                    'cart_hash'  => WC()->cart->get_cart_hash(),
                    'ajax_nonce' => wp_create_nonce( 'map_woo-security-nonce' ),
                );

                wp_send_json_success( $data );
            } else {
                $data = array(
                    'message'     => __( 'The product was not added to the cart', MAP_WOO_TEXTDOMAIN ),
                    'product_url' => apply_filters( 'woocommerce_cart_redirect_after_error', get_permalink( $product_id ), $product_id ), 
                    'product_id'  => $product_id,
                );
                wp_send_json_error( $data );
            }
       

          }
      }

javascript:

function addProductToCart(postId, data){

        const params = new URLSearchParams();
        params.append("action", 'map_woo_add_to_cart');
        params.append("product_id", postId);

        var xhrRequest = new XMLHttpRequest();
        xhrRequest.onreadystatechange = function() {
            if (this.readyState == 4) {
                var result = JSON.parse(this.responseText);
                console.log(result);

                if ( result.data.fragments ) {
                 
                    jQuery( document.body ).trigger( 'wc_fragment_refresh' );
                    jQuery( document.body ).trigger( 'added_to_cart', [ result.data.fragments, result.data.cart_hash ] );
              
                }

            }
        }
        xhrRequest.onerror = function(e) { 
            console.log('Error add_to_cart: ' + e);
        };
        xhrRequest.open('POST', settings.ajax_url);
        xhrRequest.setRequestHeader("Content-Type", 'application/x-www-form-urlencoded');
        xhrRequest.send(params);

    }

Equal Height Tiny Slider Carousel

I would like the slides to be other equal height, so the slides will match the height all the tallest slide. Ideally with the two bottom information (1,500 SQFT and Enquire) staying at the bottom of the container.

I’m using PropertyHive, which is using the tiny slider package inside of the plugin to make this carousel.

https://dovesmanagement.co.uk/

screenshot of the current carousel with unequal heights, with annotation

Accessing a class constant from a trait in php gives error in VScode

I have in laravel inside the same App folder a class and a trait

MyClass.php

<?php

namespace App;

class MyClass {

    use myTrait;
    CONST MY_CONST = 'CONST';
    
    public function showConst() {
        echo $this->myTraitMethod();
    }
    
}

MyTrait.php

<?php

namespace App;

class MyTrait {
    
    public function myTraitMethod() {
        return self::MY_CONST; // Undefined class constant 'MY_CONST'
        return static::MY_CONST; // Undefined class constant 'MY_CONST'
        return MyClass:MY_CONST; // This is the only one that works but I'm forcing the class name
    
    }
}

the issue is that I cannot access MY_CONST except if I force the parent class name that is not a solution for me.

The issue is just with vscode, I mean the code runs fines with both self and static but vscode returns the error

Undefined class constant 'MY_CONST'

Magento 2: Incorrect Price Calculation for Multiple Quantities in Checkout with Stripe

I’m facing an issue in my Magento 2 store during checkout when using Stripe as the payment method. When a customer adds the same product to the cart multiple times (e.g., three units of a single product) and proceeds through the checkout process, the total amount displayed on the final order placement page is incorrect. It seems as though the total is being miscalculated, possibly multiplied or inflated unexpectedly.

Environment Details:

  • Magento Version: 2
  • PHP Version: 8.2
  • Theme: SM Market Theme

This miscalculation occurs specifically when selecting Stripe as the payment method and appears on the order review page right before placing the order. Any insights into why this might happen or where to check for possible configuration issues would be greatly appreciated.

Steps to Reproduce:

  • Log into a customer account.
  • Navigate to the shop page.
  • Add the same product to the cart three times.
  • Proceed to checkout.
  • Review the cart and shipping information.
  • Continue to payment method selection (Stripe).
  • On the final order placement page, the total amount is incorrect.

What I’ve Tried:

  • Cleared the cache to rule out caching issues.
  • Reviewed the XML configuration file for any discrepancies in checkout block settings.
  • Inspected the code responsible for calculating checkout totals to identify potential errors.

Expected Behavior:
When a single product is added to the cart multiple times, the total should calculate as:
(Product Price × Quantity) + Shipping Cost = Total

Actual Behavior:
After adding the same product to the cart three times, the checkout displays an incorrect total, as if the total amount has been multiplied by 3. This unexpected calculation results in an inflated final price.

Questions:

  • What could be causing this incorrect calculation during checkout when using Stripe?
  • Are there common configuration issues with Magento 2 that could lead to this inflated total when multiple quantities are added to the cart?
  • Where should I check further to troubleshoot the issue, especially within the checkout and payment gateway configurations?

Any guidance or suggestions on how to resolve this issue would be greatly appreciated!

API endpoint to retrieve version of a WordPress site?

Simple question:

Is there an API endpoint to retrieve the version of a specific WordPress site?
I need to monitor different WordPress sites and want to retrieve the version of these sites to be collected and checked for WordPress updates.

Is there a simple solution, something like example.com/api/version ?

how to fix model boot method not working properly?

protected static function boot()
    {
        parent::boot();
        self::creating(function ($model) {
            $model->unique_id = self::generateUniqueId();
        });

        self::deleting(function (Submission $submission) {
            Log::info('Deleting model:', ['model' => $submission]);
            dd($submission);
            // Delete all associated media
            $submission->clearMediaCollection('files');
            $submission->clearMediaCollection('images');
        });
    }

i have this method in my submission model the creating works on each new model while creating but the deleting is not working it just deletes the model and this doesnt works

my submission model


namespace AppModels;

use IlluminateDatabaseEloquentFactoriesHasFactory;
use IlluminateDatabaseEloquentModel;
use IlluminateSupportFacadesLog;
use SpatieMediaLibraryHasMedia;
use SpatieMediaLibraryInteractsWithMedia;
use SpatieMediaLibraryMediaCollectionsFile;

class Submission extends Model implements HasMedia
{
    use InteractsWithMedia, HasFactory;
    protected $fillable = [
        'unique_id',
        'user_id',
        'title',
        'description',
        'status',
    ];

    protected static function boot()
    {
        parent::boot();
        self::creating(function ($model) {
            $model->unique_id = self::generateUniqueId();
        });

        self::deleting(function (Submission $submission) {
            Log::info('Deleting model:', ['model' => $submission]);
            dd($submission);
            // Delete all associated media
            $submission->clearMediaCollection('files');
            $submission->clearMediaCollection('images');
        });
    }

    public static function generateUniqueId()
    {
        do {
            $uniqueId = str_pad(rand(0, 99999999), 12, '0', STR_PAD_LEFT);
        } while (self::where('unique_id', $uniqueId)->exists());

        return $uniqueId;
    }

    public function user()
    {
        return $this->belongsTo(User::class);
    }

    public function replies()
    {
        return $this->hasMany(SubmissionReply::class);
    }

    public function registerMediaCollections(): void
    {
        $this->addMediaCollection('files')
            ->useDisk('submissions')
            ->acceptsFile(function (File $file) {
                return in_array($file->mimeType, [
                    'image/jpeg',
                    'image/png',
                    'application/pdf',
                    'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
                    'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
                    'text/plain'
                ]);
            });

        $this->addMediaCollection('images')
            ->useDisk('submissions')
            ->singleFile()
            ->acceptsMimeTypes([
                'image/jpeg',
                'image/png',
                'image/jpg',
            ]);
    }
}

Incorrect French characters php – website [duplicate]

I inherited a website to rebuild, which is displaying French characters incorrectly (’ for ‘, é for é, è for è and so on). These characters are also present as such in the mysql database. The database collation and the collation of content tables was set to “latin_swedish1_ci” when I received it. The websites html header contains <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />.

In order to correct the data I have updated the database collation and the one from one table (as a test) to “utf8mb4_unicode_ci” through phpmyadmin > operations which (as far as I understood) applies an ALTER function. However after these actions, the strings in the database and the table still contain the incorrect characters. Also when exported with utf-8 encoding, the content in the table is showing the incorrect characters.

db and server character and collation values

Does this mean I would need to clean up all the records in the database, or do I overlook something and is there still a way to get the correct characters through the charsets and collation settings?

(Watch Full Video) Imsha Rehman Leaked Video

A recent video of Imsha Rehman, a popular TikTok creator, has quickly gone viral, capturing attention across social media platforms. Known for her creative content, Imsha Rehman’s video tutorial has spread rapidly, especially on platforms like X (formerly Twitter) and Telegram.

CLICK HERE ==►► WATCH NOW

This original video has sparked considerable interest and discussion, highlighting her growing influence in the digital space.

Laked Video Imsha Rehman Video Tutorial Original Video Viral Video Laked on X Twitter

Imsha Rehman Video Tutorial Original Video video oficial twitter

Laked VideoImsha Rehman Video Tutorial Original Video Viral Video Laked on X Twitter