mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Add CSS file for non-DCC rules
This commit is contained in:
parent
57af25a197
commit
4ca9639fb1
4 changed files with 17 additions and 8 deletions
3
modules/ppcp-button/resources/css/gateway.scss
Normal file
3
modules/ppcp-button/resources/css/gateway.scss
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#place_order.ppcp-hidden {
|
||||||
|
display: none !important;
|
||||||
|
}
|
|
@ -15,7 +15,3 @@
|
||||||
.ppcp-dcc-order-button {
|
.ppcp-dcc-order-button {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
#place_order.ppcp-hidden {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
|
|
@ -522,13 +522,22 @@ class SmartButton implements SmartButtonInterface {
|
||||||
$load_script = true;
|
$load_script = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( in_array( $this->context(), array( 'pay-now', 'checkout' ), true ) && $this->can_render_dcc() ) {
|
if ( in_array( $this->context(), array( 'pay-now', 'checkout' ), true ) ) {
|
||||||
wp_enqueue_style(
|
wp_enqueue_style(
|
||||||
'ppcp-hosted-fields',
|
'gateway',
|
||||||
untrailingslashit( $this->module_url ) . '/assets/css/hosted-fields.css',
|
untrailingslashit( $this->module_url ) . '/assets/css/gateway.css',
|
||||||
array(),
|
array(),
|
||||||
$this->version
|
$this->version
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ( $this->can_render_dcc() ) {
|
||||||
|
wp_enqueue_style(
|
||||||
|
'ppcp-hosted-fields',
|
||||||
|
untrailingslashit( $this->module_url ) . '/assets/css/hosted-fields.css',
|
||||||
|
array(),
|
||||||
|
$this->version
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ( $load_script ) {
|
if ( $load_script ) {
|
||||||
wp_enqueue_script(
|
wp_enqueue_script(
|
||||||
|
|
|
@ -7,7 +7,8 @@ module.exports = {
|
||||||
target: 'web',
|
target: 'web',
|
||||||
entry: {
|
entry: {
|
||||||
button: path.resolve('./resources/js/button.js'),
|
button: path.resolve('./resources/js/button.js'),
|
||||||
"hosted-fields": path.resolve('./resources/css/hosted-fields.scss')
|
"hosted-fields": path.resolve('./resources/css/hosted-fields.scss'),
|
||||||
|
"gateway": path.resolve('./resources/css/gateway.scss')
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, 'assets/'),
|
path: path.resolve(__dirname, 'assets/'),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue