billogram_initial_sync_products_callback

The WooCommerce Billogram Integration billogram initial sync products callback function.

Description

billogram_initial_sync_products_callback(); 

Usage

  1. if ( !function_exists( 'billogram_initial_sync_products_callback' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-billogram-integration/woocommerce-billogram2-extended.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = billogram_initial_sync_products_callback(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/woocommerce-billogram2-extended.php  
  1. function billogram_initial_sync_products_callback() { 
  2. global $wpdb; // this is how you get access to the database 
  3.  
  4. $fnox = new WC_Billogram_Extended(); 
  5. if($fnox->initial_products_sync()) { 
  6. echo "Produkter r synkroniserade utan problem."; 
  7. else{ 
  8. echo "Ngot gick fel"; 
  9. die(); // this is required to return a proper result