woocommerce pending payment

In the stage of processing orders, there are many order statuses such as woocommerce pending payment,processing, on hold, completed, canceled,returned,failed.In the scope of this article, we will focus on the pending status of the orders, how it works as well as the method to process it.

Woocommerce is one of the plugins after combining with WordPress becoming the source code which has the biggest market share. Till now, there are 49,226,906 download times which account for 28% of download times of all the online stores.

Come back to the order management issue, woocommerce pending payment often occurs when you incorrectly configure the payment or in case of using manual payment method such as COD, bank transfer. Because these payment methods do not include notifications as well as return any information to the web, the system cannot automatically change the order status.

With these manual payment methods, it requires manual management operations. After receiving payments from the banks or COD staff, the shop owners will change the order status manually. Then you will deliver goods to your customers if they are physical goods such as clothes, books, equipment, toys, etc. Or the system will send files to the customers or allow them to download files if they are digital products.

You follow the guidance on how to change the order status. You click on Status item and select the orders in Pending payment method to switch to another status.

woocommerce pending payment

Through the article woocommerce pending payment, we see that no matter how modern your stores are, you should be flexible to serve different customers by manually operating as the case above. Therefore, you should prepare professional order edit tool to reduce the time and labor cost. If you use Prestashop, I recommend that you should use Order edit module. You can get access to this link ( https://addons.prestashop.com/en/order-management/23748-order-edit.html ) to try the demo before applying it to your project.

 

woocommerce get product type

Products in  woocommerce   are divided into many different types in order to distinguish among them. Depending on the using purpose, product types are applied to search or filter product. If you are importing lots of products in woocommerce, you should pay attention to product type field. This article helps you know which type of the product you are viewing is. It looks at how woocommerce get product type.

Common product types

  • Simple: This type includes popular products without options, for example, a pen or a book
  • Group: This includes products in a set which can be bought separately. It just includes simple products, for example, a set of six glasses.
  • Virtual: It is the product type that does not require delivery or download. For example, services.
  • Download: These products also do not require delivery. They are downloaded to computers or other devices. They often are copyright music videos, press publications, etc.
  • External or Affiliate: These products are described but not sold on the website. People who work in Affiliate often use this type.
  • Variable: The product type includes lots of options and variables. For example, an L-blue t-shirt is a variable while an M-red t-shirt is another variable.

Display products

If you want to display products in the product detail page, you use hook woocommerce_single_product_summary

Therefore we write the function get_product_type to display,

The function to display information for groups is performed as below. You can add this content to the line containing echo code;

 
functionget_product_type() {
global $post;
if(function_exists('get_product') ){
$product = get_product( $post->ID );
if( $product->is_type( 'variable' ) ){
echo 'Product type is variable'  ;                }
if( $product->is_type( 'group' ) ){
echo 'Product type is Group  ;                }
if( $product->is_type( 'Virtual' ) ){
echo 'Product type is Virtual  ;
}
if( $product->is_type( 'download' ) ){
echo 'Product type is Download  ;                }
}
}

In order that this function works in hook woocommerce_single_product_summary, we add the following syntax to the function file

add_action( 'woocommerce_single_product_summary', 'get_product_type',  5 );

Now we get to check the result. Here is the result.

Depending on the using purpose, we can display it in collection to filter product by type.

We have solved the issue related to woocommerce get product type. If you have any question, please contact us or leave a message in the comment. We are willing to support you for free.

Enjoy this blog? Please spread the word :)