Integrate WordPress with Oracle

0

I will develop an "E-Commerce" service in WordPress, known as WooCommerce, but I need to integrate it with Oracle, in addition to the MySQL itself that it will run ...

Example: When someone hires a service, I need them to send some information about this purchase to my Oracle bank.

Do you know how I can do this? Is there a plugin or am I going to have to study architecture and make my own adaptations of what I need? Is there another tool you indicate other than WordPress itself?

    
asked by anonymous 24.05.2017 / 17:16

1 answer

0

Use the hook save_post for this. It runs immediately after a post has been written to the database, and loads the information that was sent. Then you connect to Oracle using PDO and follow it as if it were a common PHP application: / p>

add_action( 'save_post', 'enviar_dados_pro_oracle', 10, 3 );
function enviar_dados_pro_oracle( $post_id, $post, $update ) {

    /* faça sua validação aqui, permissões de acesso, nonces, etc */

    if ( wp_is_post_revision( $post_id ) )
        return;

    $pdo = new PDO();
    /** todo o resto da sua rotina com PDO aqui */

}
    
26.05.2017 / 12:51