Category "php"

woocommerce get_order_report_data to show order_item_id

I would like to show order_item_id by get_order_report_data() I can use the array to show product id and order id : array( '_product_id' => array(

How to remove from a multidimensional array all duplicate elements including the original?

I am using php 7.1. I have seen that to eliminate the duplicate elements it is enough with this array_unique($array, SORT_REGULAR); I've also seen this work ar

How can I remove the "Advanced" panel of all blocks in WordPress block editor?

I want to optimize the WordPress block editor for my clients and hide everything that might confuse my clients. I've already removed several panels (colors, typ

Generate random username based on full name php

I want to grab the first name in lowercase then concatenate the first two characters after the space and finally concatenate that with a random number from 0 to

Shortcode or PHP inside a shortcode in Wordpress

On a php page in wordpress, I have a shortcode for an accordion, that consists of the following, and works perfectly: <?php echo do_shortcode('[su_accordion

OctoberCMS / Anonymous Global Scope

I am use OctoberCMS Rainlab.User plugin to manage authentication. I have various models and that belongTo User. How do i set up an anonymous global scope on eac

Shopify invalid token and password Error

I am getting this error : { "errors": "[API] Invalid API key or access token (unrecognized login or wrong password)" } Can anyone help me About the URL o

Send messages to Whatsapp number using PHP [closed]

I have to send messages to the customer's whatsapp number programatically. What are the pre requirements/needs? Do I need to convert/regist

Using a single form for insert and update function, Codeigniter

I'm trying to use a single form for inserting a new data and updating the value of an existing data.I have no trouble displaying the form, fetching the data and

How to hide Yii Web Framework name from Wappalyzer?

I'm trying to hide the framework name Yii from Wappalyzer plugin in Chrome/Firefox. I need to hide the framework name as a part of security audit. I've turned

Xdebug in Laravel is not working with VSCode

I'm trying to debug a Laravel project in Ubuntu 20.04. There is a problem that debugger doesn't hit breakpoint just in Laravel project but in other projects Xd

Discord js <@userid> doesn't work correctly

I would like to know if its possible to tag user inside message. For example: msg.channel.send('display and tag user <@426369340> , thanks!').then(msg =

localhost is currently unable to handle this request HTTP ERROR 500 in Codeigniter3

I use MAMP for MAC and I had a project on my local. It worked well. I decided to update this project and downloaded from my web server after what localhost show

Applying programmatically a coupon to an Order in WooCommerce3

I'm developing a plugin that creates an order directly (no cart) and applies a coupon. In version 3.0 of the woo API the function add_coupon() has been deprecat

What's the net::ERR_HTTP2_PROTOCOL_ERROR about?

I'm currently working on a website, which triggers a net::ERR_HTTP2_PROTOCOL_ERROR 200 error on Google Chrome. I'm not sure exactly what can provoke this error,

php echo xml documents with header

php code <?php $xml="<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; $xml.="<db_entry id=\"$model->id\" doi=\"$model->identifier\">"; $xml.=

What is the function of the (new Date()).getTime() in PHP?

I was looking at some javascript code: <script language="javascript" type="text/javascript"> var time = (new Date()).getTime(); console.log(time); </s

Target Individual Form Instance/Counter Inside A PHP While Loop

I have a PDO prepared statement that I use on a single-image page where a user is going to be able to download that specific image. I currently have a counter t

Laravel with App Engine Standard Class 'Facade\Ignition\IgnitionServiceProvider' not found

This is driving me crazy second day. I'm new to Laravel and trying to get Laravel 6 work on Google App Engine Standard. Tried: This tutorial and other ones, but

Error when uploading certain .png files "Interlace handling should be turned on when using png_read_image"

I have seen some random errors when processing images that were uploaded to my site, where certain .png files will cause an error to be echo'd to the output buf