Skip to content

Commit af99281

Browse files
committed
Fixed bug with Carbon Fields dependency check
1 parent 1e870a8 commit af99281

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

app/Plugin.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ public function activate() {
6464
*/
6565
public function init() {
6666

67-
add_action( 'after_setup_theme', array( 'Carbon_Fields\\Carbon_Fields', 'boot' ) );
67+
if( class_exists( 'Carbon_Fields\\Carbon_Fields' ) ) {
68+
add_action( 'after_setup_theme', array( 'Carbon_Fields\\Carbon_Fields', 'boot' ) );
69+
} else {
70+
new TGMPA();
71+
}
6872

6973
if( $this->verify_dependencies( 'carbon_fields' ) === true ) {
7074
add_action( 'carbon_fields_loaded', array( $this, 'load_plugin' ));

0 commit comments

Comments
 (0)