You will need JQ to format the output.
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
| # Fisrt, assign the version you want to install and press enter. | |
| # Ex.: export version=8.3 | |
| export version=VERSION | |
| # Second, use the following command to install PHP and most used libs. | |
| sudo apt install php${version}-common php${version}-mysql php${version}-xml php${version}-xmlrpc php${version}-curl php${version}-gd php${version}-imagick php${version}-cli php${version}-dev php${version}-imap php${version}-mbstring php${version}-opcache php${version}-soap php${version}-zip php${version}-intl -y |
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 | |
| protected function getOptions(): array | RawJs | null | |
| { | |
| return [ | |
| 'scales' => [ | |
| 'x' => ['display' => false,], | |
| 'y' => ['display' => 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 | |
| add_filter( 'wc_shipping_simulator_package_data', function( $package ){ | |
| if( $product_id = $_GET['product'] ?? $_POST['product_id'] ?? false ){ | |
| $package['seller_id'] = get_post_field( 'post_author', $product_id ); | |
| } | |
| return $package; |
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 | |
| Route::match( | |
| ['get', 'post'], | |
| '{controller}/{action?}/{params?}', | |
| function ($controller, $action = 'index', $params = '') { | |
| $params = explode('/', $params); | |
| $methodParams = []; | |
| foreach ($params as $key => $param) { |
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 | |
| /** | |
| * Pagar.me API | |
| * | |
| * @package WooCommerce_Pagarme/API | |
| */ | |
| if ( ! defined( 'ABSPATH' ) ) { | |
| exit; | |
| } |
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 | |
| if( !class_exists( 'WCPagarmePixPayment\Pagarme\PagarmeApiV4' ) ){ | |
| return; | |
| } | |
| use WCPagarmePixPayment\Pagarme\PagarmeApiV4; | |
| class ArtiPagarmeApi extends PagarmeApiV4 { |
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 | |
| // Valor declarado. | |
| add_filter( 'woocommerce_correios_shipping_args', function( $args ){ | |
| if( 24 >= $args['nVlValorDeclarado'] ){ | |
| $args['nVlValorDeclarado'] = 0; | |
| } | |
| return $args; |
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_action( 'wp_enqueue_scripts', function(){ | |
| $is_pix_payment_page = function(){ | |
| global $wp; | |
| //Page is view order or order received? | |
| if( !isset($wp->query_vars['order-received']) && !isset($wp->query_vars['view-order']) ) | |
| return; |
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
| # You must place it above the "# BEGIN WordPress" comment. | |
| <IfModule mod_rewrite.c> | |
| RewriteCond %{REQUEST_URI} ^/wp-content/uploads/[^\/]*/.*$ | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| # Just change the URL to your liking. | |
| RewriteRule ^(.*)$ https://www.production-site.com/wp-content/uploads/$1 [L] | |
| </IfModule> |
NewerOlder