Checkout::page_has_shortcode()
Determines whether or not the success page has the appropriate shortcode in the content.
Return
(bool)
Source
File: src/Tickets/Commerce/Checkout.php
public function page_has_shortcode() {
if ( ! $this->is_option_set() ) {
return false;
}
$page = get_post( $this->get_page_id() );
if ( ! $page instanceof \WP_Post ) {
return false;
}
$shortcode = Shortcodes\Checkout_Shortcode::get_wp_slug();
return has_shortcode( $page->post_content, $shortcode );
}
Changelog
| Version | Description |
|---|---|
| 5.2.0 | Introduced. |