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 | |
// Register post status | |
add_action( 'init', function() { | |
register_post_status( 'mysite-accepted', array( | |
'label' => _x( 'Accepted', 'post status label', 'mysite' ), | |
'label_count' => _n_noop( 'Accepted <span class="count">(%s)</span>', 'Accepted <span class="count">(%s)</span>', 'mysite' ), | |
) ); |
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 this function in toyyibpay-for-woocommerce/index.php file | |
// Fix WooCommerce order key parameter that clashed with toyyibPay | |
add_filter( 'woocommerce_thankyou_order_key', function( $order_key ) { | |
if ( isset( $_GET['order_key'] ) && !empty( $_GET['order_key'] ) ) { | |
$order_key = wc_clean( wp_unslash( $_GET['order_key'] ) ); | |
} | |
return $order_key; | |
} ); |
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( 'manage_edit-product_columns', 'woocommerce_product_custom_columns' ); | |
function woocommerce_product_custom_columns( $columns ) { | |
$new_columns = array(); | |
foreach ( $columns as $key => $value ) { | |
$new_columns[ $key ] = $value; | |
// Add total variations column after stock status column |
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( 'manage_edit-product_columns', 'woocommerce_product_custom_columns' ); | |
function woocommerce_product_custom_columns( $columns ) { | |
$new_columns = array(); | |
foreach ( $columns as $key => $value ) { | |
$new_columns[ $key ] = $value; | |
// Add total variations column after stock status column |
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( 'woocommerce_after_shipping_rate', 'checkout_shipping_additional_text', 20, 2 ); | |
function checkout_shipping_additional_text( $method, $index ) { | |
if ( $method->get_method_id() == 'free_shipping' ) { | |
echo '<br>Pesanan akan diterima pada 3 - 5 hari bekerja'; | |
} | |
} |
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
composer dump-autoload | |
php artisan clear-compiled | |
php artisan cache:clear | |
php artisan route:clear | |
php artisan view:clear | |
php artisan config:clear | |
php artisan migrate:refresh --seed | |
composer dump-autoload |