Automattic\WooCommerce\Internal\Admin\Notes
WooSubscriptionsNotes::delete_any_note_for_product_id()
Deletes a note for a given product ID, if the note exists at all.
Method of the class: WooSubscriptionsNotes{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WooSubscriptionsNotes = new WooSubscriptionsNotes(); $WooSubscriptionsNotes->delete_any_note_for_product_id( $product_id );
- $product_id(int) (required)
- The product ID to search for.
WooSubscriptionsNotes::delete_any_note_for_product_id() WooSubscriptionsNotes::delete any note for product id code WC 9.5.1
public function delete_any_note_for_product_id( $product_id ) { $product_id = intval( $product_id ); $note = $this->find_note_for_product_id( $product_id ); if ( $note ) { $note->delete(); } }