Skip to content

Instantly share code, notes, and snippets.

View infowprobo's full-sized avatar

WPRobo infowprobo

View GitHub Profile
@infowprobo
infowprobo / handle_twilio_success.php
Created October 17, 2023 08:15
This action hook is used to perform any action when the Twilio API returns a success response.
function wprobo_12345_handle_twilio_success( $response, $args ) {
// Perform any action when the Twilio API returns a success response.
}
add_action( 'wprobo_ccp_twilio_handle_twilio_success', 'wprobo_12345_handle_twilio_success', 10, 2 );
@infowprobo
infowprobo / handle_twilio_exception.php
Created October 17, 2023 08:13
This action hook is used to perform any action when the Twilio API throws an exception.
function wprobo_12345_handle_twilio_exception( $exception, $args ) {
// Perform any action when the Twilio API throws an exception.
}
add_action( 'wprobo_ccp_twilio_handle_twilio_exception', 'wprobo_12345_handle_twilio_exception', 10, 2 );
@infowprobo
infowprobo / before_verify_otp.php
Created October 17, 2023 08:12
This action hook is used to perform any action before verifying the OTP.
function wprobo_12345_before_verify_otp( $phone_number, $otp ) {
// Perform any action before verifying the OTP.
}
add_action( 'wprobo_ccp_twilio_before_verify_otp', 'wprobo_12345_before_verify_otp', 10, 2 );
@infowprobo
infowprobo / before_send_custom_otp.php
Created October 17, 2023 08:11
This action hook is used to perform any action before sending the custom OTP to the customer.
function wprobo_12345_before_send_custom_otp( $phone_number, $otp, $company, $channel ) {
// Perform any action before sending the custom OTP to the customer.
}
add_action( 'wprobo_ccp_twilio_before_send_custom_otp', 'wprobo_12345_before_send_custom_otp', 10, 4 );
@infowprobo
infowprobo / before_send_message.php
Last active October 17, 2023 08:12
This action hook is used to perform any action before sending the message to the customer.
function wprobo_12345_before_send_message( $phone_number, $message ) {
// Perform any action before sending the message to the customer.
}
add_action( 'wprobo_ccp_twilio_before_send_message', 'wprobo_12345_before_send_message', 10, 2 );
@infowprobo
infowprobo / carrier_lookup.php
Created October 17, 2023 08:07
This action hook is used to perform any action before performing the carrier lookup.
function wprobo_12345_before_carrier_lookup( $phone_number ) {
// Perform any action before performing the carrier lookup.
}
add_action( 'wprobo_ccp_twilio_before_carrier_lookup', 'wprobo_12345_before_carrier_lookup' );
@infowprobo
infowprobo / file.php
Created October 17, 2023 08:02
This action hook is used to perform any action before sending the OTP to the customer.
function wprobo_12345_before_send_otp( $phone_number, $channel ) {
// Perform any action before sending the OTP to the customer.
}
add_action( 'wprobo_ccp_twilio_before_send_otp', 'wprobo_12345_before_send_otp', 10, 2 );
@infowprobo
infowprobo / functions.php
Last active August 6, 2023 12:01
change the log path in CryptoCart-Lite and in CryptoCartPro plugin
<?php
add_filter( 'wprobo_ccp_functions_add_log_path', 'my_custom_log_path' );
function my_custom_log_path( $log_path ) {
$log_path = '/my/custom/path';
return $log_path;
}
$result = match ($value) {
1, 2, 3 => 'Low',
4, 5, 6 => 'Medium',
7, 8, 9 => 'High',
default => 'Unknown',
#[Deprecated('Use newFunction() instead')]
function oldFunction() {
// ...
}