How to update global variables in plugin activation callback?

Thanks to @Tom J Nowell’s help, I fixed my code to persist the created page ID to Options: function install_xxx() { $post = array( ‘post_title’ => __( ‘Thank You’, ‘xxx’ ), ‘post_content’ => __( ‘Lorem ipsum dolor.’, ‘xxx’ ), ‘post_status’ => ‘publish’, ‘post_name’ => ‘thank-you’, ‘post_type’ => ‘page’ ); $post_id = wp_insert_post( $post, true ); … Read more

Dequeue styles with query doesn’t work

Thank you very much @Tom J Nowell and @Sally CJ . As you pointed out, it worked with the below: function remove_inline_style(){ if ( is_page( ‘live’ ) ){ remove_action( ‘wp_enqueue_scripts’, array( Design_Scheme::get_instance(), ‘header_style_css’ ), 11 ); } } add_action( ‘wp_enqueue_scripts’, ‘remove_inline_style’); thank you for your help.