Tag: php
-
Sample .htaccess for Laravel with PHP FPM
-
Gravityforms limit submission – once for user, unlimited for guest
File: gp-limit-submissions/includes/GPLS_Rule_User.php Plugin: https://gravitywiz.com/documentation/gravity-forms-limit-submissions
-
How to get Gravity forms entry value by label?
-
PHP caveats – int/float type conversion
The following code checks various scenarios in which inbuilt functions like intval, floatval, is_numeric, is_float and filter_var would result for several different types of values. Feel free to run in your local, leave comments if I can make the results more interesting with some more functions. https://gist.github.com/harshvardhanmalpani/8dd0222e4821d0e495532abe9007fef1 Output / Results
-
How to batch edit multiple images to make square sized pictures with original image in center using php imagejpeg?
-
How to filter and validate pincode in Indian woocommerce?
By default, Woocommerce only validates ZIP code of few countries only. Woocommerce stores in India, are thus invalidated in case of PINCODE inputs from customers. Here is how you can enable checking of pincode for India woocommerce: Put the following code in your custom function file or child theme functions.php Reference: https://github.com/woocommerce/woocommerce/blob/ef0f527b40dba539e982efff26211fa577a24cf9/includes/class-wc-validation.php#L44
-
How to reverse the ids in a mysql table column without breaking primary key constraint?
Let me explain the problem scenario: Let us assume we have a table with 4 columns in it out of which 1 is PRIMARY column and rest 3 contain some data. What we want to do is to reverse the primary key IDs for that data keeping the rest of data intact. It is like…
-
How to transpose an array in PHP with irregular subarray size?
Test Code Output
-
How to fix Composer should be invoked via the CLI version of PHP, not the cgi-fcgi SAPI error in SSH?
Put this in your bash profile and run source ~/.bashrc As Composer is now available via WHM you can use this to find it: This returned path “/opt/cpanel/composer/bin/composer” for me. If this returns nothing then disregard the rest of this answer, as Composer is not available to you at system level. You can now use php-cli to…
-
Testing Configuration for Paytm Gateway Plugin India
Paytm Payment Gateway Testing Data Online payment solutions for all your transactions by Paytm Woocommerce Plugin Download the plugin here: https://github.com/Paytm-Payments/Paytm_Woocommerce_Kit Enable/Disable Enable/Disable Enable Paytm Payments. Title Title Paytm This controls the title which the user sees during checkout. Description Description The best payment gateway provider in India for e-payment through credit card, debit card…