Element -- selects all h2 elements on the page
h2 {
foo: bar;| function init_pmpro_membership_content_filter_later() | |
| { | |
| remove_filter('the_content', 'pmpro_membership_content_filter', 5); | |
| remove_filter('the_content_rss', 'pmpro_membership_content_filter', 5); | |
| remove_filter('comment_text_rss', 'pmpro_membership_content_filter', 5); | |
| add_filter('the_content', 'pmpro_membership_content_filter', 15); | |
| add_filter('the_content_rss', 'pmpro_membership_content_filter', 15); | |
| add_filter('comment_text_rss', 'pmpro_membership_content_filter', 15); | |
| } |
| <?php | |
| /** | |
| * Plugin Name: WooCommerce Upsells Shortcode | |
| * Plugin URI: http://skyver.ge/51 | |
| * Description: Adds a shortcode to output WooCommerce product upsells; removes them from the original location when used | |
| * Author: SkyVerge | |
| * Author URI: https://www.skyverge.com/ | |
| * Version: 1.0.0 | |
| * | |
| * Copyright: (c) 2016 SkyVerge, Inc. ([email protected]) |
| <?php | |
| Give me one record | |
| $queryFilms = "SELECT filmName, filmDescription FROM movies WHERE filmID = 10"; | |
| $resultFilms = $mysqli->query($queryFilms); | |
| $rowFilms = $resultFilms->fetch_assoc(); | |
| // then to output | |
| echo "<p>{$rowFilms['filmName']}</p>"; | |
| // Remove Links to WooCommerce Single Product Page | |
| remove_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10 ); | |
| remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5 ); |
| /* | |
| ##Device = Desktops | |
| ##Screen = 1281px to higher resolution desktops | |
| */ | |
| @media (min-width: 1281px) { | |
| //CSS | |
| /*Stock option customization*/ | |
| function add_custom_stock_type() { | |
| ?> | |
| <script type="text/javascript"> | |
| jQuery(function(){ | |
| jQuery('._stock_status_field').not('.custom-stock-status').remove(); | |
| }); | |
| </script> | |
| <?php |
| add_action('woocommerce_check_cart_items','condtiontal_checkoout_total'); | |
| function condtiontal_checkoout_total(){ | |
| if ( WC()->cart->total > 10000 ) {?> | |
| <style> | |
| li.wc_payment_method.payment_method_stripe { | |
| display: none; | |
| } | |
| </style> | |
| <?php } |
| <?php | |
| //increase max execution time of this script to 150 min: | |
| ini_set('max_execution_time', 9000); | |
| //increase Allowed Memory Size of this script: | |
| ini_set('memory_limit','960M'); | |
| // Copies woocommerce orders and users over from source to target. | |
| // I use this on my local machine - loading both db's up there side by side | |
| // could easily adjust the connect strings to connect elsewhere if needed. |
| function namespace_force_individual_cart_items( $cart_item_data, $product_id ) { | |
| $unique_cart_item_key = md5( microtime() . rand() ); | |
| $cart_item_data['unique_key'] = $unique_cart_item_key; | |
| return $cart_item_data; | |
| } | |
| add_filter( 'woocommerce_add_cart_item_data', 'namespace_force_individual_cart_items', 10, 2 ); |