• Resolved mbaysek

    (@mbaysek)


    Hello. I love the plugin, and I’m trying to build new features for my website around it.

    I need to call the Simply Schedule Appointments code from other PHP code running on the same server as the WordPress instance.

    I want to be able to write scripts which can make appointments along side the Web Interface itself.

    Any help in this is most appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author NSquared

    (@croixhaug)

    Hi there, just to confirm, this is from PHP code on the same server, but your code will live outside of WordPress?

    Thread Starter mbaysek

    (@mbaysek)

    Yes that’s right.

    If I had to write it as a WordPress plugin, I suppose I could, but I didn’t really want to do that.

    Plugin Author NSquared

    (@croixhaug)

    Hi @mbaysek

    It’s possible for you to load WordPress externally, with an external file. Something like:

    
    <?php
    include '/path/to/wordpress_directory/wp-load.php'; // now you can access WP functions, plugins, etc.
    
    $ssa = ssa(); // this is our main SSA class
    
    $ssa->appointment_model->insert( array(
      'start_date' => '2019-10-31 09:00:00' // UTC timezone
      // ... other params go here as well
    ) );
    

    should get you started

    Thread Starter mbaysek

    (@mbaysek)

    Great, and thank you. After reading a lot of the code, I have been able get information out of the objects just fine. Thanks for the help

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Calling into the plugin from PHP code instead of through the Web UI’ is closed to new replies.