Questions tagged [notice]

293 questions
3
votes
1 answer

Customize cart item removed notice in Woocommerce 3

I am using the WooCommerce 3.4.4 version and I am trying to edit the notice message when you press the "X" button to remove the product from the cart page. Currently the notice is "" removed. Undo? I want to remove the quotations and…
user2515606
  • 182
  • 4
  • 13
3
votes
2 answers

PHP - Is there a way to get a variable value if it is set?

I always find myself writing something like: if(isset($var)) { DoSomethingWith($var); } else { DoSomethingWith(null); } or if(isset($arr["key"])) { DoSomethingWith($arr["key"]; } else { DoSomethingWith(null); } My question is…
J. Brown
  • 124
  • 7
3
votes
4 answers

Notice: Array to string conversion - Why?

Hi im trying to execute the following PHP code, however im receiving an error. Im passing a reference into the core class, which i want to assign to a variable within the classes scope.. Notice: Array to string conversion Thanks in advance.. $core…
Lee
  • 5,816
  • 6
  • 45
  • 61
3
votes
2 answers

Netezza, how to RAISE NOTICE with current time

Im trying to debug Netezza procedure using RAISE NOTICE after UPDATE AND INSERT queries. Im trying to show the current time after each query is finished. I tried something like this: RAISE NOTICE 'UPDATE time=%', now(); But that doesn't work. Only…
hidross
  • 123
  • 3
  • 16
3
votes
1 answer

How to fix Notice: Only variable references should be returned by reference in

i am using php script got from torrenteditor to create torrent files , but when i create new torrent files, using specified method, torrent files gets created but i get lots of notices ., like this Only variable references should be returned by…
user1642018
3
votes
4 answers

PHP: Undefined offset

On some pages, i receive the error: PHP Notice: Undefined offset: 1 in /var/www/example.com/includes/head.php on line 23 Here is the code: if ($r) { list($r1, $r2)=explode(" ", $r[0],2); $r1 = mb_strtolower($r1); $r3 = " "; $r2…
n1k1c4
  • 53
  • 1
  • 2
  • 6
3
votes
1 answer

How to make notices pop up as jquery on Ruby on Rails 4

I have a user controller with the following code. # POST /users def create @user = User.new(user_params) if @user.save redirect_to '/', notice: 'Thank you for signing up for Beta.' else redirect_to '/', notice: 'That was…
LMo
  • 1,429
  • 2
  • 15
  • 32
3
votes
5 answers

Turn off notices in cakePHP

I am new with cakePHP. I facing issue with notice on live server. I want to suppress or turn off these notices. I have tried adding, error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING ^ E_DEPRECATED); in the index.php file in main folder. Also added same…
Rohit Londhe
  • 49
  • 1
  • 1
  • 5
2
votes
4 answers

Growl like notifications in Flex

Has anyone heard of a library to achieve such an effect in flex apps ? Otherwise it just be a simple panel with some skinning, fading effect and a timer.
coulix
  • 3,328
  • 6
  • 55
  • 81
2
votes
2 answers

WooCommerce: Add class to notice

I want to add an extra class to my WooCommerce notice. Here's my current code for printing the notice: wc_print_notice( 'My message', 'success' ); I saw in the WooCommerce Docs, that there is an option to add extra $data to the notice. But…
Cray
  • 5,307
  • 11
  • 70
  • 166
2
votes
1 answer

How do insert/execute a shortcode within a wc_add_notice box?

I'm trying to add a shortcode into a wc_add_notice box. Please can someone show me how to do this, or indicate an alternative route which suits the usage. Below is two pieces of code, one is the notice box, the other is an echo with the shortcode…
Sam Jacka
  • 23
  • 5
2
votes
1 answer

Show custom message in WooCommerce checkout based on shipping country

I'm currently using the code below to show a custom message based on country: add_action( 'woocommerce_before_checkout_billing_form', 'display_shipping_notice' ); function display_shipping_notice() { echo '
2
votes
1 answer

notice php - alternative or remove?

i am using this code to check if the variables $n0, $n1, $n2 are not defined. But i get a notice each time that was not defined. My code is a bad practice? there is any alternative? or just remove the notices and the code is fine? if…
user455318
  • 3,280
  • 12
  • 41
  • 66
2
votes
0 answers

Sage Woocommerce - Trying to get property of non-object (get_current_screen()->id)

I'm not quite sure about when this exactly occurs since it only happens on the live server and not locally. But every now and then (few times per minute) i get a PHP notice in my debug.log. The PHP notice is: Trying to get property of non-object in…
jandje
  • 21
  • 3
2
votes
1 answer

Different Messages Based on WooCommerce Page

I am trying to alter messages displayed when adding an a product to cart and/ or updating the cart by hooking in to the woocommerce_add_message. It's not showing anything at all and I'm wondering why. I've tried echo and I've tried return__( Here's…
user10955359
1 2
3
19 20