Category "php"

Shopify password update using Shopify API

Can we update password for a User or Customer that already exists in Shopify using the Shopify API?

Changing currency on checkout with WooCommerce Multilingual Plugin

I'm trying to implement currency change on checkout with WooCommerce Multilingual Plugin. I need a country with COP and the rest of countries with USD. First I

Sum array values of a column within each column of an array with 3 levels

I'm trying to use array_sum() on columns within columns of a multidimensional array. For eg: I have an array that looks like this: $array = [ [['value' =>

Symfony 5 : Authentication failed in prod env

I have an application that I'm trying to upload to my FTP server. I've run : symfony console make:user and also symfony console make:auth So while running the s

find in set in laravel ? example

I am new in laravel. My query is i need to find out value from comma separated field. Here is my table: tags_value id tags 1 css,html,php 2 php,java,css 3 java

Laravel views are showing from cache on one server but works fine on other server

I am working on Laravel(5.4) project. I am facing an strange issue regarding the laravel views. My all views are working fine but some views are always showing

mysql slow on updates for a well optimized query

i am facing an issue with update state , which takes up to 4s on very small queries . Count: 1 Time=3.87s (3s) Lock=0.00s (0s) Rows=0.0 (0), ***[***]@localho

laravel 5.6 bulk inserting json data

I am trying to build an API to store and retrieve MCQ exam papers. I am using laravel resource class to send handle Json data. I need to insert 40 records into

best way to store error messages in Laravel (session or variable)

I'm trying to find out what is the best way to store error messages (due to wrong parameters for e.g). Assuming I'm declaring the accepted parameters in the Co

PHP my timezone is no setting up in PHP.ini File in xampp

I've xampp installed on my Local PC. But I've a Problem in my Timezone. PHP date shows my Date & Time 02/11/2018 05:26:18. but my PC Time is 02/11/2018 09:2

Docker image build with PHP zip extension shows "bundled libzip is deprecated" warning

I have a Dockerfile with a build command like this: #install some base extensions RUN apt-get install -y \ zlib1g-dev \ zip \ && dock

Execute only one time and then wait set period of time before executing again

I am trying to make a pop up execute only 1 time for a user every 30 days. Currently the pop up is being executed in an infinite loop. Every time I trigger it e

Cannot return objects in @dataProvider PHPUnit

Is it allowed to return objects from @dataProviders to test methods? public function iOsMessages() { return [ 'update available' => [1,

Symfony/Form add attribute based on the data

In one of my custom form types I need to add a custom HTML attribute to the field. However that attribute is based on the data. So I added an event handler but

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