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 | |
| foreach ( $flowers as $flower=>$value ) { | |
| $_data['categories'][$value->term_id] = $value->name; | |
| } |
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 | |
| /** | |
| * 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 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
| /** | |
| * 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 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( 'fg_easypassthrough_populate_same_form', '__return_false' ); |
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 | |
| /** | |
| * Driver Dadshboard - Access Denied Filter | |
| */ | |
| function acme_access_denied( $access_denied ) { | |
| if ( false !== get_option( 'ddwc_pro_settings_driver_application' ) && 'yes' == get_option( 'ddwc_pro_settings_driver_application' ) ) { | |
| if ( false !== get_option( 'ddwc_pro_settings_contact_page' ) && 'none' !== get_option( 'ddwc_pro_settings_contact_page' ) ) { | |
| $contact_link = get_permalink( get_option( 'ddwc_pro_settings_contact_page' ) ); | |
| } else { | |
| $contact_link = 'mailto:' . get_option( 'admin_email' ); |
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 | |
| //Works with WooCommerce 3.2.6 | |
| add_action( 'woocommerce_shipping_init', 'econt_shipping_method' ); | |
| function econt_shipping_method() { | |
| if ( ! class_exists( 'WC_Econt_Shipping_Method' ) ) { | |
| class WC_Econt_Shipping_Method extends WC_Shipping_Method { | |
| public function __construct( $instance_id = 0 ) { | |
| $this->instance_id = absint( $instance_id ); | |
| $this->id = 'econt';//this is the id of our shipping method |
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 | |
| // Get order data. | |
| $order = wc_get_order( 1246 ); | |
| // Order total. | |
| $total = $order->get_total(); | |
| // Add Product data. | |
| $product_id = 8; | |
| $quantity = 1; |
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 | |
| /** | |
| * Filters the link text of the header logo above the login form. | |
| * | |
| * @since 5.2.0 | |
| * | |
| * @param string $login_header_text The login header logo link text. | |
| */ | |
| $login_header_text = apply_filters( 'login_headertext', $login_header_text ); |
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 | |
| /** | |
| * Remove data from order details | |
| */ | |
| add_filter( 'ddwc_driver_dashboard_delivery_total', '__return_false' ); | |
| add_filter( 'ddwc_driver_dashboard_order_total', '__return_false' ); | |
| add_filter( 'ddwc_driver_dashboard_total_title', '__return_false' ); | |
| add_filter( 'ddwc_driver_dashboard_order_item_price', '__return_false' ); | |
| add_filter( 'ddwc_driver_dashboard_payment_method', '__return_false' ); | |
| add_filter( 'ddwc_driver_dashboard_assigned_orders_total_title', '__return_false' ); |