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 | |
/** | |
* Modify allowed days based on cart items. | |
* | |
* @param array $allowed_days | |
* @param bool $minmax | |
* * @return mixed | |
*/ | |
function iconic_wds_modify_allowed_days( $allowed_days, $minmax ) { | |
if ( $minmax ) { |
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 | |
/** | |
* Check cart for given product id product. | |
* | |
* @param array $categories Categories. | |
* | |
* @return bool | |
*/ | |
function iconic_check_for_cart_item_in_cart( $product_ids = array() ) { | |
if ( empty( $product_ids ) || empty( WC()->cart ) ) { |
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 | |
/** | |
* Flux checkout: Move position of shipping container to below the Shipping Adress. | |
*/ | |
add_action( 'woocommerce_after_order_notes', function() { | |
?> | |
<div class="flux-shipping-container--desktop"></div> | |
<?php | |
} ); |
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 | |
/** | |
* Modify Philippine Peso currency to display ₱ symbol instead of PHP text. | |
* | |
* @param array $currencies The current currencies registered in Gravity Forms. | |
* @return array List of currencies with modified PHP currency. | |
*/ | |
function modify_php_currency_symbol( $currencies ) { | |
$currencies['PHP'] = array( | |
'name' => 'Philippine Peso', |
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 UAE Dirham (AED) currency to Gravity Forms. | |
* | |
* @param array $currencies The current currencies registered in Gravity Forms. | |
* @return array List of supported currencies with AED added. | |
*/ | |
function add_aed_currency_to_gf( $currencies ) { | |
$currencies['AED'] = array( | |
'name' => 'United Arab Emirates Dirham', |
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 | |
/** | |
* Flux checkout - add custom fields. | |
* | |
* @param array $fields Checkout Fields. | |
* | |
* @return array. | |
*/ | |
function flux_add_custom_field( $fields ) { | |
$fields['billing']['billing_birthday'] = array( |
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 | |
/** | |
* Plugin Name: Recurring Slot Calculator Test | |
* Plugin URI: https://iconicwp.com | |
* Description: Test plugin for RecurringSlotCalculator class | |
* Version: 1.0.0 | |
* Author: IconicWP | |
* Text Domain: recurring-slot-test | |
* | |
* @package RecurringSlotTest |
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 | |
use StellarPay\Core\ValueObjects\WebhookEventType; | |
use StellarPay\Core\Support\Facades\DateTime\Temporal; | |
use StellarPay\Core\Support\Facades\DateTime\TemporalFacade; | |
use StellarPay\Core\Webhooks\EventProcessor; | |
use StellarPay\Core\Webhooks\EventResponse; | |
use StellarPay\PaymentGateways\Stripe\Webhook\WebhookRegisterer; | |
use function StellarPay\Core\container; |
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_filter('woocommerce_checkout_fields', 'add_custom_checkout_field'); | |
function add_custom_checkout_field($fields) { | |
$fields['billing']['billing_custom_field'] = array( | |
'type' => 'text', | |
'label' => __('BTW-nummer'), | |
'required' => false, // has to be false, otherwise it's always checked dispite of country selected! | |
'class' => array('form-row-wide', 'tax-number-class'), | |
'label_class' => array('tax-number-label'), | |
'clear' => true, | |
); |
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
/** | |
* Flux checkout - move company field to billing step. | |
*/ | |
add_filter( 'flux_checkout_details_fields', function( $fields ) { | |
foreach ( $fields as $key => $field ) { | |
if ( $field === 'billing_company' ) { | |
unset( $fields[ $key ] ); | |
} | |
} |
NewerOlder