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 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?> | |
<?php do_action( 'wpo_wcpdf_before_document', $this->get_type(), $this->order ); ?> | |
<table class="head container"> | |
<tr> | |
<td class="header"> | |
<?php | |
if ( $this->has_header_logo() ) { | |
do_action( 'wpo_wcpdf_before_shop_logo', $this->get_type(), $this->order ); |
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
FILE: https://github.com/googleapis/google-api-php-client-services/blob/main/src/GoogleAnalyticsAdmin/Resource/PropertiesDataStreamsMeasurementProtocolSecrets.php | |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE | |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |
18 | WARNING | 'resource' is a soft reserved keyword as of PHP version 7.0 and should not be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE) | |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |
FILE: https://github.com/googleapis/google-api-php-client-services/blob/main/src/GoogleAnalyticsAdmin/Resource/PropertiesConversion |
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 | |
// Display a custom text under cart item name in cart page | |
add_action( 'woocommerce_before_calculate_totals', 'name_on_cart_item', 10, 1 ); | |
function name_on_cart_item ( $cart ) { | |
if ( is_admin() && ! defined( 'DOING_AJAX' ) ) | |
return; |
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 action__product_stock_change( $continue, $post_id, $data, $import_id ) { | |
$firstImportId = 10; | |
$supplierPrefix = "A-"; | |
$secondImportId = 20; | |
// Set the input ID | |
if ( $import_id === $firstImportId ) { |
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 | |
/** | |
* PayFast Payment Gateway | |
* | |
* Provides a PayFast Payment Gateway. | |
* | |
* @class woocommerce_payfast | |
* @package WooCommerce | |
* @category Payment Gateways | |
* @author WooCommerce |
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 ('init', 'disable_store_ordering'); | |
// Disable Cart, Checkout, Add Cart | |
function disable_store_ordering() { | |
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 ); | |
remove_action( 'woocommerce_proceed_to_checkout', 'woocommerce_button_proceed_to_checkout', 20 ); | |
remove_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 ); | |
add_action( 'woocommerce_before_main_content', 'wc_shop_disable', 5 ); | |
add_action( 'woocommerce_before_cart', 'wc_shop_disable', 5 ); |
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 | |
/* | |
* Create order dynamically | |
*/ | |
add_action( 'woocommerce_before_checkout_form', 'create_order' ); | |
function create_order() { | |
global $woocommerce; | |
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
select | |
p.ID as order_id, | |
p.post_date, | |
max( CASE WHEN pm.meta_key = '_order_total' and p.ID = pm.post_id THEN pm.meta_value END ) as order_total, | |
max( CASE WHEN pm.meta_key = '_customer_user' and p.ID = pm.post_id THEN pm.meta_value END ) as user_id, | |
us.user_registered, | |
if( us.user_registered < '2019-01-01', 'returning', 'new' ) as user_type | |
from | |
wp_posts p |
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 | |
$terms = get_field( 'blog_category_tax' ); | |
foreach ( $terms as $term ):?> | |
<div class="termWrapper"> | |
<h1><?php echo get_cat_name( $term );?></h1> | |
<div class="featured_posts"> | |
<?php | |
$args = array( | |
'numberposts' => 3 | |
'category' => $term, |
NewerOlder