PluginProbe
Texty – SMS Notification for WordPress, WooCommerce, Dokan and more / 1.1
Texty – SMS Notification for WordPress, WooCommerce, Dokan and more v1.1
2.0.2 trunk 0.2 1.0 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 2.0.0 2.0.1
texty / includes / Notifications / Dokan / Base.php

Base.php in Texty – SMS Notification for WordPress, WooCommerce, Dokan and more 1.1, at includes/Notifications/Dokan/Base.php

43 lines 728 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Texty\Notifications\Dokan;
4
5 use Texty\Notifications\WC\Base as OrderBase;
6
7 class Base extends OrderBase {
8
9 /**
10 * Vendor ID
11 *
12 * @var int
13 */
14 protected $vendor_id;
15
16 /**
17 * Set vendor ID
18 *
19 * @param int $vendor_id
20 *
21 * @return void
22 */
23 public function set_vendor( $vendor_id ) {
24 $this->vendor_id = $vendor_id;
25 }
26
27 /**
28 * Return recipients
29 *
30 * @return array
31 */
32 public function get_recipients() {
33 if ( ! $this->vendor_id ) {
34 return [];
35 }
36
37 $vendor = dokan()->vendor->get( $this->vendor_id );
38 $phone = $vendor->get_phone();
39
40 return $phone ? [ $phone ] : [];
41 }
42 }
43