How to Prevent SQL injection in PHP 2017

SQL injection happens when you interpolate some content into a SQL query string, and the result modifies the syntax of your query in ways you didn’t intend. It doesn’t have to be malicious, it can be an accident. But accidental SQL injection is more likely to result in an error than in a vulnerability. The […]

[Woocommerce] How to Display Products from Specific Category

These code to show product with ‘shoe’ category. You can change ‘shoe’ with any category you want. ‘orderby’ => ‘rand’ mean show the product as random. orderby (string | array) – Sort retrieved posts by parameter. Defaults to ‘date (post_date)’. One or more options can be passed. ‘none’ – No order (available since Version 2.8). […]

[Woocommerce] How to Change Buy Product Button Text

Single Product Page add_filter( 'woocommerce_product_single_add_to_cart_text', 'wc_custom_cart_button_text' ); // Woocommerce 2.1 + function wc_custom_cart_button_text() { return __( 'Buy via AliExpress', 'woocommerce' ); } Archive Page add_filter( 'woocommerce_product_add_to_cart_text', 'wc_archive_custom_cart_button_text' ); // Woocommerce 2.1 + function wc_archive_custom_cart_button_text() { return __( 'Buy via AliExpress', 'woocommerce' ); }

[Woocommerce] How to Reorder Tab Position

function wc_reorder_tabs( $tabs ) { $tabs['reviews']['priority'] = 15; // Reviews third $tabs['description']['priority'] = 10; // Description second $tabs['additional_information']['priority'] = 5; // Additional information first return $tabs; } add_filter( 'woocommerce_product_tabs', 'wc_reorder_tabs', 99 );

Enabling/Installing FFmpeg Extension PHP From cPanel

FFmpeg is php extension used to manipulate videos files in PHP using the ffmpeg program. It provides classes for retrieving information from video and audio files like the duration, frame and sample rate, frame size. It can also extract individual frames from the videos and create GD image resources. It supports the all the video formats supported by ffmpeg […]

[SOLUTIONS] 500 Internal Server Error PHP

500 Internal Server Error is one of the common PHP errors that can put a PHP developer in panic mode. This article provides information on the most common causes. Why it become common PHP errors ? because you will found this error in WordPress, Prestashop, Codeigniter, Java, ASP.NET or whatever. 500 Internal Server Error is not a […]

[SOLUTIONS] 504 Gateway Timeout Nginx

504 Gateway Timeout error Nginx is generated often by a number of reasons on the backend connection that is serving content. This is pretty common error, are generated most probably by the PHP max execution time limit or by the FastCGI read timeout settings. Based on Wikipedia, 504 Gateway Timeout is the server was acting as […]

How to Hide Product Price WooCommerce

There is some method to hide product price in woocommerce, with filters, css or plugin. This is how to hide product price with CSS. Cart #cart > a > span.amount { display: none; } Sidebar div.deals-information > div.price{ display: none; } Individual Product div.widget.widget-products.products > div > div > div:nth-child(2) > div.col-md-4.col-sm-12.shopcol.last.wow.fadeInUp.product-wrapper > div > […]

Getting Ready for PHP 7

2015 has been an important year for PHP. Eleven years after its 5.0 release, a new major version is finally coming our way! PHP 7 is scheduled for release before the end of the year, bringing many new language features and an impressive performance boost. But how will this impact your current PHP codebase? What […]

admin

December 29, 2015

PHP

17 Comments

Read More