Thursday, February 28, 2019

WooCommerce Order Cancelled After Successful Payment: Unpaid Order Cancelled – Time Limit Reached

After upgrading to WooCommerce 2.0 and Above, you have experienced the issue  that all the purchased order changes to the “canceled” status. 
In the admin area, all the orders appear as “canceled”  with the message “Unpaid order canceled – time limit reached“. When this happens, you need manually change the statuses of all the canceled orders.
The problem arises due to the Hold Stock feature in WooCommerce Inventory management. In this feature, you can set a certain period of time to hold the stock for an unpaid order.
To Resolve the issue, Go to the admin side of your WordPress store, and navigate to
 WooCommerce > Settings > Products > Inventory.
From this page, you can see that the Hold Stock field is set to 60 minutes by default. If you are using WooCommerce stock management, you can disable this feature by leaving the field blank. Simply delete the value in the field and then save the changes.



Tuesday, February 26, 2019

Sql Server - Create a copy of database and Renaming it

Steps to attach a database with different name:

  1. Detach database from local PC
  2. Copy the mdf and ldf files and rename them.
  3. Copy\Move the files to the server directory where the original Database is stored.
  4. Use the below code
USE [master]
GO
CREATE DATABASE [example_db] ON ( FILENAME = N'D:\Data\example_db.mdf' ),
( FILENAME = N'E:\Logs\example_db_log.ldf' )FOR ATTACH
GO


you can also copy by using the Sql-server Management studio:

  • go to database and tasks->Copy Database
  • Select the source and destination server (same if you wants to make a copy on the same server)
  • change the destination database name to required.
  • Done

Friday, February 15, 2019

Wordpress - How to revert to classic editor / old editor?

How to revert to classic editor / old editor?

if you wants to move back to the old Classic Editor By WordPress Contributors, please install the Plugin
https://wordpress.org/plugins/classic-editor/

Classic Editor is an official plugin maintained by the WordPress team that restores the previous (“classic”) WordPress editor and the “Edit Post” screen. It makes it possible to use plugins that extend that screen, add old-style meta boxes, or otherwise depend on the previous editor.


This plugin also gives you an option to keep both Gutenberg and the Classic editor at the same time. You can configure this in the plugin’s settings.

Simply go to the Settings » Writing page in your WordPress admin area. You will see the option to do this under “Classic editor settings”.
Classic editor settings

Don’t forget to click on the save changes button to store your settings.

You will now be able to see a new link under the Posts menu to create new posts using the classic editor.
Switch to classic editor

You will also be able to edit older articles using the classic editor. Simply go to Posts » All Posts page and you’ll see a ‘Edit (Classic)’ link below posts.
Edit classic