Advertisement
Guest User

Untitled

a guest
Oct 31st, 2022
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. <?php
  2.  
  3. if (!defined('REAL_WP_SITE_URL')) {
  4. define('REAL_WP_SITE_URL', 'https://realwp.net');
  5. }
  6.  
  7. class WP_DIGIKALA_SELLER extends \WPTrait\Plugin
  8. {
  9. public $woocommerce;
  10. public $Product;
  11. public $Order;
  12. public $Compatibility;
  13. public $api;
  14. public $Admin;
  15.  
  16. public function __construct($slug, $args)
  17. {
  18. parent::__construct($slug, $args);
  19. }
  20.  
  21. public function includes()
  22. {
  23. add_filter('real_wp_products_list', [$this, 'define_product']);
  24.  
  25. require_once dirname(__FILE__).'/lib/real-wp/real-wp.php';
  26.  
  27. require_once dirname(__FILE__).'/lib/settings-api/settings.php';
  28. }
  29.  
  30. public function instantiate()
  31. {
  32. if (false === REAL_WP::isActiveSoftwareLicense($this->plugin->slug)) {
  33. return;
  34. }
  35. $this->api = new \WP_DIGIKALA_SELLER\DIGIKALA_SELLER_API($this->plugin);
  36. $this->Admin = new \WP_DIGIKALA_SELLER\admin\Admin($this->plugin);
  37.  
  38. if (false === wp_digikala_seller()->api->isActiveService()) {
  39. return;
  40. }
  41. $this->woocommerce = new \WP_DIGIKALA_SELLER\wordpress\WooCommerce($this->plugin);
  42. ......................................................................
  43. .............................................
  44. ...................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement