Title: Widget throws php error
Last modified: March 31, 2021

---

# Widget throws php error

 *  Resolved [ideaware](https://wordpress.org/support/users/ideaware/)
 * (@ideaware)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/widget-throws-php-error/)
 * Hello,
    Shortcode doesn’t work at all. When I try to use a widget, it shows:
 * Warning: Undefined array key “content” in C:\xampp\htdocs\hih1\wp-content\plugins\
   amount-left-free-shipping-woocommerce\includes\class-alg-wc-widget-alfs.php on
   line 43
 * I’m using Elementor Pro with Hello theme.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Zohaib](https://wordpress.org/support/users/zohaibayub85/)
 * (@zohaibayub85)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/widget-throws-php-error/#post-14260483)
 * Hi,
 * We have tested the shortcode thoroughly on various WordPress installations and
   can confirm it is working. I would have requested for access to your WordPress
   dashboard if you had a live site to find out more about the error, but I see 
   you are using a local installation.
 * I would like to suggest please make sure you are using the latest version of 
   the plugin.
 *  [Zohaib](https://wordpress.org/support/users/zohaibayub85/)
 * (@zohaibayub85)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/widget-throws-php-error/#post-14291231)
 * Hi,
 * Could you also try adding the content attribute to the shortcode.
 * [alg_wc_left_to_free_shipping content=”%amount_left_for_free_shipping% left for
   free shipping”]
 * Please let me know if this works or if you need further assistance with this.
 *  [Zohaib](https://wordpress.org/support/users/zohaibayub85/)
 * (@zohaibayub85)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/widget-throws-php-error/#post-14292460)
 * `[alg_wc_left_to_free_shipping content="%amount_left_for_free_shipping% left 
   for free shipping"]`
    -  This reply was modified 5 years, 1 month ago by [Zohaib](https://wordpress.org/support/users/zohaibayub85/).
    -  This reply was modified 5 years, 1 month ago by [Zohaib](https://wordpress.org/support/users/zohaibayub85/).
 *  [Zohaib](https://wordpress.org/support/users/zohaibayub85/)
 * (@zohaibayub85)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/widget-throws-php-error/#post-14309485)
 * Hi,
 * I had forgotten to add code tags. Here is the right code below
 * `[alg_wc_left_to_free_shipping content="%amount_left_for_free_shipping% left 
   for free shipping"]`
 *  Plugin Author [WPFactory](https://wordpress.org/support/users/wpcodefactory/)
 * (@wpcodefactory)
 * [5 years ago](https://wordpress.org/support/topic/widget-throws-php-error/#post-14422619)
 * I’m closing the ticket.
    If you notice something else let me know 😉

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Widget throws php error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/amount-left-free-shipping-woocommerce_bfd7ef.
   svg)
 * [Free Shipping Bar: Amount Left for Free Shipping for WooCommerce](https://wordpress.org/plugins/amount-left-free-shipping-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amount-left-free-shipping-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amount-left-free-shipping-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/amount-left-free-shipping-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amount-left-free-shipping-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amount-left-free-shipping-woocommerce/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [WPFactory](https://wordpress.org/support/users/wpcodefactory/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/widget-throws-php-error/#post-14422619)
 * Status: resolved