How to update WordPress plugins properly using git?

No it’s fine, lots of hosts depend on plugins being stored in git this way and it isn’t an issue. You can replicate the process by manually updating a file locally to test. Plugin authors tend to store a database version field, and update if it’s mismatched, or they rely on functions such as dbdelta … Read more

index.php file keeps redirecting to a non-existent index.html file?

“Redirect” from index.php to index.html might be caused by your apache settings. If you have index.html before index.php in your apache config file and you have both of these files in your folder, it will go for the index.html. Try to add this to your .htaccess file (index.php preferred over index.html) DirectoryIndex index.php index.html or … Read more

Display Random Posts with thumbnail instead of just a title of the post

You can get the post thumbnail HTML using the function get_the_post_thumbnail(), so you just need to replace get_the_title() with that function: $string .= ‘<li><a href=”‘. get_permalink() .'”>’. get_the_post_thumbnail() .’ </a></li>’; By default the image will be the size defined by your theme, but you use any of the other available sizes by passing the size … Read more

Return custom product in ajax call loop

Yes, you can query products by their ids and display them as ajax response. You code just needs a little revision. Perhaps you could try something along these lines, public function display_search_result(){ $skus = urldecode($_POST[‘sku_universel’]); $skus = explode(‘,’,$sku); $product_ids = array(); // you can use native woocommerce function to get the product ids foreach($skus as … Read more

Rewrite nested urls for custom post type

I find a solution thank you to the plugin: Monkeyman Rewrite Rule With this plugin I find when the rule failed, then I corrected it with these lines of code: add_action( ‘init’, ‘ab_category_rewrite_rules’ ); function ab_category_rewrite_rules() { add_rewrite_tag( ‘%category%’, ‘([^/]+)’, ‘category=’ ); add_permastruct( ‘category’, ‘/catalogs/%catalog%/%category%’, false ); add_rewrite_rule( ‘^category/([^/]+)/([^/]+)/?$’, ‘index.php?category=$matches[2]’, ‘top’ ); } add_action( ‘init’, … Read more