Plugin Directory

Changeset 2693568


Ignore:
Timestamp:
03/14/2022 10:31:23 AM (4 years ago)
Author:
rider7991
Message:

instead of "global $woocommerce", WC()->cart->get_cart() function is used now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • share-that-cart/trunk/share-that-cart.php

    r2633997 r2693568  
    33Plugin Name:    Share That Cart
    44Description:    This plugin allows you to share your cart via link with others.
    5 Version:        1.2
     5Version:        1.3
    66Author:         Mateusz Styrna
    77Author URI:     https://mateusz-styrna.pl/
     
    3333
    3434function sc_button() {
    35     global $woocommerce;
    36     $items = $woocommerce->cart->get_cart();
     35    $items = WC()->cart->get_cart();
    3736    $link = wc_get_cart_url();
    3837    $ids = "";
Note: See TracChangeset for help on using the changeset viewer.