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 | |
add_filter( 'fg_easypassthrough_populate_same_form', '__return_false' ); |
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
/** | |
* Custom account fields | |
*/ | |
add_action( 'woocommerce_edit_account_form', 'my_woocommerce_edit_account_form' ); | |
add_action( 'woocommerce_save_account_details', 'my_woocommerce_save_account_details' ); | |
function my_woocommerce_edit_account_form() { | |
$user_id = get_current_user_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 | |
/** | |
* post-process.php | |
* make sure to include post-process.php in your functions.php. Use this in functions.php: | |
* | |
* get_template_part('post-process'); | |
* | |
*/ | |
function do_insert() { | |
if( 'POST' == $_SERVER['REQUEST_METHOD'] |
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 | |
foreach ( $flowers as $flower=>$value ) { | |
$_data['categories'][$value->term_id] = $value->name; | |
} |
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 | |
/** | |
* Add Category taxonomy for the Flowers Custom Post Type | |
*/ | |
function flowers_category( $data, $post, $request ) { | |
$_data = $data->data; | |
$_data['flowers_category'] = get_the_term_list( $post->ID, 'flowers_category', '', ' ', '' ); | |
$data->data = $_data; | |
return $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 | |
/* | |
Plugin Name: PMPro Limit Available Plugins and Themes | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-limit-available-plugins/ | |
Description: Limits Which Plugins are Available for Network Sites | |
Version: .1 | |
Author: Stranger Studios | |
Author URI: http://www.strangerstudios.com | |
1. Place this file in wp-content/mu-plugins. |
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 | |
/** | |
* @snippet Do Something When Product is Published | |
* @how-to Watch tutorial @ https://businessbloomer.com/?p=19055 | |
* @sourcecode https://businessbloomer.com/?p=543 | |
* @author Rodolfo Melogli | |
* @testedwith WooCommerce 3.2.6 | |
*/ | |
function add_this_to_new_products( $new_status, $old_status, $post ) { |
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 | |
// Get loop of all Pages. | |
$args = array( | |
'sort_column' => 'post_title', | |
'hierarchical' => 1, | |
'post_type' => 'page', | |
'post_status' => 'publish' | |
); | |
$pages = get_pages( $args ); |
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 | |
$current_user = wp_get_current_user(); | |
$billing_postcode = get_user_meta( $current_user->ID, 'billing_postcode', true ); |