Payments_Tab::is_page_created( string $shortcode_name )
Check if the provided page was created.
Contents
Parameters
- $shortcode_name
-
(string) (Required) Shortcode name that was inserted in page content.
Return
(bool)
Source
File: src/Tickets/Commerce/Payments_Tab.php
public function is_page_created( $shortcode_name ) {
$args = [
'post_type' => 'page',
'meta_key' => static::$option_page_created_meta_key,
'meta_value' => $shortcode_name,
];
$query = new \WP_Query( $args );
return (bool) $query->post_count;
}
Changelog
| Version | Description |
|---|---|
| 5.2.1 | Introduced. |