| @@ -1,25 +1,14 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Outputs success / error notices in the restrict content call to action. | |
| 3 | + * Outputs error notices in the restrict content call to action. | |
| 4 | 4 | * |
| 5 | 5 | * @package ConvertKit |
| 6 | 6 | * @author ConvertKit |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -// If a success message exists, show it now. | |
| 10 | -if ( $success !== false ) { | |
| 11 | - ?> | |
| 12 | - <div class="convertkit-restrict-content-notice convertkit-restrict-content-notice-success"> | |
| 13 | - <?php echo esc_html( $success ); ?> | |
| 14 | - </div> | |
| 15 | - <?php | |
| 16 | -} | |
| 17 | - | |
| 18 | 9 | // If an error occured, show it now. |
| 19 | -if ( is_wp_error( $error ) ) { | |
| 10 | +if ( is_wp_error( WP_ConvertKit()->get_class( 'output_restrict_content' )->error ) ) { | |
| 20 | 11 | ?> |
| 21 | - <div class="convertkit-restrict-content-notice convertkit-restrict-content-notice-error"> | |
| 22 | - <?php echo esc_html( $error->get_error_message() ); ?> | |
| 23 | - </div> | |
| 12 | + <div class="convertkit-restrict-content-notice convertkit-restrict-content-notice-error"><?php echo esc_html( WP_ConvertKit()->get_class( 'output_restrict_content' )->error->get_error_message() ); ?></div> | |
| 24 | 13 | <?php |
| 25 | 14 | } |