This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('woocommerce_new_order', 'new_order_send_tg', 1, 1); | |
function new_order_send_tg($order_id) { | |
$order = wc_get_order($order_id); // Get the order object | |
// Customer information | |
$customer_name = $order->get_billing_first_name() . ' ' . $order->get_billing_last_name(); | |
$customer_phone = $order->get_billing_phone(); | |
$customer_email = $order->get_billing_email(); | |
$customer_address = $order->get_billing_address_1() . ', ' . $order->get_billing_city() . ', ' . $order->get_billing_country(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xcrun simctl openurl booted "deeplink://test" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { | |
DispatchQueue.main.async { | |
self.alpha = 1.0 | |
UIView.animate(withDuration: 0.4, delay: 0.0, options: .curveLinear, animations: { | |
self.alpha = 0.5 | |
}, completion: nil) | |
} | |
} | |
override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for create virtual environment: python3 -m venv ./venv | |
for activate: source ./venv/bin/activate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIImageView { | |
convenience init(image: UIImage?, contentMode: UIView.ContentMode) { | |
self.init() | |
self.image = image | |
self.contentMode = contentMode//in View Controller let logoImageView = UIImageView(image: image literal, contentMode: .scaleAspectFit) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UIColor { | |
static func buttonRed() -> UIColor { | |
return //hex of the color | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIFont { | |
static func avenir20() -> UIFont? { | |
return UIFont.init(name: "avenir", size: 20) | |
} | |
static func avenir26() -> UIFont? { | |
return UIFont.init(name: "avenir", size: 26) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class MainTabBarController: UITabBarController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
view.backgroundColor = .white | |
NewerOlder