• Hi, thank you for this plugin! I am a bit novice about coding, and I would love to add more to the pat message “Please checkout within…” shown when someone adds a limited item to cart. I did find it in the plugin files I am just unsure how to add more text, and then not have it overwritten when plugin is updated. Appreciate any direction to you can send me!

Viewing 1 replies (of 1 total)
  • Plugin Author James Golovich

    (@jamesgol)

    You can use the ‘wc_csr_expiring_cart_notice’ WordPress filter to adjust this text.

    In your theme functions.php (or elsewhere) you can add something like:

    
    add_filter( 'wc_csr_expiring_cart_notice', 'mickif_expiring_cart_notice', 10, 4 );
    function mickif_expiring_cart_notice( $expire_notice_text, $item_expire_span, $expire_soonest, $num_expiring_items ) {
      $expire_notice_text = sprintf( _n( 'Please checkout within %s to guarantee your item does not expire.', 'Please checkout within %s to guarantee your items do not expire.', $num_expiring_items, 'woocommerce-cart-stock-reducer' ), $item_expire_span );
      return $expire_notice_text;
    }
    

    Adding that will produce the exact same output it currently does but you can adjust the text inside. It’s important to make sure the $item_expire_span text gets included or else the countdown will not work.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding text to message’ is closed to new replies.