Return Child Site Admin Notices

Check what Admin Notices are being displayed on the selected Child Site.

Snippet Type

Return info from Child Sites


do_action( 'admin_notices' );

This is great and I can see would be very useful, I’m missing something obvious but what would it be for messages like this?

@cad861 Exactly. That or Woocommerce DB updates or other notifications that are not shown within the MainWP Activity Log Extensions scope.

If it’s not obvious - this is just a proof of concept and may be expanded however you like.

1 Like

Thanks Keith

That was to say, do you have any further examples. I have tweaked a but but not pulling back this notice. I’ll keep playing and understand this is a proof of concept.

@cad861 Ok I figured it out! You have to target Woo notifications by referencing their methods instead. Basically there isn’t a "catch all - or i haven’t found one yet. You will have to notice a “notification” that doesn’t get picked up by “Admin_Notices” and then add it to your list.

Here is the class that contains all of the WC Admin Notices. WooCommerce Code Reference

ob_start/clean() converts the output into a string. Simply wrapp the call arround the WC_Class::method()



This is great exactly what I was after thank you. I will have a good read but really appreciate this.

1 Like

The database update not clearing is still an open bug in WooCommerce 5.7.0 and 5.7.1.

1 Like

@sebastian-moran Ah that’s good to know there is a bug. I was wondering why it wasn’t clearing.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.