Automattic\WooCommerce\Internal\PushNotifications\Notifications
Notification::__construct
Creates a new Notification instance.
Method of the class: Notification{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Notification = new Notification(); $Notification->__construct( $resource_id );
- $resource_id(int) (required)
- The resource ID.
Changelog
| Since 10.7.0 | Introduced. |
Notification::__construct() Notification:: construct code WC 10.8.1
public function __construct( int $resource_id ) {
if ( $resource_id <= 0 ) {
throw new InvalidArgumentException( 'Notification resource_id must be positive.' );
}
$this->resource_id = $resource_id;
}