on( 'bigcommerce_account_page_id' ) ); $login_urls = $this->exclude_page( get_option( 'bigcommerce_login_page_id' ) ); $address_urls = $this->exclude_page( get_option( 'bigcommerce_address_page_id' ) ); $orders_urls = $this->exclude_page( get_option( 'bigcommerce_orders_page_id' ) ); return array_merge( $urls, $checkout_urls, $cart_urls, $account_urls, $login_urls, $address_urls, $orders_urls ); } /** * Excludes BigCommerce checkout page from cache * * @since 3.3.7 * @author Remy Perona * * @param int $page_id ID of page to exclude. * @param string $post_type Post type of the page. * @param string $pattern Pattern to use for the exclusion. * @return array */ private function exclude_page( $page_id, $post_type = 'page', $pattern = '' ) { $urls = []; if ( ! $page_id ) { return $urls; } if ( $page_id <= 0 || (int) get_option( 'page_on_front' ) === $page_id ) { return $urls; } if ( 'publish' !== get_post_status( $page_id ) ) { return $urls; } $urls = get_rocket_i18n_translated_post_urls( $page_id, $post_type, $pattern ); return $urls; } }