Questions tagged [notice]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
35 views

remove orphaned admin notices in backend?

after moving a wordpress site to another domain (and moved DB also) I have some orphaned empty admin notices in backend that are not longer dismissable. If I inspect them, it seems that they are ...
alex999's user avatar
  • 59
-2 votes
1 answer
36 views

WooCommerce intercept notice's data

In WooCommerce, is there a way to intercept notice's data array, particularly its key, after removing an item from the cart and do so in cart.php without employing a hook?
Greg Bialowas's user avatar
0 votes
0 answers
75 views

Targeting S+ (version 31 and above) "app keeps stopping"

I probably don't belong on these pages, as I am unlikely to understand most of the responses I get. The Developer who wrote this code has moved on and finding another one takes time. But I have ...
user3353300's user avatar
1 vote
1 answer
131 views

Change specific text notice in WooCommerce

I would like to change the alert which displays after a user adds a product which is no longer available for purchase on the website. The error currently shows: {product} has been removed from your ...
Matthew John Dougall's user avatar
1 vote
2 answers
273 views

How can I fix 'Trying to access array offset on value of type bool' error in my PHP code?

Notice: Trying to access array offset on value of type bool in I got this for each loop: foreach($ids as $id){ if (stripos($field['name'], 'label_') !== FALSE) { echo ''; } else{ ...
Dennis van Gageldonk's user avatar
1 vote
1 answer
111 views

What is the 'E' in `RAISE NOTICE E'msg %', mymsg`

What is the 'E' in RAISE NOTICE E'msg %', mymsg? I've seen it used in various Postgres tutorial pages, even in Postgres documentation itself, but I can't find an actual explanation of what it is or ...
Randall's user avatar
  • 2,877
0 votes
0 answers
50 views

Woocommerce cart notification depending on product categories

Hi I have 2 product categories A & B. When a product from category A is in the cart, but not B I'd like it to show a notice "dont forgot product from category B". B but not A, no notice ...
user21300793's user avatar
0 votes
1 answer
29 views

How to hide mulitple shown error notice in my cart?

In my shop https://buschenschank.morbus-schlatter.at/produktliste/ I use woocommerce, elementor and ajax add to cart. I just want to sell my bottles in total of six therefore I used this code in my ...
Selina Hagenauer's user avatar
0 votes
0 answers
71 views

wordpress get_plugin_data() is not returning the correct results in different file

I am having difficulty to gets the plugin date from its header. this is the structure of my plugin I even tried defining a constant in My_Plugin parent class define('MY_PLUGIN_BASENAME', __FILE__); -...
Muzammil Hussain's user avatar
2 votes
2 answers
505 views

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 ...
Cray's user avatar
  • 5,337
-1 votes
1 answer
233 views

Undefined variable, but it works for me. Debug Notice [duplicate]

I get a debug notice in Elementor Addon. Undefined variable $out, but it works for me. I can't figure out what I'm doing wrong. Guys, please help! Thanks a lot! NOTICE: Undefined variable: out on ...
WordPresser's user avatar
0 votes
1 answer
792 views

How to fix Trying to access array offset on value of type bool in

In PHP 7.4 i'm getting this notice: Trying to access array offset on value of type bool in if( $book_font ){ foreach ( $book_font as $key => $font ) { if ( in_array( $font['face'], $...
Spouter's user avatar
  • 11
-1 votes
1 answer
121 views

I need to show notice on wordpress Dashboard only

I am trying to make a notice on wordpress dashboard only. but when i paste this code in function.php notice show on all the pages like, Post , Authors , Pages everywhere. I just want only show on main ...
omer nadeem's user avatar
0 votes
1 answer
117 views

Flatsome and Angelleye

I'm trying to figure out how to move the Error messages from above the breadcrumbs on the Checkout page to just above the Billing form. I'm using the Angelleye Paypal Express Plugin with Flatsome. I'...
user3069367's user avatar
0 votes
0 answers
57 views

Message: Trying to get property 'id' of non-object

I am facing login error. The admin is able to login but when users try to login this error occurs. enter image description here My code looks like this $data = array( '_admin_id' ...
Rishabh Gupta's user avatar
3 votes
1 answer
2k views

Remove "Checkout is not available whilst your cart is empty." notice in WooCommerce

What code should I add to functions.php to remove "Checkout is not available whilst your cart is empty." notice in Woocommerce. I found the code in includes/wc-template-functions.php that is ...
vocus's user avatar
  • 61
0 votes
1 answer
40 views

Fix php Array to string converions

I am using a 2008 PHP program to take an image, annotate it and create a thumbnail of the image. The program works but throws a notice of an Array to String conversion. The relevant code is: $ttfont = ...
Bill's user avatar
  • 77
1 vote
1 answer
214 views

Add a free shipping notice based on WooCommerce product price

I'm trying to make a custom code for two situations (considering both simple & variable products) : 1 free shipping notice if the price is lower than 25 € 1 free shipping notice if the price is ...
gevcen's user avatar
  • 87
2 votes
1 answer
306 views

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 ...
Sam Jacka's user avatar
3 votes
1 answer
2k views

Display a Custom Message in Woocommerce Checkout page

This solution is based on Add an informative custom message in Woocommerce Checkout page I've created a custom message but not sure if the syntax is correct. It displays fine on the front end, but ...
Wanderlust Consulting's user avatar
1 vote
1 answer
1k views

WooCommerce notice: How re-trigger on address change?

Inspired by this answer code, I've write the code below which works to add an error notice in WooCommerce checkout under a condition (they add a non-shippable product, (id'd by shipping class) to the ...
Brad M's user avatar
  • 11
0 votes
0 answers
426 views

which file can i find the woocommerce Store notice code

Please can anyone help I want to edit the Function code for my Wordpress Woo Commerse Store Notice, but I'm having troble locating the function demo_store_filter($text) please could help me with the ...
Alex Randall's user avatar
0 votes
1 answer
230 views

Error notice in woocommerce email after update status in webhook

I'm writing a plugin for WooCommerce, everything is working fine but I'm getting a notice error in the emails when the update is being changed in the webhook, if I update the status in process payment ...
Fabian Fariñas's user avatar
2 votes
1 answer
2k views

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() { ...
Wouter Vonk's user avatar
-1 votes
2 answers
2k views

WordPress - "Notice: Undefined variable"

It seems like there are some PHP errors in my code where the index variable is not set. How could I fix it? Fill About.php <?php // Template Name: About ?> <?php get_header();?> <?...
Hans-Kristjan Pavelson's user avatar
1 vote
1 answer
725 views

Remove or hide "wc_add_notice" messages in WooCommerce

I am using this to remove the "Cart is updated" message in WooCommerce: add_filter( 'woocommerce_add_message', '__return_false'); But the "Shipping costs updated" message is still ...
Lotus's user avatar
  • 139
0 votes
2 answers
1k views

Woocommerce: add text before add-to-cart only on specific single product pages

I found the following code in order to display text before the add-to-cart-button on a single product page: // adds notice at single product page above add to cart add_action( '...
seeker68's user avatar
0 votes
1 answer
528 views

"Notice: Trying to access array offset on value of type null" being returned when username is entered wrong

I am trying to create a login page, and everything works as expected, except for when a wrong username is entered, I get the error Notice: Trying to access array offset on value of type null for the ...
user avatar
-1 votes
1 answer
6k views

notice trying to access array offset on value of type null wordpress plugins

i must update my website to the last version of php 7.4 after that i find this notice in some plugins **> Notice: Trying to access array offset on value of type null in C:\projets\htdocs\mapsport\...
hassanii's user avatar
1 vote
1 answer
5k views

Display a success custom notice after Placing an Order in WooCommerce

I need to check on the checkout page whether payment has been successful or not and display the message: 'Your payment has been successful', and then redirect to the thank you page (which is ...
andres sanchez's user avatar
0 votes
2 answers
249 views

Undefined offset when using bubble sort on associative array

I have this function to bubblesort an associative array based on a key input with the option to order by descending or ascending: function bubbleSort($input, $key, $order){ while (true){ $...
Justice 雨's user avatar
-1 votes
1 answer
905 views

otice: Trying to access array offset on value of type null in H:\xampp\htdocs\ecommerce\app\libraries\Core.php on line 15 [duplicate]

<?php /* * App Core Class * Creates URL & loads core controller * URL FORMAT - /controller/method/params */ class Core { protected $currentController = 'Pages'; protected ...
Shahin Reza's user avatar
1 vote
2 answers
2k views

Display a notice in cart page if specific products are in WooCommerce cart

how can we make this function below to check multiple product ids instead of just one id, how can we convert it to array ? add_action( 'woocommerce_before_cart', 'bbloomer_find_product_in_cart' ); ...
Maged Mohamed's user avatar
1 vote
1 answer
727 views

Add a link to WooCommerce cart notices without changing the default style sheet

I'm trying to hyperlink text on a WooCommerce custom cart notice. But when I add the following bit of code it uses the default style sheet to display the link as a button on the far right. I just want ...
Wanderlust Consulting's user avatar
0 votes
2 answers
756 views

How to stop PHP notice: Undefined index | array_map | return

I always get a PHP notice in my error log because of a little language function I am using. Somehow I can't get it right... My languages array looks like this (EDITED): $dict = [ 'title' =&...
Timo's user avatar
  • 115
0 votes
1 answer
122 views

Cart Message for a Specific Shipping Class in WooCommerce Based on Number of Cart Items

This is adapted from Cart Message for a Specific Shipping Class in WooCommerce answer and Show or hide shipping methods based on number of cart items for specific shipping class answer. This is my ...
Wanderlust Consulting's user avatar
1 vote
1 answer
1k views

Cart Message for a Specific Shipping Class in WooCommerce

I'm trying to add a cart message for a specific shipping class. Adapted from Cart Message for a specific shipping class and a minimal cart total in Woocommerce answer, this is my code attempt: ...
Wanderlust Consulting's user avatar
0 votes
0 answers
16 views

Notice: Undefined index userkullanici [duplicate]

i tried so many solution but its not work can anybody help me ? $kullanicisor=$db->prepare("SELECT * FROM kullanici where kullanici_mail=:mail"); $kullanicisor->execute(array( '...
Tarek Dawalibi's user avatar
0 votes
0 answers
105 views

How to get Notice / Warning as object in PHP?

I'm using PHP 7.3. I'm curious if it is possible to get PHP's Notice or Warning as an object (raised by PHP itself and not by user)? I would appreciate any examples including PHP manual references or ...
Awaaaaarghhh's user avatar
-2 votes
1 answer
2k views

Notice: Undefined index $_POST method

I have a php simple project. The project is to create an email submission page. I use phpstorm software. <?php //get user input $name = $_POST["name"]; $email = $...
mohammad erfan's user avatar
-1 votes
1 answer
672 views

Notice "undefined index", but this continued to work until I completed the code

Firstly i added text view with notice(and some warning too) about my problem. Notice: Undefined index: first_name in C:\my_projects\phplearn\www\ch07\create_user.php on line 17 Notice: Undefined ...
Иван Грицай's user avatar
0 votes
1 answer
44 views

Handling a Undefined offset error when results are 9

How would I handle and Undefined offset 0 error in the situation below? From what I have read the error means no results are being found Notice: Undefined offset: 0 in function style_tag($input) { ...
acctman's user avatar
  • 4,261
0 votes
0 answers
22 views

Undefined offset 2 and 3 notice in php [duplicate]

Notice at last line of code and I tried preg_split(":\",$fline) instead of split in but still I can see same notice <?php $file = fopen("employees.txt","r"); $under_40=0; $salary_sum=0; ...
Aishwarya's user avatar
0 votes
0 answers
213 views

Woocommerce -- How do I edit the position of notices on my account page?

My problem is when I click Save Address, the success message ruins everything. I want to edit the position of the success message. How can I do this?
Abdel Rahman Kamhawy's user avatar
1 vote
1 answer
233 views

Wordpress: Change message given when deleting post from custom post type

So I have a custom post type called members. linked with advanced custom fields. I've made it so if I delete a member from the custom post type it doesn't move to the trash and permanently deletes it. ...
Asta's user avatar
  • 121
1 vote
1 answer
82 views

PHP loop throwing notice, which seems to be a constant error

$features[] = array("Feature 1", "Feature 2", "Feature 3", "Feature 4") for ($i=0; $i <4 ; $i++) { echo '<li class="list-group-item text-centre">'. $features[i] . '</li>'; I am ...
beginner115's user avatar
1 vote
3 answers
3k views

Wordpress issue,after update

After wordpress is updated automaticlly i received an error in email with this error messages Error Details ============= An error of type E_ERROR was caused in line 369 of the file /home/...
xSupport's user avatar
1 vote
1 answer
838 views

Everything works but i have : Notice: Uninitialized string offset,

I need your help because my code works, it do what i exepcted but i have this : Notice: Uninitialized string offset. But i have no idea of how change that to make the notice disappear. If someone can ...
Nathan FUMAROLI's user avatar
-1 votes
2 answers
913 views

Notice: id is called in the wrong way. The properties of the product should not be directly accessible

Notice: id est appelée de la mauvaise manière. Les propriétés du produit ne doivent pas être accessible directement. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader....
sa1995's user avatar
  • 1
0 votes
1 answer
1k views

Notice: Undefined index product_name

I have this code and I can't understand why I still have this ERROR, I've tried all the solutions but I can't solve this problem: -Notice: Undefined index: product_price -Notice: Undefined index: ...
Razvan Andrei's user avatar

1
2 3 4 5 6