Woocommerce Gift Wrapper by Product plugin allows put in your product page differents gift wrappers available to the customers. They will be able to choose a one and write a message on the gift tag.

Indice

  • Requirements
  • How does it work?
  • Settings Page
  • Designs Available
  • Add Gift Wrappers
  • FAQ
  • Filters

 

Requirements

  • PHP 5.6 or higher
  • Woocommerce last version

 

How does it work?

The gift wrappers will appears on your product page and the customers can choose different gift wrapper to differentes products in a cart.

This works with simple product and variable product.

If the customer choose a gift wrapper with price greater to 0, it will add to product price when you add to cart.

 

Settings Page

Go to : Woocommerce Settings > Products > Gift Wrapper

  1. Position: it is the place where the gift wrappers available will appear. If you choose “Manually”, you must put it through a PHP function.
  2. Text Link: you can change the link text typing in this input.
  3. Gift Tags: if checked, a textarea will appear and the customer be able of leave a message to the gift.
  4. Character Limit: is the character limit while the customer is leaving a message

 

Designs available

 

Add Gift Wrappers

Go to: Woocommerce > Gift Wrappers

You can add many gift wrappers and filter them. The price es optional, if you put 0, on the front will appear the label FREE!

 

 

FAQ

First, you must know the gift wrappers can be in any place of the product page, don’t on another page.

At the settings page, you must select the position option in Manually.

 

You can put it using a PHP function and a Woocommerce hook.  Here some examples (remember that you must use only one) :

[pastacode lang=”php” manual=”%3C%3Fphp%0A%0A%2F%2F%20above%20the%20title%0Aadd_action(‘woocommerce_single_product_summary’%2C%20’giftwrapper_print’%2C%201)%3B%0A%0A%2F%2F%20below%20the%20title%0Aadd_action(‘woocommerce_single_product_summary’%2C%20’giftwrapper_print’%2C%206)%3B%0A%0A%2F%2F%20above%20the%20description%0Aadd_action(%20’woocommerce_after_single_product_summary’%2C%20’giftwrapper_print’%2C%205%20)%3B%0A%0A%2F%2F%20below%20of%20the%20image%20principal%0Aadd_action(%20’woocommerce_before_single_product_summary’%2C%20’giftwrapper_print’%2C%2025%20)%3B%0A” message=”Gift Wrapper” highlight=”” provider=”manual”/]

Go to : Woocommerce Settings > Products > Gift Wrapper

Yes. You can use [giftwrapper] but remember that it only can be used on the product page

Filters

1. Change the label FREE by other

[pastacode lang=”php” manual=”%3C%3Fphp%0A%0Afunction%20letsgodev_change_label_free(%20%24items%20%3D%20%5B%5D)%20%7B%0A%0A%09%24aux%20%3D%20%24items%3B%0A%0A%09foreach(%20%24aux%20as%20%24aux_id%20%3D%3E%20%24aux_data%20)%20%7B%0A%09%09if(%20isset(%20%24aux_data%5B’price’%5D%20)%20%26%26%20%24aux_data%5B’price’%5D%20%3D%3D%200%20)%0A%09%09%09%24items%5B%24aux_id%5D%5B’price_html’%5D%20%3D%20’MY%20NEW%20LABEL’%3B%0A%09%7D%0A%0A%09return%20%24items%3B%0A%7D%0A%0Aadd_filter(%20’giftwrapper%2Fprint_gifts%2Fget’%2C%20’letsgodev_change_label_free’%2C%2010%2C%201)%3B%0A” message=”Change label Free” highlight=”” provider=”manual”/]