← All changes
|
admin/setup-wizard/class-convertkit-admin-setup-wizard-restrict-content.php
+6
-1
3.4.2
→
3.4.5
View file →
| @@ -250,9 +250,9 @@ | ||
| 250 | 250 | // This shouldn't happen, because the 'Add New Member Content' button is only displayed |
| 251 | 251 | // if valid credentials have been specified. |
| 252 | 252 | $settings = new ConvertKit_Settings(); |
| 253 | 253 | if ( ! $settings->has_access_and_refresh_token() ) { |
| 254 | - wp_die( esc_html__( 'Connect your ConvertKit account in the ConvertKit Plugin\'s settings to get started', 'convertkit' ) ); | |
| 254 | + wp_die( esc_html__( 'Connect your Kit account in the Kit Plugin\'s settings to get started', 'convertkit' ) ); | |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | // Set and authorize the Post Type. |
| 258 | 258 | $this->set_post_type(); |
| @@ -567,8 +567,13 @@ | ||
| 567 | 567 | 'form' => '0', // Don't display a Form. |
| 568 | 568 | 'restrict_content' => ( $restrict_content_setting !== false ? $restrict_content_setting : '0' ), |
| 569 | 569 | ) |
| 570 | 570 | ); |
| 571 | + | |
| 572 | + // Update whether Restrict Content is enabled, as the wp_insert_post hook ran before the Page's settings were saved. | |
| 573 | + if ( $restrict_content_setting !== false ) { | |
| 574 | + WP_ConvertKit()->get_class( 'admin_restrict_content' )->update_restrict_content_enabled(); | |
| 575 | + } | |
| 571 | 576 | |
| 572 | 577 | // Return. |
| 573 | 578 | return $page_id; |
| 574 | 579 | |