LLMS_Post_Relationships::delete_product_with_active_subscriptions_error_message( int $post_id )
Returns the error message to display when deleting a product with active subscriptions.
Parameters Parameters
- $post_id
-
(int) (Required) The WP_Post ID of the product.
Return Return
(string)
Source Source
File: includes/class.llms.post.relationships.php
public static function delete_product_with_active_subscriptions_error_message( $post_id ) { $post_type = get_post_type( $post_id ); if ( ! in_array( $post_type, array( 'course', 'llms_membership' ), true ) ) { return ''; } $post_type_object = get_post_type_object( $post_type ); $post_type_name = $post_type_object->labels->name; return sprintf( // Translators: %s = The post type plural name. __( 'Sorry, you are not allowed to delete %s with active subscriptions.', 'lifterlms' ), $post_type_name ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.4.0 | Introduced. |