This file contains 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_order_status_split-order', 'bbloomer_status_custom_notificationa', 20, 2 ); | |
function bbloomer_status_custom_notificationa( $order_id, $order ) { | |
$mailer = WC()->mailer()->get_emails(); | |
$mailer['wc_order_status_email_107387']->trigger( $order_id ); | |
} |
This file contains 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
<?php | |
/** | |
* Plugin Name: Run Action User | |
* Description: | |
* Version: 1.0 | |
* Copyright: 2022 | |
* Text Domain: run-action-user | |
* Domain Path: /languages | |
*/ |
This file contains 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 csv | |
import json | |
# Function to convert a CSV to JSON | |
# Takes the file paths as arguments | |
def make_json(csvFilePath, jsonFilePath): | |
# create a dictionary | |
data = {} |
This file contains 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
<?php | |
function create_posttype() { | |
register_post_type( 'movies', | |
// CPT Options | |
array( | |
'labels' => array( | |
'name' => __( 'Movies' ), | |
'singular_name' => __( 'Movie' ) | |
), |
This file contains 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
function save_image( $base64_img, $title ) { | |
require_once( ABSPATH . 'wp-admin/includes/image.php' ); | |
// Upload dir. | |
$upload_dir = wp_upload_dir(); | |
$upload_path = str_replace( '/', DIRECTORY_SEPARATOR, $upload_dir['path'] ) . DIRECTORY_SEPARATOR; | |
$img = str_replace( 'data:image/png;base64,', '', $base64_img ); | |
$img = str_replace( ' ', '+', $img ); | |
$decoded = base64_decode( $img ); |
NewerOlder