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
<?php | |
// https://www.youtube.com/watch?v=VEzAWMCwprQ | |
add_action( 'pmxi_saved_post', 'post_saved', 10, 1 ); | |
function post_saved( $id ) { | |
global $wpdb; | |
$pass = get_user_meta( $id, 'xfer_user_pass', true ); | |
$table = $wpdb->prefix . 'users'; | |
$wpdb->query( $wpdb->prepare( | |
" | |
UPDATE `" . $table . "` |
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 Tracking Code to the Order Recieved Page | |
*/ | |
function wc_ninja_checkout_analytics( $order_id ) { | |
$order = new WC_Order( $order_id ); | |
$currency = $order->get_order_currency(); | |
$total = $order->get_total(); | |
$date = $order->order_date; | |
?> | |
<!-- Paste Tracking Code Under Here --> |
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
AL : Alabama | |
AK : Alaska | |
AZ : Arizona | |
AR : Arkansas | |
CA : California | |
CO : Colorado | |
CT : Connecticut | |
DE : Delaware | |
DC : District of Columbia | |
FL : Florida |
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
<?php | |
add_filter( 'wc_shipment_tracking_get_providers', 'custom_shipment_tracking' ); | |
function custom_shipment_tracking( $providers ) { | |
// unset all the ones you don't want (e.g., we kept USPS and FedEx set) | |
unset($providers['Australia']); | |
unset($providers['Austria']); | |
unset($providers['Brazil']); | |
unset($providers['Belgium']); |
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
<?php | |
/** | |
* Add an automatic default custom taxonomy for custom post type. | |
* If no taxonomy term is selected during post creation, the custom post will be assigned the specififed taxonomy terms during save. | |
* Just change the 'your-cpt-type' to your custom post type name | |
* and change 'fruit_tags' and 'soda_flavors' to the taxonomy slug(s) you want to target | |
* and change 'apple' and 'banana' and 'cola' with the slug(s) of the term(s) you want to make default | |
* you can add multiple taxonomy at once so the 'soda_flavors' line is applicable only then | |
*/ |